Create a WM API that gives access to the letterbox background color and
checks for the multi-colored case (e.g. blurred background) for status
bar treatment
Fix: 238637307
Test: atest WmTests:WindowManagerServiceTests
Change-Id: I644c8fa36f20f4d11414a998396bb066f1a36a28
If user applied a back gesture but core cannot find a focus window,
inject back key event, so that event can dispatch to client once it
gain focus window. And since the gesture was happened, treat it as
onBackPressed.
And if device is playing recents animation but the focus window is
point to live tile, we can also inject back key because Home/Recents
activity shall not have the same behavior as normal app.
Bug: 237629607
Test: cross test that back gesture can finish recents with legacy/shell
transition on Nexus/3rd launcher.
Test: test on BackTestApp for both 3btn mode and gesture mode.
Test: atest AnrTests BackNavigationLegacyGestureTest
Test: atest OnBackInvokedDispatcherTest KeyboardVisibilityControlTest
BackInvokedOnWidgetTest BackNavigationTests BackNavigationControllerTests
Change-Id: If754e66ea7c1c4ec313c45d17d7f6c10bfc2c465
..used for signaling the launcher to crop the
remote animation target bounds when task animating on the taskbar.
If the task will show IME on the top means the animation taget would not
need to be cropped according to the taskBar insets, since visually the
taskbar is hidden when IME is visible.
Bug: 219981732
Test: manual as steps
0) enable taskbar with Settings > Developer options > Smallest width
as 600dp.
1) launch an app from all apps and show the IME by tapping the editor.
2) swipe out to home and launch it again by pressing the shortcut.
3) Verify the animating task preview with IME shown without being
cropped.
Change-Id: Iab526e78614c68626bd5424e0e3219044f671f4d
This reverts commit 0099ca8fab and provide
new mechanism.
The back invoke target could lost focus during back navigation gesture.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen the focus change of
current focused window and cancel back gesture when its focus has lost.
Bug: 238050065
Bug: 239792909
Test: atest BackNavigationControllerTests
Test: atest BackNavigationLegacyGestureTest BackNavigationLegacyTest
Test: atest BackNavigationTests
Test: atest WindowOnBackInvokedDispatcherTest BackNavigationTest
Test: atset BackAnimationControllerTest
Change-Id: I65eb19371020ce39977eeb2a2a80c7f08600aaec
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.
Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.
This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.
This is also a step to enable the client to perform local window layout.
Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
Catch the exception to avoid the system down.
Bug: 238417834
Test: atest CtsCaontentCaptureService
Change-Id: Ifacb91d9e961b71df0ac41690b952be981711870
Merged-In: Ifacb91d9e961b71df0ac41690b952be981711870
Previously, the client compares the requested visibility with the
source visibility to decide if it needs to play the insets animation or
not. However, the source visibility is not stable while the client is
gaining the control. If the source and the control come from
IWindow#insetsControlChanged, the source has the previous visibility. So
the client can detect the visibility change. If the the source and the
control come from IWindowSession#relayout, the visibility of the source
has been overriden by the requested visibility of the client. So the
client cannot detect the change and cannot play the animation.
This CL lets the client know the initial visibility of the control.
While gaining leash, the client can use the information to decide if
it needs to play animation or not.
Fix: 209064170
Fix: 238496738
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
InsetsControllerTest InsetsSourceConsumerTest
DisplayImeControllerTest
Test: 1. Enable shell transitions
2. Open camera.
3. Perform back gesture.
See if there is status bar animation.
Change-Id: I2c02e97e191ebd83238c0c54908e861d200d4c8d
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