Commit Graph

4917 Commits

Author SHA1 Message Date
Riddle Hsu
f5e71fb84a Merge "Support shell rotation transition on general window container" into tm-qpr-dev am: b27282acb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19498810

Change-Id: I4e8033474aec8a51cb7ca5f8de1d9c5faefdb4fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 13:33:24 +00:00
Riddle Hsu
b27282acb5 Merge "Support shell rotation transition on general window container" into tm-qpr-dev 2022-08-03 13:09:54 +00:00
Riddle Hsu
0165c9e7f3 Support shell rotation transition on general window container
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
2022-08-03 07:25:19 +00:00
Winson Chung
f6af8225a8 Merge "3/ Fix inverted ShellInit dependency order (no functional changes)" into tm-qpr-dev am: 19aa091129
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19215131

Change-Id: I0220a85b35244d42a888477f7c11e3da7f8e4894
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 23:04:01 +00:00
Winson Chung
19aa091129 Merge "3/ Fix inverted ShellInit dependency order (no functional changes)" into tm-qpr-dev 2022-08-02 22:56:44 +00:00
Winson Chung
91a416bae9 3/ Fix inverted ShellInit dependency order (no functional changes)
- 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>
2022-08-02 18:15:40 +00:00
Wei Sheng Shih
23c3dd0294 Merge "Inject back key events if no focus window found." into tm-qpr-dev am: 117bab591c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19144840

Change-Id: Ifcb3e44f8ccf21dde71a7663058380a0ca117aa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 11:56:11 +00:00
Wei Sheng Shih
117bab591c Merge "Inject back key events if no focus window found." into tm-qpr-dev 2022-08-02 11:40:59 +00:00
TreeHugger Robot
15bbf46b60 Merge "Do not evict starting task when startShortcut" into tm-qpr-dev am: 8a1fa44759
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19448394

Change-Id: I1657690cb90d08d8edbd52f4102571b41ca9b39e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 03:20:23 +00:00
TreeHugger Robot
8a1fa44759 Merge "Do not evict starting task when startShortcut" into tm-qpr-dev 2022-08-02 03:06:36 +00:00
TreeHugger Robot
99fc903bdc Merge "Ignore notification update for not active user" into tm-qpr-dev am: 7fb9bfccb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19380662

Change-Id: I9e07f79b336814ab4907f2a7f443e7756479c8a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 18:48:33 +00:00
TreeHugger Robot
7fb9bfccb6 Merge "Ignore notification update for not active user" into tm-qpr-dev 2022-08-01 18:23:53 +00:00
Riddle Hsu
97f7858bb1 Merge "Reduce lock contention of setting running shell remote transition" into tm-qpr-dev am: 867250736a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19459469

Change-Id: I74d6b125ef9ad1b6176254f1b36ebbe13cbcbcd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 12:46:38 +00:00
Riddle Hsu
867250736a Merge "Reduce lock contention of setting running shell remote transition" into tm-qpr-dev 2022-08-01 07:18:50 +00:00
Jeff Chang
bcbf62d12c Do not evict starting task when startShortcut
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
2022-08-01 11:32:08 +08:00
Ats Jenk
8b9b0c9ef4 Ignore notification update for not active user
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
2022-07-29 14:58:04 -07:00
Riddle Hsu
570308d9eb Reduce lock contention of setting running shell remote transition
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
2022-07-29 19:51:45 +08:00
Tiger Huang
3995c4d303 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: If3a51277578c31ba2c0e8c75341b33cd1f5cd9ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:23:15 +00:00
Tiger Huang
93a238d15d Merge "Send size-compat scale to the client" into tm-qpr-dev 2022-07-29 08:56:14 +00:00
wilsonshih
f22e6b03ef Inject back key events if no focus window found.
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
2022-07-29 13:00:54 +08:00
Arthur Hung
89c25ce1f4 Merge "Cancel back invoke when window focus has lost" into tm-qpr-dev am: f52b49886c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19415501

Change-Id: I7d4fc2e6f3df820a4a4594b0368ff6bfbb12820f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 01:37:15 +00:00
Arthur Hung
f52b49886c Merge "Cancel back invoke when window focus has lost" into tm-qpr-dev 2022-07-29 01:18:09 +00:00
Winson Chung
94c2207fde Merge "Add running apps icons to taskbar for desktop environment." into tm-qpr-dev am: c047fa42ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19459745

Change-Id: I750c97b6c6272995667aaac60f9fe76552e65c69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 00:02:33 +00:00
TreeHugger Robot
dd4fc8f5d8 Merge "Add FreeformTaskTransitionHandler" into tm-qpr-dev am: 3f2c081a30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19224057

Change-Id: Ie17cd9184f05209837683adeba4bf9f268fdddb4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 23:55:56 +00:00
Tiger Huang
8210f8087d Merge "Let the client know the initial visibility of an InsetsSourceControl" into tm-qpr-dev am: b4a6c4bf46
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19379426

Change-Id: I57ac6c65931c46a1fa7423031b4b78193838e594
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 23:53:41 +00:00
Riddle Hsu
273b216304 Merge "Support display resize animation for shell transition" into tm-qpr-dev am: 673639d955
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19378586

Change-Id: I1b4039897719f0b16d0ceb06f16c85b2c2625fea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 23:38:06 +00:00
Shawn Lin
0961f9142f Merge "Fix the NPE crash when device reboot with hide cutout set" into tm-qpr-dev am: 9d4ac70ae2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19043627

Change-Id: I114b4b383a27ab77514ab0d92b2d6b2480e10d02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 23:37:11 +00:00
Winson Chung
c047fa42ee Merge "Add running apps icons to taskbar for desktop environment." into tm-qpr-dev 2022-07-28 22:14:41 +00:00
TreeHugger Robot
3f2c081a30 Merge "Add FreeformTaskTransitionHandler" into tm-qpr-dev 2022-07-28 19:50:15 +00:00
Merissa Tan
a729c5a26b Add running apps icons to taskbar for desktop environment.
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
2022-07-28 17:50:29 +00:00
Tiger Huang
b4a6c4bf46 Merge "Let the client know the initial visibility of an InsetsSourceControl" into tm-qpr-dev 2022-07-28 17:37:13 +00:00
Riddle Hsu
673639d955 Merge "Support display resize animation for shell transition" into tm-qpr-dev 2022-07-28 12:42:58 +00:00
Shawn Lin
2a4ddb9c14 Fix the NPE crash when device reboot with hide cutout set
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
2022-07-28 09:25:21 +00:00
Arthur Hung
e3476afe2a Cancel back invoke when window focus has lost
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
2022-07-28 06:42:10 +00:00
Winson Chung
26b25109e7 Merge "Fix multiple runs of bubbles persister test" into tm-qpr-dev am: e2acffb79a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19391484

Change-Id: I97eefc11591ff594da60aa22ad73df3824fbf6f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 21:18:36 +00:00
Winson Chung
e2acffb79a Merge "Fix multiple runs of bubbles persister test" into tm-qpr-dev 2022-07-27 20:26:28 +00:00
Garfield Tan
1e37f5519b Add FreeformTaskTransitionHandler
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
2022-07-27 09:48:50 -07:00
Chris Li
12cc95ad18 Merge "Fix open ActivityEmbedding split with Shell transition" into tm-qpr-dev am: 447919823c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19321172

Change-Id: Ia471a71ba97cf89fa8c214734012075a9b1a33c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 06:55:37 +00:00
Chris Li
447919823c Merge "Fix open ActivityEmbedding split with Shell transition" into tm-qpr-dev 2022-07-27 06:50:21 +00:00
Winson Chung
3b8f5e946f Merge "Fix issue with no rounded corners on PIP" into tm-qpr-dev am: bb9d61264d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19415864

Change-Id: Ibd09cd340ec23a80bf63de3151795f6e861c4e0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 06:34:22 +00:00
Winson Chung
bb9d61264d Merge "Fix issue with no rounded corners on PIP" into tm-qpr-dev 2022-07-27 06:28:37 +00:00
Tiger Huang
c77eaf873d Send size-compat scale to the client
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
2022-07-27 14:10:10 +08:00
Tony Huang
55b28daa93 Merge "Fix wrong split layout after drag drop" into tm-qpr-dev am: 99933f97b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19340117

Change-Id: Iab418d839e924cffd3b82408f588a345e833b20f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 05:52:48 +00:00
Tony Huang
99933f97b6 Merge "Fix wrong split layout after drag drop" into tm-qpr-dev 2022-07-27 05:40:41 +00:00
TreeHugger Robot
dbafd00de2 Merge "Add unit tests for layout of window decoration" into tm-qpr-dev am: e49163713d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19419641

Change-Id: I8b48c6f4a8e87b8229891c335c5908c699621607
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 04:43:44 +00:00
TreeHugger Robot
e49163713d Merge "Add unit tests for layout of window decoration" into tm-qpr-dev 2022-07-27 04:30:41 +00:00
TreeHugger Robot
810f0e1d33 Merge "Use getOutWindowingMode instead of WINDOWING_MODE_UNDEFINED" into tm-qpr-dev am: b7ca84c08a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19412084

Change-Id: I8da0ed12e628936485ebbf3833ea2b4c13020b43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 04:22:00 +00:00
TreeHugger Robot
b7ca84c08a Merge "Use getOutWindowingMode instead of WINDOWING_MODE_UNDEFINED" into tm-qpr-dev 2022-07-27 04:15:23 +00:00
Jerry Chang
3a1f342225 Merge "Consolidate drag to split gesture with shell transition" into tm-qpr-dev am: 14376ccdcd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19125490

Change-Id: I0aece3465b0df21563cc18577a7a1d7c7037c5d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 02:22:19 +00:00
Jerry Chang
14376ccdcd Merge "Consolidate drag to split gesture with shell transition" into tm-qpr-dev 2022-07-27 02:15:57 +00:00