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
Add a new field EditorBoundsInfo in CursorAnchorInfo
and implement it.
Bug: 203086136
Test: atest CurosrAnchorInfoTest
Change-Id: I7f225fa1236534bbd18920f8ce8293df23ea2ce7
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
Create a BatchedInputEventReceiver that makes it easier to return
whether an event was handled.
Bug: 162194035
Test: build
Change-Id: I8d597189b786db6bb61f1d838a530cc573a42238
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
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)
We just need to forward the WindowSession call to the internal
method we already support.
Bug: 213603716
Test: Existing tests pass
Change-Id: I692d321a96b5278c75bceb14d5b38459d360b4b9
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
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
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
Introduce InputMethodManager.startStylusHandwriting(View) API
and IME lifecycle.
Bug: 203086136
Test: atest StylusHandwritingTest
Change-Id: I7b066c2841b713e7a00ae2ea4ca0ce04aad751c6
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
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
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)