System UI won't need to check if the gesture blocking activity is
running or not every time a task changes.
Bug: 229048429
Test: atest DisplayContentTests PermissionPolicyTest
Change-Id: I5a72121c8b20b172ea5c1d060960ce14a7420aa9
The back invoke target could lost focus during back navigation.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen focus changed and skip the
back invoke call.
Test: launch a trampoline activity and trigger back before next activity
shown.
Test: atest WindowOnBackInvokedDispatcherTest
Bug: 238050065
Change-Id: Ifd345b2283c5d07628e2884db6e4e13f3ec31e83
Since CL[1] migrate hide IME logic when quick switching split-screen
task to InputMonitor.
As a result, remove unused API since it would be no longer to
expose hideCurrentInputMethod for launcher to handle gesture.
[1]: Ibfcd48e623336c4690b71c4db0ce1ad8f5b26fc9
Bug: 166736352
Bug: 193990612
Test: manual test as steps
1) launch any apps with focusing an editor
2) from overview, select any app to enter split-screen mode
3) taping the editor to show the keyboard
4) swipe up to overview or quick switch app tasks
5) expect the keyboard will be hidden when starting the gesture.
Change-Id: I299c3ac8531fa28c68c997e44fb168819e85d465
- This type will be used in the cases where the app's UI overlaps with some system window or some other WindowContainer hosted by the system.
- Remove the LOCAL_NAVIGATION_BAR 1 & 2 as those are not required and GENERIC_SYSTEM_WINDOW can be used instead of those.
Bug: 232017511
Test: atest WindowContainerTests
Test: atest WindowOrganizerTests
Change-Id: I9d79f39a2a17cb5db4e56439399152a65621c41f
There's no need to findViewLocked - if the view
didn't already exist, then the view is added
to the end of the mViews list. findViewLocked
will need to iterate over all the views which
is unnecessary.
Test: manual
Fixes: 238954722
Change-Id: I3a22f59df84f512d4e914f0e3566927450284298
This reverts commit 8626ad35b1.
Reason for revert: Trying to reland
The previous patch may delay a configuration update caused by the task
bar change, and dispatch the update when something irrelevant happens
such as dragging an icon to the workspace. Changed logic in WMS and
WindowState to ensure a configuration update in that case.
Test: TaplTestsQuickstep#testAllAppsFromHome (With task bar)
Test: CtsWindowManagerDeviceTestCases (With task bar)
Test: android.view.cts.ViewTest
Bug: 224404595
Bug: 205496695
Bug: 228380863
Change-Id: Ib192d4ad012fed136f808b15a84f8d83ca426b21
For certain situations it's useful to know the exact activity that's
being hosted in the focused window when it changes, not just the package
name.
Bug: 237317934
Test: manual
Change-Id: I21ef229e9b29110957d9176357851720edc1f117
On larger screens, having the light z value lower down creates an
undesirable amount of shadow since the source to view angle can be quite
large. By scaling the z position of the source relative to the screen
size, we can avoid these extreme shadows.
Bug: 227425789
Test: run cts -t android.uirendering.cts.testclasses.ShadowTests --module CtsUiRenderingTestCases
Change-Id: I8b7a3fcf93daaa565256a08f38deffed74b24ad4
It's possible for close to be called during local cleanup concurrently
with the remote call.
A recent change (ag/15993920) added a missing Binder.unlinkToDeath
call to close(). This now causes a crash now if the registration
was removed at just the right time in another thread. This synchronizes
access to close() to avoid this.
Bug: 237406501
Test: atest ScrollCaptureConnectionTest
Change-Id: I0126bfac1efdece2e4eff144a44f29a963553b74
This is to let the insets provider provide a different size to the given
windowing typed window. This can completely replace the ime frame
provider and the old ime frame provider is migrated.
Test: The task bar can still provide correct IME insets
Test: DisplayPolicyInsetsTests
Test: WmTests
Bug: 225200928
Change-Id: I5f8c4462cdc48011efda908e0337a86cbf2a417f
Follows the same exact pattern as the window attach and window focus
listeners in the same class.
Bug: 235403546
Test: Verified as part of follow-up systemui CLs
Change-Id: I7c825baf5913e6e0b85f475503639a4d17483d4e
When adding a window to WMS, its z-order may be higher than IME
initially. And then, WMS will move IME to the top of the new window.
Although IME is invisible during launching an app, that causes a change
in WindowState#mAboveInsetsState. And it would trigger a redundant
onApplyWindowInsets at the client side.
This CL treats null IME source as invisible IME source in
InsetsState#equals when excludeInvisibleImeFrames is true.
Bug: 237749017
Test: Add logs in dispatchApplyWindowInsets, and see if it gets printed
twice while launching an app.
Change-Id: I5eba7732619f7ceebe3152e81037a43e9ab3d91f
When a child SurfacePackage is set on a SurfaceView, the view's
RemoteAccessibilityController calls linkToDeath on the SurfacePackage's
IAccessibilityEmbeddedConnection. The death recipient -- the controller
itself -- is unlinked when the Surface is destroyed -- being notified
through a SurfaceChangedCallback registered on the ViewRootImpl.
There are 2 issues there:
* When the SurfaceView is detached, the SurfaceChangedCallback is
unregistered, so the unlinkToDeath never happens.
* The Surface holding the SurfaceView may never be destroyed, for
example in the case of the IME.
SurfacePackages sent over ipc seem to be used in only 2 places
currently:
* For inlined autofill suggestions in the input method. This bug causes
a serious leak here, since the memory is held in 2 persistent
processes -- autofill Session data in the system server (referenced
from the SurfaceViews), and SurfaceViews in the IME.
* The Wallpaper app.
For now, this is fixed by using a WeakRef for the
RemoteAccessibilityController. The root cause will be fixed in a
followup change in a later release.
Fix: 183402294
Test: manual:
* atest CtsAutoFillServiceTestCases:InlineLoginActivityTest\
--iterations 5
* Force gc: adb shell kill -10 $(adb shell pgrep ext.services mockime\
system_server -d '\ ')
* Rerun that a couple of times so the binder objects get cleared.
* Check for leaks of autofill.Session in system_server and
SurfaceViews or RemoteAccessibilityEmbeddedConnection in
com.android.cts.mockime.
Change-Id: I5447b173313919507969872bdeb7ff3038152c23