This eliminate the limitation of rotation animation that it could
only have one instance for display. Now the rotation animations
can be tracked by them self so there could have multiple instances
run at the same time, such as for multiple display or individual
child window container.
The first usage is: (also see commit d16620e)
The fixed rotation transform of activity is canceled so display
doesn't have rotation change but the activity has. Then only the
activity needs to animate.
Bug: 223397858
Test: adb shell setprop persist.wm.debug.shell_transit 1; reboot
Enable auto rotation. Launch an app without fixed orientation
from portrait launcher while device is in landscape. Before
the launch animation is done, rotate the device to portrait
(there is no display orientation change). The launched app
should rotate from landscape to portrait without flickering.
Change-Id: Ic47960e812f07365965df4ab2913e2003289a315
- We were previously initializing components manually because some startup
is order-dependent, which led to an increasing number of dependencies
from ShellTaskOrganizer on things that it really doesn't need to know
about. The initialization order actually matches the dependency order
pretty closely, so instead we can have these components add callbacks
in the order they are created and initalize in sequence.
- Also move some logic out of constructors to the init callback
- The other subtle issue is that the provider for ShellInitImpl was
implicitly also ensuring that certain shell components were created at
startup (since they aren't otherwise referenced by any SysUI component
directly or indirectly). Instead, separate that out into another
more explicit provider, with the @ShellCreateTrigger annotation, and
allow subclasses to provide a @ShellCreateTriggerOverride annotated
provider for product-specific initialization
Test: atest WMShellUnitTests
Test: atest SystemUITests
Bug: 238217847
Change-Id: I4a2583ceeaf469130ac07fc8c4e267c28843b7b8
Signed-off-by: Winson Chung <winsonc@google.com>
Split screen evicts the original pairing task after drag-n-drop a
shortcut into split. Launching a shortcut into the same task, it'll
dismiss the split due to one side of the split being empty.
This CL evicts the non-opening child tasks only to pevent one side of
the split being empty.
Bug: 235027308
Test: 1. Launch App1 and drag Settings' shortcut (Wi-Fi) to split
2. Launch Settings' shortcut (Data usage) to split screen
Change-Id: I9f6ea82759a7f73f6f7f4b2617dd7b5dbb9eeb38
We can receive notification updates for the not active user. Ensure that
we do not pop up a bubble in these case.
Store the notification key for these notifications in saved bubble data
for the user that should get this bubble. When changing user back to the
user that should get the notification, bubble will get restored as well.
Bug: 237314340
Test: atest BubblesTest
Test: Enable bubbles for incoming SMS in Messages app. Switch to
secondary user. Get incoming messages and observe that they do not
result in a bubble. Switch back to primary user and observe that bubbles
are shown for SMS that came in.
Change-Id: Ifcabb8458c72edc06f8cff844ac5e2266f5387f9
When the transition is ready on shell side, the core may be still
running surface placement. Then it may easily meet lock contention
when setting the animating state for the animation player process.
This change moves the animation delegate to TransitionController.
It can recognize the delegate process if the remote animation is
specified from ActivityOptions. So when shell is calling
setRunningRemoteTransitionDelegate, it can just check if the process
is handled without entering WM lock.
The case of using TransitionFilter may still encounter contention
the remote registrations only exist on shell side.
Also add a quick check at shell side to skip the IPC if the app
thread of remote animation is null. Such as when launching from
quick settings that the remote is actual the local process.
Bug: 235323163
Test: atest TransitionTests#testRunningRemoteTransition
Change-Id: I137fcdff3cb5658aad5f7452c33bbc8d70f42398
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
This CL adds app icons for launched/running apps to the Launcher
taskbar hotseat. When the activity is closed, the app icon is
removed. The apps that are added to the taskbar on boot are never
removed.
Recall: http://recall/clips/ad6d3cfc-7358-4b37-846e-de843ad3000d
Bug: 183906774
Test: Launch an app and verify the app icon is added on the taskbar.
Close the app and verify the icon is removed from the taskbar.
Test: Switch navigation modes on the emulator and ensure that running
app icons are added to the taskbar after it is reinitialized.
Test: atest NexusLauncherTests:com.android.quickstep.RecentTasksListTest RecentTasksControllerTest
Change-Id: I2c839b6f35310d2d0fa98cc8d4a432eb1163861d
Merged-In: I2c839b6f35310d2d0fa98cc8d4a432eb1163861d
1. Set initial values to the fields.
2. Also listen to onDisplayAdded for the case that only the
onDisplayAdded is being called after reboot.
Bug: 220884764
Test: 1. Go Settings > System > Developer option > Display cutout
2. Select Rednder apps below cutout area
3. Reboot device
Change-Id: I35ba3dcebcded19373901b88f7bb208633587392
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
This change ties the window decoration lifecycle to shell transitions if
it's enabled, so that we can leverage the new transition handler to hand
over window decorations.
This change exposes the transfers of management of tasks to task
listeners to implement maximizing. Eventually I want to use it to
implement the passover of window decorations across listeners.
This change lets freeform code handle maximizing transitions because
there isn't anything special to do for fullscreen tasks with window
decorations so we can keep FullscreenTaskListener simple.
Currently all animations related to freeform tasks are jumpcuts because
there isn't any spec defined.
Bug: 205580520
Test: Open, close, maximize freeform tasks with the shell transition and
the caption in shell enabled.
Test: atest WindowDecorationTests
Change-Id: Ie7bb92e0b5946b006fa685f4438815627c72dffe
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