Commit Graph

4912 Commits

Author SHA1 Message Date
Matt Sziklay
a5285231c8 Merge "Add bar type window caption." into tm-qpr-dev 2022-10-11 00:37:41 +00:00
Bill Yi
40bdde2a1e Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-10-10 22:23:11 +00:00
mattsziklay
bd839dbdd1 Add bar type window caption.
This is the first CL towards implementing the bar type caption which
will have a back button, a handle, and a close button. The caption will
also disappear when the attached task is not in focus.
Still to be implemented:
1: Windowing options appearing on handle click
2: Drag down in fullscreen to enter desktop mode
3: Caption display via hovering when cursor available

Bug: 239960071
Test: Manual: confirm new caption displays with the correct buttons/layout.
Confirm buttons work and focus change works with multiple tasks.
Test: Atest WindowDecorationTests

Change-Id: I2ebed76b803d1f337edc3e7340966909f63eaf40
2022-10-10 12:02:44 -07:00
Ats Jenk
78b3719017 Merge "Resize tasks from corners when in touch mode" into tm-qpr-dev 2022-10-10 19:02:17 +00:00
Bill Yi
1e8069e8da Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I602bdeb57f7f57b0708efa89fe72ffc9a377e528
2022-10-09 14:59:59 -07:00
Ats Jenk
b30627adad Resize tasks from corners when in touch mode
Update task resizing logic for desktop mode.
Add a new 44x44dp touch region in each corner of the task that is
centered around the corner. This is only used when resizing via touch.
This simplifies task resizing with touches and ensures that task resize
and back gesture do not conflict.

New task resize regions:
- with touch: use 44x44dp rect in each corner
- with mouse: use 30dp wide task edges

TODO:
- investigate how to pass taps in touch corners through to app

Bug: 251270585
Test: using touches to resize task for corners, check that resizing from
  edges no longer possible
Test: use mouse to resize task from edges

Change-Id: Ib1aaf69d2971c29a35200b0f3807871343aa1bf8
2022-10-07 15:28:10 -07:00
Mateusz Cicheński
6a113515ec Don't move stashed PiP in response to keep clear areas changes.
Test: manually, enter pip, stash it, open an app -> pip doesn't move
Bug: 183746978
Change-Id: Iaffb4e1683fe3fb1238fa3a7ae12f04055e40704
2022-10-07 19:15:33 +00:00
Winson Chung
dc06f11eb0 Merge "Simplify exposing external interfaces to Launcher" into tm-qpr-dev 2022-10-07 16:55:55 +00:00
Jerry Chang
3750d8945c Merge "Support starts a pair of intent/shortcut and task to split" into tm-qpr-dev 2022-10-07 04:33:32 +00:00
Jerry Chang
f876fb9958 Merge "Remove stage concept from split screen APIs" into tm-qpr-dev 2022-10-07 04:32:29 +00:00
Winson Chung
c03010f150 Simplify exposing external interfaces to Launcher
- Currently, the collection of binders to send to Launcher is inverted
  and managed by OverviewProxyService which has to know about each
  component directly (and a SysUI interface has to be created to support
  this even if there are no other calls in SysUI to that component).

  Instead, we should have each component register itself with the
  ShellController for controllers which can be exposed to an external
  process, and each product can customize which set of controllers it
  needs to support.
- Add missing dump registration for ShellController
- Updating docs for creating remote callable controllers

Bug: 238217847
Test: atest WMShellUnitTests
Change-Id: Icd0ed33bdbd68b1dd9d782b9ba1f5b4a604479ba
Merged-In: Icd0ed33bdbd68b1dd9d782b9ba1f5b4a604479ba
2022-10-06 22:49:13 +00:00
Ben Lin
c13fc2d221 Merge "Bring other Desktop apps to front when opening a new one." into tm-qpr-dev 2022-10-06 19:52:18 +00:00
Hongwei Wang
a1db600e04 Merge "Save ProtoLog viewer configuration in WMShell" into tm-qpr-dev 2022-10-06 17:04:00 +00:00
Wei Sheng Shih
925181d781 Merge "[Shell Transition] Schedule another transition to update visibility." into tm-qpr-dev 2022-10-06 08:34:09 +00:00
Garfield Tan
16b78301e7 Merge "Put window decors at one place" into tm-qpr-dev 2022-10-06 00:03:33 +00:00
Garfield Tan
73166e71d0 Put window decors at one place
There are some juggling between task listeners and the transition
observer of window decors because they are hosts together with its
corresponding task states. This change can remove those juggling by
putting all of them at one place.

Bug: 250622579
Test: atest WMShellUnitTests
Change-Id: Ic1db1633a5e79e2bcea5885b8fc2f345fa05fb1e
2022-10-05 12:06:36 -07:00
Ben Lin
990c149544 Bring other Desktop apps to front when opening a new one.
This enables the launcher to bring all desktop apps to the front when
launching a new app. This is only enabled when Desktop Mode feature flag
is enabled and Shell transition is enabled.

Bug: None
Test: Manual, launch new apps from launcher
Change-Id: I5ae3941c7d27db3180ea6725a37868416b6649fb
2022-10-05 19:03:02 +00:00
Hongwei Wang
2b227ee11d Save ProtoLog viewer configuration in WMShell
In this changeset topic
- Build WMShell with protolog viewer config
    - it's built with SystemUI{,Google} packages and installed as
      /system_ext/etc/wmshell.protolog.json.gz
- Deprecated the viewer configuration as a bundled resource
- The `required` keyword in Android.bp does not propagate, need to add
  it in individual Android.bp file such as SystemUIGoogle/Android.bp
- Push the generated viewer config file onto device in makepush script
  (in a separate CL)

Bug: 244642224
Test: mp sysuig
Change-Id: Ib7f37ec55d12493d6beec3aba66883415966b521
2022-10-05 09:36:42 -07:00
TreeHugger Robot
96eae2359b Merge "Make startTransition one-way" into tm-qpr-dev 2022-10-05 12:52:45 +00:00
Massimo Carli
8f77d930fc Merge "LetterboxEdu not visible when device is docked" into tm-qpr-dev 2022-10-05 08:12:39 +00:00
Jerry Chang
9ee3fbb5a0 Support starts a pair of intent/shortcut and task to split
Add startIntentAndTask and startShortcutAndTask APIs to support starts a
pair of intent/shortcut and task to split with shell-transition.

Fix: 250875492
Test: atest WMShellFlickerTests
Test: manual check start tasks or start intent/shortcut with task flow
      with shell-transition enabled
Change-Id: Ia79cf5e1990089f2a92895fd09b8f813d9381093
2022-10-05 06:40:11 +00:00
Massimo Carli
778001641a LetterboxEdu not visible when device is docked
If the device is docked the letterbox edu should not be visible.

Fix: 215098637
Test: Run `atest WMShellUnitTests:LetterboxEduWindowManagerTest WMShellUnitTests:CompatUIControllerTest`

Change-Id: I9ad5274654ed827fc31800d9d6dae5be1fc4baa1
2022-10-04 21:58:37 +00:00
Jerry Chang
797d6ab9da Remove stage concept from split screen APIs
Since split screen has transferred from stage-based model to app-pair
model. Update to remove the stage concept from split screen APIs, so the
caller won't need to deal with stage concept.

Bug: 250875492
Test: atest WMShellFlickerTests
Test: manual check start tasks or start intent/shortcut with task flow
Change-Id: I42a491132052ed87f57ccba9e9ca99b8eddb13de
2022-10-04 16:15:04 +00:00
Winson Chung
5414dab01e Clean up some methods on the Pip interface
- Remove some pip methods that aren't used from SysUI
- Migrate an old ISystemUIProxy pip call to IPip

Bug: 238217847
Test: atest WMShellUnitTests
Change-Id: Iab57329a9d79704b0e35fdb22a36594aa4368141
2022-10-04 04:39:33 +00:00
Winson Chung
1c48aa1290 Move kids task organizer to handheld package
Bug: 238217847
Test: mp sysuig
Change-Id: Idee19d16fdea9811044bd47bf6e63c6674cbb470
2022-09-30 23:47:33 +00:00
TreeHugger Robot
b530b79065 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-30 21:51:40 +00:00
Winson Chung
94bd703e56 Merge "Add config for registering shell task organizer" into tm-qpr-dev 2022-09-30 03:05:35 +00:00
Chris Li
be74f343db Merge "Crop embedded split TaskFragment as Task" into tm-qpr-dev 2022-09-30 00:48:19 +00:00
Chris Li
b4354df3e7 Merge "Implement ActivityEmbedding Shell transition animation with showBackdrop" into tm-qpr-dev 2022-09-30 00:47:59 +00:00
Winson Chung
2da6ee0d27 Add config for registering shell task organizer
- This should be temporary until we resolve b/238217847 to not
  initialize base WM components unless requested to do so

Bug: 238217847
Test: Manual
Change-Id: I205a8e457f12924f797a5cd1a34e499e7efe5a04
2022-09-29 20:36:26 +00:00
Bill Yi
687f62e360 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0d132b2f74838172e9ffbb32df0cd5df3921ab6c
2022-09-29 12:23:51 -07:00
wilsonshih
66e601fb13 [Shell Transition] Schedule another transition to update visibility.
Activity could call setTranslucent during a transition playing, if the
task of an activity was in transition and that activity should become
invisible, it would be defer until transition finish.
However, since the activity wasn't participant the running transition,
there won't do commitVisibility for it after transition finish.
To correct the visibility status, trigger another transition so the
activities which visibility changed can be collect and commit.

Bug: 246518648
Test: atest testConvertTranslucentOnTranslucentActivity
Test: atest testConvertTranslucentOnNonTopTranslucentActivity
Change-Id: Ic1cda79da37162cca2a1a3fbc73311cc325b3874
2022-09-29 09:20:49 +00:00
Matt Sziklay
990a07fadf Merge "Exit desktop mode on dragging a task to the top of the screen." into tm-qpr-dev 2022-09-28 23:30:28 +00:00
Mateusz Cicheński
5e05a02c9c Merge "Refactor isAnimating to PipAnimationController, and update references." into tm-qpr-dev 2022-09-28 18:42:31 +00:00
mattsziklay
ba89ef9531 Exit desktop mode on dragging a task to the top of the screen.
This CL is part of the effort to implement desktop mode changes based on
drag gestures.

Bug: 247551213
Test: Drag a freeform task to the status bar area, confirm it exits
desktop mode for all tasks.

Change-Id: I44c147a4187466f98ab8f15e0bb050a56fbbe415
2022-09-28 10:41:48 -07:00
Nick Chameyev
8504f8c843 Merge "[Partial Screensharing] Implement loading of recent tasks, thumbnails and icons" into tm-qpr-dev 2022-09-28 09:46:56 +00:00
TreeHugger Robot
b3fe3948e3 Merge "Show window captions only on standard activities" into tm-qpr-dev 2022-09-28 06:06:45 +00:00
Ats Jenk
4958d4f5f0 Show window captions only on standard activities
This ensures we do not show caption bar for launcher or recents.

Test: enable desktop mode, observe no captions for launcher or recents
Bug: 249350122
Change-Id: Id026d73f8894b3fb1a1fed236ae9cd260fba7a70
2022-09-27 13:52:05 -07:00
Nick Chameyev
f45946c742 [Partial Screensharing] Implement loading of recent tasks, thumbnails and icons
Adds implementation of providers to get list of
recent tasks, recent task thumbnails and icons.

Adds a method to Shell's RecentTasks interface to
get a provider of recent tasks without using the IRecentTasks
binder object (which is used by Launcher) as we can
call it directly inside SystemUI.

Bug: 240924731
Test: atest com.android.wm.shell.recents.RecentTasksControllerTest
Test: atest com.android.systemui.mediaprojection.appselector.data.ShellRecentTaskListProviderTest
Change-Id: I89579fc8e4e07f6bf656d300ecdbb75bdcb91035
2022-09-27 19:08:28 +01:00
Bill Yi
2ae6753949 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I09e3188dafdc52f8358c4bf2506d94c1712d616d
2022-09-27 08:24:22 -07:00
Riddle Hsu
7e2eeb1395 Make startTransition one-way
If shell is starting an existing transition, it doesn't need the
returned transition token so it can be an async call then it won't
block shell's thread to execute other operations.

If shell is starting a new transition, then use the new added 2-way
startNewTransition which is the same as the original path.

Bug: 248550757
Test: atest ShellTransitionTests
Test: CtsWindowManagerDeviceTestCases with shell transition
Change-Id: I5f64d19475d5b857a461775dd6f3002567e93ad8
2022-09-27 15:06:37 +08:00
Chris Li
a5dfc1b3ef Crop embedded split TaskFragment as Task
Before, we only crop Task surface when rotate display which may result
janky animation. Now, we also crop other embedded split TaskFragments.

Bug: 207070762
Test: manually verify with rotate embedded split app
Change-Id: If955b7889b7951c7a06f046905d825f0f784e17b
2022-09-27 11:43:30 +08:00
Ats Jenk
df2bdd5135 Merge "Add support to show apps on desktop in sysui proxy" into tm-qpr-dev 2022-09-26 23:43:18 +00:00
Ats Jenk
d849498a69 Add support to show apps on desktop in sysui proxy
This enabled launcher to show all desktop apps when user clicks on the
desktop tile in recents.
This is only enabled when Desktop Mode feature flag is enabled.

Bug: 244348395
Test: atest DesktopModeControllerTest
Change-Id: I3c89ef01fd7d1f457a7afabda94b481711c0a350
2022-09-26 10:53:10 -07:00
Chris Li
1c939d4f0f Implement ActivityEmbedding Shell transition animation with showBackdrop
Refactor background color handling from DefaultTransitionHandler to a
helper class, so that we can reuse it for ActivityEmbedding as well.

Bug: 207070762
Test: manual
Change-Id: I6034ddd1928184a969848f0be496247032763b40
2022-09-26 17:25:02 +08:00
Chilun Huang
e9f622dc90 Merge "Reuse tasks in background in priority for split screen" into tm-qpr-dev 2022-09-26 04:35:45 +00:00
Mady Mellor
c423e60ae5 Merge "Allow floating tasks to be shown as bubbles (behind a sysui flag)" into tm-qpr-dev 2022-09-23 15:13:03 +00:00
Chris Li
fcfa500483 Merge "Polish ActivityEmbedding Shell animation when open a split pair" into tm-qpr-dev 2022-09-23 05:31:41 +00:00
Hongwei Wang
12415a30ea Propagate PiP param change on RemoteAction update
We used to only check title/contentDescription/actionIntent of
RemoteAction for uniqueness and ignore the isEnable/shouldShowIcon.

Bug: 234679022
Test: Verify the isEnabled change updates PiP menu
Change-Id: I769507253594b016802b71368ac4a9036f2ad21f
2022-09-22 15:49:16 -07:00
Mady Mellor
3b9ef3fee1 Allow floating tasks to be shown as bubbles (behind a sysui flag)
Special "app bubble" that is ordered at the front of the list unless
something else was selected. This is guarded behind the flag to
enable floating tasks, and a new flag to allow floating tasks to be
bubbles.

Test: manual  - enable the flags and create a floating task
             => floating task appears in a bubble
Bug: 237678727
Change-Id: Ibf66e8bae07800b5f64598c9b50de7a7995d09e6
2022-09-22 12:11:28 -07:00