Commit Graph

19721 Commits

Author SHA1 Message Date
Zeyin Wu
ecac954e78 Merge "Update rate limit APIs naming." 2022-12-05 17:12:30 +00:00
Marc Kassis
8b6d1169dc Merge "Each Display Mode now has an array of supported HDR types" 2022-12-05 13:45:23 +00:00
TreeHugger Robot
c76b8474a1 Merge "Remove the usage of givenContentInsets for non-IME windows" 2022-12-05 11:20:43 +00:00
Marc Kassis
643cd12ae7 Each Display Mode now has an array of supported HDR types
Bug: 241349060
Test: atest android.display.cts.DisplayTest
Change-Id: I3c5b9fb25cd79497be1acded366d1b4cf85e1daf
2022-12-05 08:17:32 +00:00
Daniel Norman
0e2e7033f0 Merge changes from topic "a11y-motion"
* changes:
  Introduce AccessibilityService#onMotionEvent()
  Add a new @TestApi to inject InputEvents to the input filter.
2022-12-03 04:49:34 +00:00
Chris Li
70dfdac013 Merge "Provide startBounds for closing container with legacy transition" into tm-qpr-dev am: 1bf14bee43 am: e681471300
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20543368

Change-Id: I250875900e8a527512309d9450782fe8f4cf88fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 03:46:53 +00:00
Chris Li
e681471300 Merge "Provide startBounds for closing container with legacy transition" into tm-qpr-dev am: 1bf14bee43
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20543368

Change-Id: I748c5be3bd210ed9c52cdf282dbebf2c9fd8fccb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 03:11:14 +00:00
Chris Li
1bf14bee43 Merge "Provide startBounds for closing container with legacy transition" into tm-qpr-dev 2022-12-03 02:26:52 +00:00
Zeyin Wu
921d6d3701 Update rate limit APIs naming.
Bug: 260811959
Test: ran cts tests
Change-Id: Ia4f1f3c175d350e04925526f0755390a9f42c706
2022-12-02 22:55:54 +00:00
Daniel Norman
83e20e8637 Add a new @TestApi to inject InputEvents to the input filter.
This is used by end-to-end tests exercising the input filter for generic
motion events.

Bug: 247550565
Test: atest AccessibilityEndToEndTest, using the dependent change topic
Change-Id: I2695ecb3919d8336dc3f6df1a525a53d84c03fec
2022-12-02 11:30:28 -08:00
Chavi Weingarten
129a1053d2 Merge "Make count for numSyncsInProgress static" 2022-12-02 14:09:21 +00:00
Chris Li
62f0464d29 Provide startBounds for closing container with legacy transition
Before, we only provide startBounds when the animation target is
MODE_CHANGING, with which we won't know the start bounds for target that
is closing while resizing.

Now, we provide startBounds for all targets, so that we can use it to
provide seamless animation when the target is closing while resizing.

Also make sure the closing container's surface is in the start bounds
before the animation starts to avoid any flicker.

Bug: 241043533
Test: Verify with switching between split and stack.
Change-Id: I4d8e1ee44d418249dcb434425c7ab3d63a429bad
2022-12-02 05:01:02 +00:00
Chavi Weingarten
c96fbf2287 Make count for numSyncsInProgress static
numSyncsInProgress is used to keep track of how many syncs VRI has
started to ensure it can disable RT Animations and then enable at the
end of the sync. This needs to be global across the process because RT
Animations config is global to the process. This means if there are any
VRI's in a sync across the process, we need to keep RT Animations
disabled until the end of all of them.

Test: Sync works
Bug: 237804605
Change-Id: I6304061f564ceea9de08331d7ee48834ad3c828b
2022-12-01 19:52:04 +00:00
Naomi Musgrave
e6c2a39fae Merge "WMS retrieves uid for the package based on the linux user" into tm-qpr-dev am: 1549391e56
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20551446

Change-Id: Idfa3baef2065b19ecb8f2165f147cf487a96017f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 18:08:05 +00:00
Naomi Musgrave
2f88f7a9d8 WMS retrieves uid for the package based on the linux user
Without this, checking if the caller is the recents component always
fails on the secondary user.

Bug: 255480931
Test: atest WmTests:WindowManagerServiceTests
Change-Id: Iac9fea3935c3aadf29a21d8af715df845e8ea43c
Merged-In: Iac9fea3935c3aadf29a21d8af715df845e8ea43c
2022-12-01 17:23:43 +00:00
Shawn Lin
ae07cf71f5 Merge "Support DisplayShape" 2022-12-01 07:34:39 +00:00
TreeHugger Robot
2d1f59db15 Merge "Revert "Don't swallow exceptions"" 2022-11-30 19:17:01 +00:00
Krishang Garodia
1276be908e Revert "Don't swallow exceptions"
This reverts commit 36a47145c6.

Reason for revert:
MediaProviderTests failures

Bug: 260297790
Change-Id: I1b7ab711989578e009bac353b7a0cbe42fbfb3c8
Test: atest MediaProviderTests
2022-11-30 14:54:25 +00:00
Naomi Musgrave
4e530d3bc6 WMS retrieves uid for the package based on the linux user
Without this, checking if the caller is the recents component always
fails on the secondary user.

Bug: 254937640
Test: atest WmTests:WindowManagerServiceTests
Change-Id: Iac9fea3935c3aadf29a21d8af715df845e8ea43c
2022-11-30 10:55:19 +00:00
Vladimir Komsiyski
79ffdd3932 Merge "Add a display flag for maintaining its own focus and touch mode." 2022-11-30 09:10:25 +00:00
TreeHugger Robot
4c2d3f65ef Merge "Fix deadlock" 2022-11-29 19:10:42 +00:00
Sally Yuen
77eb98c8ac Merge "Expose more SystemAPI methods on AccessibilityDisplayProxy" 2022-11-29 16:36:27 +00:00
Vladimir Komsiyski
702275586e Add a display flag for maintaining its own focus and touch mode.
This basically duplicates the behavior of config_perDisplayFocusEnabled
but via a display flag instead of globally for all displays. The display
must be trusted for the new flag to be set.

This is particularly needed for virtual devices and displays with
navigation-type inputs, for which touching the default display will
cause everything to enter touch mode and therefore the currently focused
view would lose focus.

Bug: 233911853
Bug: 256810557
Test: atest DisplayManagerServiceTest
Test: atest WindowManagerServiceTests
Change-Id: Ie1c3b8a42f512530bf0ce3fabc56f0da236a311c
2022-11-29 14:20:40 +01:00
Shawn Lin
2742c68f6c Support DisplayShape
Provide APIs to query display shape information:

- Added a DisplayShape class which provide a Path.
- Added a new API in Display to get the DisplayShape based on the
  display coordinates.
- Added a new API in WindowInsets to get the relative DisplayShape
  based on the window frame.

Bug: 236935288
Test: atest DisplayShapeTest LocalDisplayAdapterTest WindowInsetsTest
      InsetsStateTest DisplayPolicyLayoutTests DisplayPolicyTests
      WallpaperControllerTests
Change-Id: I7aacfcae42203d3f57cd577da5a69180f66780ad
2022-11-29 15:48:50 +08:00
Shawn Lin
cddf907e07 Merge "Fixed test failures of WindowTest" 2022-11-29 03:26:21 +00:00
sallyyuen
111ef0b932 Expose more SystemAPI methods on AccessibilityDisplayProxy
These are:
- onProxyConnected (equivalent to onServiceConnected)
- onAccessibilityEvent
- onInterrupt
- getWindows
- set/getInstalledAndEnabledServices

Connect the proxy client (IAccessibilityServiceClient) to a
proxy service connection
(ProxyAbstractAccessibilityServiceConnection) in ProxyManager,
so the A11yDisplayProxy can access the UI.

AccessibilityServices run on their own thread. To avoid using the
app's main thread, the app that registers the A11yDisplayProxy
can call it on a different thread. Add a note in the proxy class.

Future TODOs (b/254545943):

The a11y state returned to A11yManager includes state
of all proxies and AccessibilityServices.
Separation will require AccessibiilityManager to go from being a
process singleton to a per-display instance.

Input and a11y focus are singletons and may
shift between a proxy display and a display on the device.
Separation will require future changes.

ProxyManager behaves more like UiAutomationManager,
and centralizes proxy management. Separation into different user
states will require future refactoring.

Bug: 241429275
Test: atest AccessibilityDisplayProxyTest,
AccessibilityManagerServiceTest, manual test app that
registers/unregisters A11yDisplayProxy

Change-Id: I830c6613c2c2f8abcc2343c5110f4e7b7494fb0e
2022-11-28 13:07:14 -08:00
Shawn Lin
6f7e60ed8c Fixed test failures of WindowTest
When cutout mode is always/shortEdges and the system window insets are
consumed, the cutout isn't consumed and is inset to an empty cutout
which causes the test failure.

We should also consume cutout when the system window insets contain
cutout and are consumed.

Bug: 253995206
Test: atest WindowTest WindowInsetsTest DecorInsetTests
Change-Id: I8a4fd56675509cc27dfa91de1138458fb1e7b0f0
2022-11-28 08:48:53 +00:00
Michael Wright
1c1d459e04 Add additional pointer state to input dumpsys
Bug: 254277939
Test: manually inspect `dumpsys input`
Change-Id: I3931187638b4c54ff90be9bc3b01a1edc442d49b
2022-11-25 00:22:23 +00:00
Yunfan Chen
77a0bd8899 Remove the usage of givenContentInsets for non-IME windows
Currently, no insets is calculated based on contentInsets and other
fields set in WindowState when the InsetsFrameProvider is given. It is
safe to remove the calculation for windows other than IME.

The fields in WindowState, including touchableAreaInsets, visibleInsets,
contentInsets is a description of the window itself, instead of the
insets it providing to other windows. Such that, we can remove the
consideration of those fields for most cases.

Bug: 202360061
Test: DisplayPolicyInsetsTests
Change-Id: Ie127f4655ed923545dede16ebc615dbf8384d34a
2022-11-24 17:02:28 +09:00
TreeHugger Robot
4e1d9153a8 Merge "Don't swallow exceptions" 2022-11-24 00:22:03 +00:00
John Reck
7fb2891673 Fix deadlock
mSurface.destroy() may block on a HardwareRenderer if lockHardwareCanvas
is used. mSurfaceControlLock is also used on the RenderThread, so it cannot hold that lock when potentially calling into HardwareRenderer as this is a deadlock risk.

Fixes: 244616968
Test: guess
Change-Id: Iedb6f3ce80f47a67b4427550f27851c3b9e3e242
2022-11-23 21:18:25 +00:00
John Reck
36a47145c6 Don't swallow exceptions
Fixes: 260244068
Test: App in bug crashes with IAE
Change-Id: I358ecf4309d82c609863b7f4d8d3d687b7c51f4b
2022-11-23 21:15:13 +00:00
Zeyin Wu
068c438db5 Merge "Remove redundant constants for content change rate limiting." 2022-11-22 18:31:45 +00:00
Sally Qi
d2fbea3097 Merge "Plumb overlayPropertes into DMS side." 2022-11-22 18:20:49 +00:00
Zeyin Wu
16cc390d7c Remove redundant constants for content change rate limiting.
Bug: 222759137
Test: ran cts test
Change-Id: I559f1a638aca92ee97865e31ad5c557eb3992bad
2022-11-21 20:50:37 +00:00
Zeyin Wu
3f9671444d Merge "Add new APIs for initial accessibility focus setting" 2022-11-21 18:55:16 +00:00
Harry Cutts
fe0d69d064 Merge "Make MotionEvent#obtain with classification public" 2022-11-21 15:41:52 +00:00
TYM Tsai
505ca4454b Merge "Fix prefill request is blocked waiting for an inline request." 2022-11-18 22:04:52 +00:00
Chet Haase
3fe124cd7f Merge "Fix activity leak bug" 2022-11-18 18:55:52 +00:00
Harry Cutts
2a17fe6dc8 Make MotionEvent#obtain with classification public
Bug: 257028305
Test: run presubmits
Change-Id: I53d2925033bb3a51751fcf00fc32cb862062d52c
2022-11-18 14:34:20 +00:00
Jon Eckenrode
706b10d642 Merge "Revised description of the PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE field." 2022-11-18 13:25:48 +00:00
TreeHugger Robot
0736dfb9f0 Merge "Send HWUI load reset hint when Choreographer registers a callback" 2022-11-18 03:27:19 +00:00
Zeyin Wu
30c9a9f093 Add new APIs for initial accessibility focus setting
Bug: 255189088
Test: ran cts tests
Change-Id: Iaf5f863f22c4263be2cb2687ede566939e630d2b
2022-11-18 00:10:01 +00:00
Ameer Armaly
96f419762b Merge changes from topic "overlay"
* changes:
  Create  display accessibility overlay API.
  Expose SurfacePackage#getSurfaceControl
2022-11-17 22:53:34 +00:00
Jon Eckenrode
0171b771cb Revised description of the PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE field.
Test: Built API docs
Change-Id: Ib918f95d20ff83cf9368732a6444eda68cd9a174
Signed-off-by: Jon Eckenrode <joneckenrode@google.com>
2022-11-17 21:52:05 +00:00
Matt Buckley
d98e8054f3 Send HWUI load reset hint when Choreographer registers a callback
Send a load reset hint hint to DrawFrameTask through ThreadedRenderer
from ViewRootImpl whenever Choreographer registers a callback. This
allows the PowerHAL to allocate more resources for HWUI in response to
upcoming work, helping prevent frame drop.

Bug: b/243938267
Test: manual

Change-Id: Ie2cf809cf85530af04f4d0db3407853d4da03d62
2022-11-17 20:37:08 +00:00
Sally Yuen
2f1ce12336 Merge "Add to AccessibilityEvent#TYPE_ANNOUNCEMENT with suggestion to avoid using it." 2022-11-17 20:08:25 +00:00
TYM Tsai
78bdebcf6a Fix prefill request is blocked waiting for an inline request.
When asking the IME for an inline request, the IME will check if the
autofill id of the target view matches the id of the current IME served
view, otherwise the IME does not respond inline request to the Autofill.
When an activity starts, the id of the IME served view is reset to 0.
And the target view, Autofill used to do the pre-fill request is the
root view, sometimes its id is not 0. Then the request is blocked to
wait for an inline request because autofill does not have a timeout
mechanism.
To resolve this issue, use AutofillId.NO_AUTOFILL_ID to make sure the
id of the pre-fill request is 0.

Also this change remove the duplicate code about the
notifyViewEnteredLocked for normal view and virtual view.

Bug: 258532947
Bug: 253180120
Test Manual
Test: atest CtsAutoFillServiceTestCases

Change-Id: I6962ab6d844fd8b7c9ba778ac40630586ef73c39
2022-11-18 01:13:23 +08:00
Ziqi Chen
52ba9d8c89 Merge "Fix TextAppearanceInfo related APIs" 2022-11-17 14:29:30 +00:00
Sally Yuen
827ae4da93 Add to AccessibilityEvent#TYPE_ANNOUNCEMENT with suggestion to avoid using it.
Bug: 244788390
Test: n/a
Change-Id: I1a9300fb70e0e9b35dd7f1b07686cad00c2ac9a2
2022-11-16 16:31:42 -08:00