Commit Graph

17822 Commits

Author SHA1 Message Date
Lais Andrade
41fd16dfb7 Merge "Deprecate boolean settings for haptic feedback and vibrate when ringing" 2022-01-19 17:24:40 +00:00
Prabir Pradhan
08d0c47646 Merge "Introduce SimpleBatchedInputEventReceiver" 2022-01-19 11:24:21 +00:00
Jacky Kao
1700cab5f8 Merge "Adds APIs to let live caption can access the data in the DB (2/n)" 2022-01-18 23:26:52 +00:00
Rachel Lee
34f56bf78a Merge "Implement Java Choreographer multi frame timeline." 2022-01-18 20:30:18 +00:00
Lais Andrade
a01a1f6993 Deprecate boolean settings for haptic feedback and vibrate when ringing
Deprecate HAPTIC_FEEDBACK_ENABLED in favor or HAPTIC_FEEDBACK_INTENSITY,
and VIBRATE_WHEN_RINGING in favor or RING_VIBRATION_INTENSITY.

Introduce hidden flag
VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF
to represent HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING in the
vibrator service. This is applied by:

- PhoneWindowManager, that converts HapticFeedbackConstants into
(VibrationEffect, VibrationAttributes).

- CellBroadcastAlertAudio, that triggers alerts using AudioAttributes
with flags FLAG_BYPASS_INTERRUPTION_POLICY (that translates to same flag
in VibratorManager, to bypass DnD) and FLAG_BYPASS_MUTE (that translates
to this new flag, to bypass the new alarm intensity settings).

The new flag is erased from request that are not from privileged apps,
similar to the other bypass flag. The public
HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING has also been
deprecated in T with a documentation explaining the removal of platform
support.

Remove SysUI dependencies on the deprecated settings, it should use the
USAGE_TOUCH attribute and rely on the vibrator service to apply the user
settings.

Keep other SysUI dependencies that needs to run in older Android
versions (like Launcher3).

Bug: 185351540
Test: VibrationSettingsTest + manual
Change-Id: I0372e4db19e09523795d7e79b9f7a15ae48a8cd9
2022-01-18 18:57:10 +00:00
Taran Singh
461e6477ba Merge "Scribe in IMF: CursorAnchorInfo#getEditorBoundsInfo 3/N" 2022-01-18 18:56:18 +00:00
Pablo Gamito
ab4a170645 Merge changes from topic "showBackground-api"
* changes:
  Support backgrounds during animations in shell
  Add API to show background behind animating windows
2022-01-18 15:55:59 +00:00
Taran Singh
14d8e9450e Scribe in IMF: CursorAnchorInfo#getEditorBoundsInfo 3/N
Add a new field EditorBoundsInfo in CursorAnchorInfo
and implement it.

Bug: 203086136
Test: atest CurosrAnchorInfoTest

Change-Id: I7f225fa1236534bbd18920f8ce8293df23ea2ce7
2022-01-18 02:24:15 -08:00
shawnlin
113c28722b Add an public api to create a DisplayCutout with path for test only
Currently, there is no way to construct a DisplayCutout with cutout
path.
Androidx and camera app need an way to create a DisplayCutout with path
data for testing and they can only access public API. For test purpose,
we add a public API for it.

Bug: 212191782
Test: atest DisplayCutoutTests
Change-Id: I3118b01447cb77df6245f76c9abcb01ef69e80ec
2022-01-18 15:32:29 +08:00
Prabir Pradhan
f38f5b0d96 Introduce SimpleBatchedInputEventReceiver
Create a BatchedInputEventReceiver that makes it easier to return
whether an event was handled.

Bug: 162194035
Test: build
Change-Id: I8d597189b786db6bb61f1d838a530cc573a42238
2022-01-17 08:14:09 -08:00
Pablo Gamito
4a7c927360 Add API to show background behind animating windows
For the new style of Material 3 activity transitions (go/t-activity-transitions) we fully fade in and out activity windows to a solid background color (that of the activity's theme). This means we need to provide a way for activity transitions to show a solid background color behind the animating windows to fill any space that would otherwise be black. This ability should be available both to system transitions but also to apps that want to create transitions in a similar style without necessarily using exactly the system one.

The API provides a way to specify if a background should be shown behind
the animation or not. If a background is requested it is up to the
transition handler to drawn this background appropriately based on the
type of transition and task/activity info.

Test: atest CtsWindowManagerDeviceTestCases:AnimationBackgroundTests
Bug: 202844659
Change-Id: Iddee6583fb1ad83e3ec238a89030b8c284e04d03
2022-01-17 13:26:54 +01:00
Jacky Kao
726d387e82 Adds APIs to let live caption can access the data in the DB (2/n)
1. Proposes the public APIs to get and the system APIs to set the
status of the captions and UI show/hide, and notify the status change.

2. Creates a new class, CaptioningManagerImpl, to get/set the value
of the secure setting keys through the A11yManagerService.

3. Adds a new permission, to protect the setter methods which can't
be used by 3rd party apps.

Bug: 136282740
Test: a11y CTS & unit tests
Change-Id: I591b98578dbb94ca8b5be8a553b81d23a143ee16
Ignore-AOSP-First: new permissions (not yet in AOSP)
2022-01-17 14:57:45 +08:00
Arthur Hung
35eef32446 Merge "Adjust MotionEvent.FLAG_CANCELED flag to public" 2022-01-17 01:50:16 +00:00
TreeHugger Robot
60c20f23cb Merge "Add API for checking if call captioning is enabled on the device" 2022-01-16 09:02:51 +00:00
Robert Carr
6f8235fc80 WindowlessWindowManager: Support touchable region
We just need to forward the WindowSession call to the internal
method we already support.

Bug: 213603716
Test: Existing tests pass
Change-Id: I692d321a96b5278c75bceb14d5b38459d360b4b9
2022-01-15 21:11:36 +00:00
Rachel Lee
5af0462a57 Implement Java Choreographer multi frame timeline.
Bug: 198191703
Test: atest ChoreographerTest
Change-Id: I822782874bc7167be9ad016681ce31b91a38b7ed
2022-01-14 17:34:31 -08:00
Rob Carr
8ebd7e1ff1 Merge "SurfaceControlViewHost: Add side-channel to SurfacePackage" 2022-01-14 21:40:42 +00:00
Sally Yuen
421de0afb8 Merge "Replace drag & drop constants with finalize ids" 2022-01-14 17:11:29 +00:00
Kriti Dang
1774563ec0 Merge "Runtime resolution changes" 2022-01-14 08:28:12 +00:00
Yunfan Chen
a805c7e55e Merge "Support given content insets for non-IME windows" 2022-01-14 07:11:27 +00:00
Nadav Bar
c751b74f48 Add API for checking if call captioning is enabled on the device
Change-Id: I690072f912ab86d5cdf4275fa9fb11f5d2e78b64
Bug: 210923707, 136282740.
Test: Make, atest CtsAccessibilityTestCases: android.view.accessibility.cts.CaptioningManagerTest
2022-01-13 23:52:52 +02:00
TreeHugger Robot
01d195c67c Merge "Revert "Revert "Scribe in IMF: startStylusHandwriting & lifecycl..."" 2022-01-13 16:54:42 +00:00
Kriti Dang
ecf14412d3 Runtime resolution changes
Changed the names of existing display mode APIs.
Added similar APIs in Display class, so that
resolution and refresh rate settings can be pesisted for each display.
The APIs can now be used to set display mode (or only resolution or
refreshRate).

Bug: 206911689
Test: atest DefaultDisplayModeTest

Change-Id: I19655fc347d36e45b5664e2b6faa3d58b5d7004c
2022-01-13 13:47:59 +01:00
Robert Carr
a3fc4405a1 SurfaceControlViewHost: Add side-channel to SurfacePackage
We add a control interface in to surface-package which allows
the embedding process to dispatch events back to the embedded
process. So far we support forwarding configuration changes,
and dispatching a detach view hierarchy message.

Bug: 213603716
Test: Existing tests pass
Change-Id: I7d68628d845b5da687568ffa20529ce2a7772495
2022-01-12 19:34:42 -08:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Taran Singh
94324080af Revert "Revert "Scribe in IMF: startStylusHandwriting & lifecycl..."
Revert^2 "CTS for Stylus Handwriting lifecycle"

493b8d7d3b4d43e483c03b155d38057e3eacd3c9

Reason: Fix API signature related issues by making newly introduced
 methods in InputMethod.java default

Bug: 213976598
Bug: 203086136
Test: atest StylusHandwritingTest
Test: atest SignatureTest#testSignature

Change-Id: Idfd5d1f84e66e3a19ef384589b4892adb91f8066
2022-01-12 19:23:47 +00:00
Derek Sollenberger
11a249be90 Merge "Reland "Enforce that RuntimeShader is only hardware accelerated"" 2022-01-12 19:01:12 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Yunfan Chen
98cc29d15d Support given content insets for non-IME windows
This will let the task bar and all other windows provide an insets frame
smaller than the window's frame. This is a regression caused by the
flexible insets change.

If the window provides both internal insets and the content insets, both
of them will be deducted. A comment is added to the
provideInternalInsets to avoid the mis-use. There's a long term plan to
change the functionality of the provideInternalInsets. Will have it in
the follow-up patches.

Bug: 212221722
Test: atest DisplayPolicyTests
Change-Id: Ib9e414627992b46b1a1d0afa314ea180dfdbc4d6
2022-01-12 17:55:09 +09:00
Josh Wu
3b35b6ab08 Merge "Revert "Scribe in IMF: startStylusHandwriting & lifecycle 2/N"" 2022-01-11 13:47:41 +00:00
Josh Wu
9d0c8ce4f3 Revert "Scribe in IMF: startStylusHandwriting & lifecycle 2/N"
Revert "CTS for Stylus Handwriting lifecycle"

Revert submission 16281467-stylus-handwriting-lifecycle

Reason for revert: Breaks apisignaturetests

BUGID: b/213976598

Reverted Changes:
I7b066c284:Scribe in IMF: startStylusHandwriting & lifecycle ...
I7d672b150:CTS for Stylus Handwriting lifecycle

Change-Id: Ieec94ea525fdb45cf5316b4a331c2bf9882e1083
2022-01-11 08:35:33 +00:00
Taran Singh
5f2a1a7101 Merge "Scribe in IMF: startStylusHandwriting & lifecycle 2/N" 2022-01-11 03:25:10 +00:00
Ryan Lin
a07c844e38 Merge "Expose window type MAGNIFCATION_OVERLAY to AccessibilityService" 2022-01-11 02:16:39 +00:00
Taran Singh
44dc2805b5 Scribe in IMF: startStylusHandwriting & lifecycle 2/N
Introduce InputMethodManager.startStylusHandwriting(View) API
and IME lifecycle.

Bug: 203086136
Test: atest StylusHandwritingTest
Change-Id: I7b066c2841b713e7a00ae2ea4ca0ce04aad751c6
2022-01-10 19:09:55 +00:00
Derek Sollenberger
2474c831d7 Reland "Enforce that RuntimeShader is only hardware accelerated"
Throw an illegal argument exception any time a Paint with
a RuntimeShader is attempted to be drawn into a software
canvas. Also mark that a Picture that uses a RuntimeShader is
properly marked as requiring hardware acceleration.
These tests check that the use of RuntimeShaders trigger

Bug: 189102731
Bug: 201546136
Test: atest CtsUiRenderingTestCases:RuntimeShaderTests
Test: atest CtsGraphicsTestCases:RippleDrawableTest
Change-Id: I663e2bc06a3b475f0bb256ce6a9c00c6432ffa42
2022-01-10 18:00:19 +00:00
John Reck
46cff23420 Merge "Don't animate TextView marquee if not visible" 2022-01-10 15:31:42 +00:00
Arthur Hung
335de00f34 Merge "Update OWNERS for input relevant files" am: faf6041b60 am: a3204a2631 am: c724dc5050 am: 5a301480c8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938444

Change-Id: Ibbb54c894cd2c0c49b2dfd63ddee9ee94f8aa72a
2022-01-10 13:43:51 +00:00
Arthur Hung
5a301480c8 Merge "Update OWNERS for input relevant files" am: faf6041b60 am: a3204a2631 am: c724dc5050
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938444

Change-Id: Iad762e2d826420da5da0b5d184864a0ba627330b
2022-01-10 13:27:39 +00:00
Arthur Hung
faf6041b60 Merge "Update OWNERS for input relevant files" 2022-01-10 12:30:33 +00:00
Leon Scroggins
a8693ecd42 Merge "DisplayManager: Add an API to query for DISPLAY_DECORATON" 2022-01-07 17:11:47 +00:00
TreeHugger Robot
413e92ac19 Merge "Fix flaky test WindowInputTestsi#testTrustedOverlapWindow" into sc-v2-dev am: 651343388f am: cfa5c420e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16544958

Change-Id: I59a4af69db4c0b9bf0e906cb56f5304dc2af37ea
2022-01-07 15:15:13 +00:00
TreeHugger Robot
cfa5c420e3 Merge "Fix flaky test WindowInputTestsi#testTrustedOverlapWindow" into sc-v2-dev am: 651343388f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16544958

Change-Id: I4001fabda75da2bfc2da66eb7692cc021078e549
2022-01-07 15:02:02 +00:00
Leon Scroggins III
c66a2ac732 DisplayManager: Add an API to query for DISPLAY_DECORATON
Tunnel through SurfaceControl to determine whether the HWC has this
capability. This allows clients (i.e. SystemUI) to know whether they can
use Composition.DISPLAY_DECORATON. If so, they may want to render
differently (i.e. in A8). See Ib948c38ee189877eda675a6342cb70099f66122b
for an example.

Bug: 193170859
Test: manual
Test: TODO
Change-Id: I9904452b6408199bb1f86de9e21132e4d4444e1a
2022-01-07 09:41:01 -05:00
Arthur Hung
6c1c224661 Update OWNERS for input relevant files
Bug: 189241600
Change-Id: I3f6ab682578d379d576682de632374882f66d761
2022-01-07 14:24:22 +00:00
Bill Yi
6042a19c72 Merge sc-qpr1 to aosp-master - DO NOT MERGE
Merged-In: I90ca5ccbf686a975f479c2488ff34f82af12946a
Merged-In: I128f5ed6c1bad350ea449bba5da21123de3ea31b
Change-Id: Ib18c8042f735dceeee5e6ab9f1c963cf630913a6
2022-01-06 18:38:32 -08:00
Daniel Hsieh
53d247ace8 Merge "Support following typing foucs in window mode [2/n]." 2022-01-07 02:27:49 +00:00
Arthur Hung
7ed2d03fdb Fix flaky test WindowInputTestsi#testTrustedOverlapWindow
When disabling batching input, we should post the action to consume
batched events to prevent it would be handled before current event.

Bug: 189241600
Test: atest WindowInputTests --rerun-until-failure
Change-Id: I87aaa2574a27368f88df1aba3f2eb769a8e8f36b
(cherry picked from commit a0ef47223c)
2022-01-07 02:22:28 +00:00
sallyyuen
53e449951b Replace drag & drop constants with finalize ids
Bug: 197520937
Test: builds
Change-Id: I05ec8a7e119288e13e0c670e88323743238397c4
2022-01-06 16:36:15 -08:00
Vishnu Nair
dfea9ff5d0 Merge "SurfaceView: Synchronize visibility changes with VRI frame" 2022-01-06 19:00:13 +00:00
Joanne Chung
93cbc8aa8e Merge "Refine FloatingToolbarPopup to allow multiple implementations" 2022-01-06 11:55:30 +00:00