Sometimes users can have sensitive information in IME window, such as
predictions or custom background.
If app could create a virtual display with system decorations support,
the security leak may happen that app can read the text or image from
the surface.
Add a check if the display is trusted that owned by system
When showSoftInput requested, if the display is not trusted then
show IME on default display.
Note that we also modified ImeDisplayValidator to use dedicated API
IWindowManager#shouldShowIme for checking if IME support on a display.
(And add it as @TestApi for CTS to verify)
Fix: 129443632
Fix: 129881992
Test: atest MultiDisplaySystemDecorationTests
Change-Id: Icfd66689dad4b782c50b56a515194dd138d3b280
* Make it persist.hwui.force_dark so the dev option
survices reboots.
* Remove the internal super-override behavior it applied
using only the intended ViewRootImpl theme-aware behavior.
Fixes: 127350499
Fixes: 130354206
Test: set dev option, verified nothing went dark. Set dark
theme, verified non-dark apps were force-darked. Rebooted
and verified property still set.
Change-Id: I43adcbc25320669510fb03b162c98cbd14612f55
In legacy multi-display mode with at most two physical displays,
physical display IDs reduce to the port IDs for the internal and
external connections.
This CL instantiates a DisplayAddress.Physical whose getModel method
returns null, such that port-dependent logic (e.g. display settings
and input association) works on legacy systems without EDID support.
Bug: 130672828
Test: dumpsys display
Change-Id: I12a40078c5e3666e59283623ec600e8d76493359
Previously, there was only a way to inject input after syncing inputs.
However, some tests require a direct call to sync inputs since we need
to ensure the info was propagated to InputManager native before
continuing with the test. This exposes a method just to
syncInputTransactions.
Bug: 130695122
Test: ActivityLifecycleTopResumedStateTests
Test: MultiDisplayPolicyTests
Change-Id: Ie3115741a20d04c743fd854ac421dc3705332488
As of today we register Ime consumer in IMM onWindowGainedFocus().
However, it does nothing functionally when ViewRootImpl#sNewInsetsMode is disabled.
This CL adds a check to not register consumer at the first place.
This may also be causing a leak. Added a TODO to revisit that before we
enable the flag.
Bug: 131181940
Test: atest ViewRootImpl
Test: atest InsetsController
Change-Id: I6b2b62d10670d63edafeb1b24c25b26c7721f3ad
In order to dismiss dialog in accessibility, we would also send
ACTION_OUTSIDE while performing ACTION_CLICK. However, the result
of performing ACTION_CLICK in AccessibilityInteractionClient may
be overwritten by the result of performing ACTION_OUTSIDE. This
causes that TouchExplorer may get incorrect result and follow-up
behavior is different.
Bug: 127902192
Test: a11y CTS & unit tests
Test: After enabling Talkback, manually test on 'View Terms' page
in ManagedProvisioning to check if the section heading can
be expanded/collapsed by double tap.
Change-Id: Id6b1f63ea87418c66bf1aebdea829f656581e8ed
When running cancel animation for drag shadow image, the system cannot
start another drag operation, which is problematic when the system would
start the other drag operation quickly.
Bug: 130313958
Test: Cancel drag operation by calling cancelDragAndDrop
Change-Id: I5d6650a0ce9a4cd80bbdb1beabc9e514349ccadc
A follow up change of ag/7058048.
Also fixed a wrong nullability annotation, ConversationActions.getHints
should be @NonNull.
Bug: 129344540
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/
Change-Id: Iae734b4b27dd3dd8294684330bec198072693a57
variants
Updated various framework Views to have equivalent BlendMode APIs
to replace the deprecated PorterDuff equivalents.
Updated InspectableProperty annotations to refer to the same
xml attributes as the original tintmode APIs
Bug: 126726419
Test: Added CTS tests to verify new BlendMode APIs
Change-Id: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
Merged-In: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
This reverts commit 44f5215ee8.
Reason for revert: <Make Ime test in SystemDecorationTest failed>
Bug: 130715649
Change-Id: I9afb1d5ee7e7a4f1e7de6fa4c7c3ec5dcc336f08
Property methods to get/set gesture exclusion rects for a window.
This is useful for games or other frameworks that use Window#takeSurface
and do not have a view hierarchy, leaving the associated View methods
unavailable.
Bug: 130572780
Test: cts via "atest SystemGestureExclusionRectsTest"
Change-Id: I2704aef1d1950158fcabf7c91413bedee08b8971
Also removed ContentCaptureClient, which is not used anymore (it probably became obsolete with the
ContentCaptureOptions optimization).
Fixes: 130585342
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.augmented.AugmentedLoginNotImportantForAutofillActivityTest
Test: manual verification with Dialer app
Change-Id: I041922874fac749f1f5d49793f1ad3e26cc345d6
As per the suggestion from API council, we now have a subclass for event
of each category.
Bug: 129344540
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/
Test: atest frameworks/base/packages/ExtServices/tests/src/android/ext/services/notification/SmartActionsHelperTest.java
Change-Id: Ic43b33c2176447c40e64bd0e410e906d5fb9c4cc
All requests / result objects from TextClassifier have get/setRequest,
so ConversationActions.Request should have them as well.
BUG: 130529981
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/ConversationActionsTest.java
Change-Id: I19719b009d4f34df8650c669cc24cb304293407a
To fix the issue that mContext is not updated when moved to another
display, we previously introduce mDisplayContext as a workaround in [1].
Change to use Context#updateDisplay(int) to unify mDisplayContext to
mContext.
[1]: Ifa0ca24e9cf764caf492ee065606680b6a06751a
Bug: 116349163
Test: atest ActivityManagerMultiDisplayTests
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest InputMethodManagerTest
Test: atest InsetsControllerTest
Test: atest InsetsSourceConsumerTest
Test: atest ImeInsetsSourceConsumerTest
Test: atest CtsActivityManagerDeviceTestCases:MultiDisplayClientTests
Change-Id: Ic2010e8b533caf01418e0deb8062b8ff597c5abc