Commit Graph

681 Commits

Author SHA1 Message Date
Ben Lin
06f8587f41 Revert "PiP: Recalculate size if too big/small on display change."
This reverts commit 4ef153a797.

Reason for revert: This fixes a foldable bug and so not really needed anymore for sc-v2. We'll leave it master only.

Bug: b/205761901
Bug: b/206644532
Change-Id: Ia50d491d89a4c9faaa49c3e2b9afe38f73bd7f57
2021-11-16 23:25:24 +00:00
TreeHugger Robot
bcc3f65352 Merge "Revert^2 "PiP: support direct entering split from PiP."" into sc-v2-dev 2021-11-11 17:55:21 +00:00
Hongwei Wang
5b3d8a3aaf Revert^2 "PiP: support direct entering split from PiP."
a6abf3067b

Change-Id: I1deddacd0ef7ba36b55d38d14718d0be90129866
2021-11-10 21:02:08 +00:00
Vinit Nayak
b63153fa3b Merge "Pass back split bounds and meta info with GroupedTaskInfo" into sc-v2-dev 2021-11-10 16:33:49 +00:00
Vinit Nayak
d3370c4082 Pass back split bounds and meta info with GroupedTaskInfo
* Compute and save a StagedSplitBounds object for every
pair to determine it's position, size, divider, etc.
* Moved GroupTask to Launcher
* Moved StagedSplitBounds from launcher to wm/shell
because sharing is caring.

Bug: 203006080
Change-Id: I8513e027f8c9606fbed1283013eafea2cf905f3f
2021-11-09 15:14:13 -08:00
Hongwei Wang
a6abf3067b Revert "PiP: support direct entering split from PiP."
Revert "Update PiP signatures"

Revert submission 16190721-pip-enter-split

Reason for revert: regression b/205639175
Reverted Changes:
I62d1617c1:Update PiP signatures
I0829c910b:PiP: support direct entering split from PiP.

Change-Id: I52fe160c50747a00e1d30b072ce07e67dae9c6de
2021-11-08 18:52:00 -08:00
Winson Chung
8f7d253431 Merge "Update recent tasks split pairs from split controller" into sc-v2-dev 2021-11-07 04:22:37 +00:00
Ben Lin
984af19cf9 Merge "PiP: Recalculate size if too big/small on display change." into sc-v2-dev 2021-11-06 07:39:00 +00:00
Winson Chung
6be95d2ffa Update recent tasks split pairs from split controller
- Add pairs for the top visible children when both roots are populated,
  and update when either side changes.
- Remove pairs if an activity is finished, or if the user dismisses
  split manually
- Remove pairs for associated tasks if they are made visible in fullscreen

Bug: 202740477
Test: atest WMShellUnitTests
Test: adb shell dumpsys activity service SystemUIService WMShell

Change-Id: I87c632dfd1a014d64ad8e25c9e68ea6ca230744e
2021-11-06 04:02:53 +00:00
Ben Lin
4ef153a797 PiP: Recalculate size if too big/small on display change.
On display changes, it is possible that the old bounds is now too big
or too small for the new display. This is especially like on foldables,
such as a min size on a folded state is too big when in an unfolded
state.

Bug: 198679951
Test: Fold, minimal size, then unfold - see size change, and resizing
now doesn't jump to from too small -> small

Change-Id: I5de64860f1fbb476ff1a6a8dd9a0c50fd3259a45
2021-11-05 18:00:24 -07:00
Winson Chung
cef0ca0a9b Add split exit reasons
- These map to logging states, but can be used to distinguish
  cases to retain/remove the splits in recents

Bug: 202740477
Test: atest WMShellUnitTests
Test: adb shell dumpsys activity service SystemUIService WMShell
Change-Id: Ie028f6a2cb63beda97482e86e2c60dbf8f81e625
2021-11-05 23:43:30 +00:00
Ben Lin
5574121d03 Merge "PiP: support direct entering split from PiP." into sc-v2-dev 2021-11-05 17:42:02 +00:00
Tom Natan
6ee7e8b6b3 Merge "Update size compat restart button surface position after display insests changed" into sc-v2-dev 2021-11-05 10:07:15 +00:00
Winson Chung
5dbf72509d Merge "Add exit log for debugging auto dismissing bug" into sc-v2-dev 2021-11-05 04:20:27 +00:00
tomnatan
5cf6507e51 Update size compat restart button surface position after display insests changed
Fix: 204532180
Fix: 182905588
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: Icda54db231783f576832b22e4d286fe0524a2088
Merged-In: Icda54db231783f576832b22e4d286fe0524a2088
2021-11-05 02:14:10 +00:00
Ben Lin
0e40a98bc3 PiP: support direct entering split from PiP.
Add a new "enter split" button that allows user to go directly into
split screen on large screen devices from PiP.

- Add button
- Calculate split-screen location based on current PiP bounds
- Merge all WCT into one after animating

Video: http://recall/-/gu5DjQFZPMFpwgaXdl4cV3/gnNkSpC72tlTGP2mrKR07R

Bug: 202740657
Test: Enter PIP, open another app, tap "enter split"

Change-Id: I0829c910b2873ed4c4b0ea4fe0ca28b7f87736d8
2021-11-04 11:45:59 -07:00
Winson Chung
92a8e1a6ec Add shell recents interface
- Add a shell component and interface for Launcher to use to get recent
  tasks including paired splits (pending integration w/ split controller)

Bug: 202740477
Test: atest WMShellUnitTests:com.android.wm.shell.recents.RecentTasksControllerTest

Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: I34d834061ed2391d89cf56d6a2fd262868707674
Merged-In: I34d834061ed2391d89cf56d6a2fd262868707674
2021-11-04 18:42:20 +00:00
Tony Huang
880a19bed1 Add exit log for debugging auto dismissing bug
Add log when split exit for debugging some auto dismissing bug
which hard to repro locally.

Also add a check when exit split for avoiding exit run many times.

Bug: 204527184
Test: pass existing tests
Change-Id: Iaf98a7eb54a2988d13b3b8ca871c750f993fa8b4
2021-11-04 14:50:02 +08:00
Tom Natan
2d213c397a Merge "Redesign the size compat restart button according to mocks." into sc-v2-dev 2021-11-02 15:22:05 +00:00
tomnatan
825e55ed60 Redesign the size compat restart button according to mocks.
The width of the hint is constant but the height changes with respect to the number of lines the text requires (see screenshots below). The X position of the hint is set programmatically so that the point's center will be aligned with the button's center.

Still need to add UI for different states of the button (pressed, focused, etc.) and maybe also the hint (since it's clickable). Mocks for this are still TBD.

Mocks: https://www.figma.com/file/fLAVOdDkg0lnFWiltSYbGA/Multitasking?node-id=2719%3A54196

Screenshots:
[default - 2 lines]    http://screen/4EtytFiKsY3Q5NE
[LTR language]         http://screen/9BSPipZYUd7UGPV
[short text - 1 line]  http://screen/AN5bds6rh5V55Bw
[large font - 3 lines] http://screen/6utG596y52LBDjX
[long text - 4 lines]  http://screen/7mBL2fXWy43UsTq

Bug: 198347324
Test: atest WMShellUnitTests:SizeCompatRestartButtonTest
Test: atest WMShellUnitTests:SizeCompatHintPopupTest
Test: atest atest WMShellUnitTests:SizeCompatUILayoutTest
Change-Id: Ida4c4171be94b60499cfe8acb6a2278f7e10a1f3
2021-11-02 13:17:19 +00:00
Jerry Chang
7b04c3ba76 Remove redundant operations of split screen
Make moveToSideStage doing reparent oeprations only and leave all the
other active operations to onStageHasChildren. Also make sure it evicts
original children.

Remove setLaunchRoot and setWindowingMode operations in MainStage since
it won't be set as launch root and won't change in between of fullscreen
and multi-window windowing mode anymore.

Fix: 204519739
Bug: 202740040
Test: atest WMShellUnitTests
Change-Id: I6199862502646056966412824a5be840a15e8726
2021-11-01 16:43:26 +08:00
Tony Huang
70b7b1e2d8 Fix divider rounded corner on specific devices
On large rounded corner devices, Rounded corners around divider
cannot display right corner path because it need more space to
draw corners and divider bounds is fixed.

Fix this by enlarging the divider window bounds. However, if we only
enlarge it, it will cause divider touch region too big to make app
hard to interactive. Therefore, migrate touch region setting logic
in legacy split to here, only set divider handle view size as touch
region.

Fix: 202808282
Test: flash on barbet and active split screen to check
Test: pass existing tests
Change-Id: If292c0d4c598d75672ec821d1fee45a8892b236f
2021-10-28 09:01:37 +08:00
TreeHugger Robot
1679d92eef Merge "Update split resizing transition to match design" into sc-v2-dev 2021-10-27 23:18:07 +00:00
Jerry Chang
222c9d3890 Update split resizing transition to match design
Remove the support of drawing side stage outline and update
OutlineManager to SplitDecorManager to help rendering decor view for
split screen like providing resizing hint.

Fix: 202740435
Fix: 202174975
Bug: 201653912
Bug: 200850654
Test: atest WMShellUnitTests
Test: manual check split resizing behavior

Merged-In: I4033255d8e2a94f69667ca1365b17da956816cde
Change-Id: I4033255d8e2a94f69667ca1365b17da956816cde
2021-10-27 23:22:33 +08:00
Shawn Lin
59f51a9538 Merge "Add APIs to get system bar heights" into sc-v2-dev 2021-10-25 04:07:12 +00:00
Jerry Chang
d0cda70d27 Fix drop to enter split not working
Sometimes when dropping app icon to enter split screen, it'll exit split
screen immediatlly because it evicts newly launched task before the task
considered to be visible. Update to collect child tasks to evict before
launching activity.

Fix: 203610931
Fix: 203636251
Test: atest WMShellUnitTests
Change-Id: If070fb5b3eb0b3fc178122d38b2dce3072621449
2021-10-21 19:02:56 +08:00
Jerry Chang
7891acface [DO NOT MERGE] Provide IconProvider in sysui dagger
So that other components can get app icon throught it as well.
Like showing app icon as resizing hint while dragging divider bar in
split screen.

Bug: 202740435
Bug: 201653912
Test: atest WMShellUnitTests
Change-Id: I7cc10be4ebfe7f9aad5db036a595613546ca15c9
2021-10-20 11:26:23 +00:00
Michał Brzeziński
d41437abf4 Merge "Revert^2 "Revert "Provide IconProvider in sysui dagger""" into sc-v2-dev 2021-10-19 14:50:22 +00:00
Michał Brzeziński
9a003a67aa Revert^2 "Revert "Provide IconProvider in sysui dagger""
769f04c8f0

Change-Id: I654c4fb5d393e8ac13840625662fa738359df4df
2021-10-19 14:36:35 +00:00
Shawn Lin
16496cb5c1 Add APIs to get system bar heights
In multi-display devices, there might be differnt cutout on each display
which also causes different status bar height.

Now we no longer overlay the status_bar_height dimen and keep it as
default value and add APIs to calculate the status bar size.

- Add APIs for getting status_bar_height & quick_qs_offset_height in
  system.
- Add APIs for getting split_shade_header_height and
  qs_header_system_icons_area_height in SystemUI.
- Remove all resource overlay for status_bar_height &
  quick_qs_offset_height.

Bug: 186604541
Test: atest SmallClockPositionTest DisplayLayoutTest
      HideDisplayCutoutOrganizerTest SizeCompatTests
      NotificationPanelViewControllerTest
Change-Id: I5a6dfcc6ff06da8ea0fe119fc9d4c089f13b0dff
2021-10-19 14:51:20 +08:00
Chloris Kuo
36a15a906c Merge "Notification text change should not be interruptive during post time" into sc-v2-dev 2021-10-19 01:16:13 +00:00
Jerry Chang
299b926bcf Merge "Revert "Revert "Provide IconProvider in sysui dagger""" into sc-v2-dev 2021-10-19 01:05:00 +00:00
Chloris Kuo
fbe9702f6e Notification text change should not be interruptive during post time
Rename NLS#Ranking.visuallyInterruptive and source from isTextChanged

Bug: 201087764

Test: atest NotificationManagerServiceTest, NotificationRecordTest,
NotificationListenerServiceTest, BubblesTest, BubbleDataTest,
NewNotiPipelineBubblesTest

Change-Id: I5949183704c3747084c83af7737a5212ede48fc0
2021-10-18 20:13:00 +00:00
TreeHugger Robot
6f26ef6d74 Merge "Separate split layout shifting callback from layout changed callback" into sc-v2-dev 2021-10-18 14:28:30 +00:00
Jerry Chang
769f04c8f0 Revert "Revert "Provide IconProvider in sysui dagger""
This reverts commit 289347aedf.

Reason for revert: re-land the CL with CarLauncher change

Merged-In: If4ab0590f4b850103411b6a2dccf2092bb06d563
Change-Id: I5a43908f958b45a936d0e7ac09f96d85d08663b7
2021-10-18 11:02:14 +00:00
Miguel Aranda
b169404b77 Merge "Revert "Provide IconProvider in sysui dagger"" into sc-v2-dev 2021-10-18 09:17:45 +00:00
Jerry Chang
289347aedf Revert "Provide IconProvider in sysui dagger"
This reverts commit f59eccd4a6.

Reason for revert: b/203356785, missed to update CarLauncher correspondingly in sc-v2

Change-Id: I0902b496b69e415fa0208948307fdf3883a1be17
2021-10-18 08:55:36 +00:00
Jerry Chang
f426ad9776 Merge "Provide IconProvider in sysui dagger" into sc-v2-dev 2021-10-18 02:03:24 +00:00
Jerry Chang
76fdc5c43c Separate split layout shifting callback from layout changed callback
So that split implementation can have a better idea about whether it
should apply resizing transition or shifting transition.

Bug: 201653912
Bug: 202334667
Test: manul check
Test: atest WMShellUnitTests
Change-Id: Ia39c15536ed3ed5851120ca9a576cc1426736d79
2021-10-15 11:09:06 +08:00
Tony Huang
62c6c83f57 Make split screen only reparent top task
Follow latest split screen UX model, it should only reparent
the top task to split for app-pair model.

Fix: 201480664
Bug: 202740040
Test: manual
Test: pass existing tests
Change-Id: I4b360a31ce8e7366a77216a94b5f1b19bba848e9
2021-10-14 15:37:00 +08:00
Jerry Chang
f59eccd4a6 Provide IconProvider in sysui dagger
So that other components can get app icon throught it as well.
Like showing app icon as resizing hint while dragging divider bar in
split screen.

Bug: 201653912
Test: atest WMShellUnitTests
Merged-In: If4ab0590f4b850103411b6a2dccf2092bb06d563
Change-Id: Ia99fd2b9ddb05b95205bf923a1ac0f3922e54db7
2021-10-14 13:16:38 +08:00
Sorin Basca
304d678097 Merge "Revert "Provide IconProvider in sysui dagger"" into sc-v2-dev 2021-10-12 15:51:35 +00:00
Sorin Basca
45485c34f5 Revert "Provide IconProvider in sysui dagger"
Revert "Provide IconProvider in sysui dagger"

Revert submission 16003788-inject_iconprovider

Reason for revert: Build break as changes were merged in different branches
Reverted Changes:
I0b54e0841:Provide IconProvider in sysui dagger
If4ab0590f:Provide IconProvider in sysui dagger
Ic031d9694:Provide IconProvider in sysui dagger

Bug: 202792775
Change-Id: I99599152204f4634b2e9a1c623d60f8167919fbe
2021-10-12 15:49:02 +00:00
TreeHugger Robot
274cdd4caf Merge "Provide IconProvider in sysui dagger" into sc-v2-dev 2021-10-12 03:21:12 +00:00
Nataniel Borges
2af16463ee [DO NOT MERGE] Compatibilize flicker from master to sc-v2-dev
This is necessary to fix  "Unable to save trace file /sdcard/flicker/startRotationServiceTest_layers_trace.winscope" in the library self tests

Bug: 202288112
Bug: 202366188
Bug: 188993244
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I9d6d6025be8b659d2f062771cfbd2f6c0982c2be
2021-10-11 10:47:19 +00:00
Nick Chameyev
0cc4156bbc Merge "Add split screen unfold animation" into sc-v2-dev 2021-10-08 10:09:57 +00:00
Nataniel Borges
2461e951b9 Merge changes from topic "sync-flicker-sc-v2-dev" into sc-v2-dev
* changes:
  [DO NOT MERGE] Dump windowing mode in Winscope traces
  [DO NOT MERGE] Dump SurfaceControl's layerId to proto
  [DO NOT MERGE] Dump WindowContainer SurfaceControls to proto
  [DO NOT MERGE] Expose SurfaceControl's native mLayerId property to Java
  [DO NOT MERGE] Sync flicker from master to sc-v2
2021-10-08 08:51:10 +00:00
Mady Mellor
5981b9fa27 Fix an issue that caused an NPE
If the overflow is empty when the last bubble
is dismissed we collapse the stack. If it's not empty
we show the overflow contents.

We were overflowing bubbles AFTER making the choice
to select the overflow or collapse the stack which
causes problems.

Test: atest BubbleDataTest
Test: manual - have 1 bubble and an empty overflow
             - navigate to the overflow, dismiss the bubble
             => no crash
Bug: 202320538
Change-Id: Ic838c5c61bcd714d8de94672d3c4ed753d4f6fa6
2021-10-07 18:19:28 -07:00
Nick Chameyev
f96ed6b6a1 Add split screen unfold animation
Creates controllers in the Shell that manipulate
SurfaceControl leashes of the current active
split screen surfaces based on the current
unfold transition progress.

Bug: 193795566
Test: manual
Change-Id: Ib80807c632444b2939e9b075fb24fd40cc14648a
2021-10-07 14:25:25 +01:00
Jerry Chang
43047d3bee Provide IconProvider in sysui dagger
So that other components can get app icon throught it as well.
Like showing app icon as resizing hint while dragging divider bar in
split screen.

Bug: 201653912
Test: atest WMShellUnitTests
Change-Id: If4ab0590f4b850103411b6a2dccf2092bb06d563
2021-10-07 12:20:43 +08:00