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
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
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
FullscreenUnfoldController#resetSurface happens in between
RecentsAnimationController cleanup and PipTaskOrganizer#onTaskAppeared
may cause flicker at the end of auto-enter-pip transition.
Fix it by intentionally ignore resetSurface if the task's pinned.
Bug: 203724707
Bug: 204284060
Test: repeatedly swipe to enter PiP from YT on foldables
Change-Id: Ie074e8a506d2526fc081ff4d089a2acb00549286
When split active by drag drop, the active point is
onStageHasChildrenChanged callback but we don't reorder side stage
to top then make it cannot be focused.
Add reorder root to top for fixing.
Fix: 204510713
Test: manual
Test: pass existing tests
Change-Id: I553a57250c302ff435a35c9a10599fc375e48248
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
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
We assume dismissing side should be DOCKED_INVALID when split
active, however, if snap algorithm only have one target, it will
get other side due to current algorithm.
Fix this by correct algorithm and ensure dismissing side be
DOCKED_INVALID when split active or layout.
Fix: 203745267
Test: manual
Test: pass existing tests
Change-Id: I077a93472dad89bc620e490dcae5170e9a56279b
If an animator is already running, we usually just update its end
bounds - but we also end up over-writing the original callbacks. This
used to work well since pre-shell transition, callbacks are always
pulled from PipTaskOrganizer, but now we can have two places that supply
callbacks (PipTransition). So let's just leave the callback alone.
Another potential issue is that sometimes finish callbacks from one
transition is not called before starting another one, and starting a new
transition overwrites the old finishCallback. We will then finish the
earlier callbacks to ensure the transition system does not hang the
entire device, but throw an Exception to not gloss over the potential
issue.
Bug: 183993924
Test: atest PinnedStackTests
Change-Id: Ib4c5926beec5745d8a0abccec5c67849488e532b
There will receive another onAnimationStart/onAnimationEnd callback
when calling ValueAnimator#end if the animation is not running, which
is not necessary if the animation was finished already.
Bug: 195736656
Test: atest SplashscreenTests
Change-Id: Ifbbf2f799e3e69624626b16e08f40b562fe483a8
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
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
PiP Shell Transitions needs to be more robust to pass CTS tests
reliably.
Some changes:
1. DELIVERED_TO_TOP intents don't create a transition since there is
no change to the WM hierarchy. This way the app-launch transition
won't conflict with activityRestartAttempt.
2. If PiP started an expand transition while an enter transition is
ongoing, cancel the enter transition.
a. Additionally, because PiP doesn't resize task until the enter
transition finishes, the expand transition will actually be
a no-op. If we see this pattern, also cancel the enter
transition.
3. When taskVanished, make sure to call any pending finishCallback
because it doesn't allow the running animator to properly finish.
Transition systems require the finish callback to function
properly.
4. Minimize the uses of finishTransition with a sync callback. We
probably need to phase this out because it can conflict with
subsequent startTransition calls (because only 1 sync is supported
at a time).
Bug: 183993924
Test: atest PinnedStackTests
Change-Id: Ieb573032839a2f31b0bb371410484fc93a1714fa
It was done by WMS#startFreezingDisplay~stopFreezingDisplayLocked.
The duration is measured from rotation change to start animation.
Add a remote callback to know when the rotation animation is started.
So WM core can have the paired begin/end of trace that matches the
latency exactly.
The added ITransitionMetricsReporter is available for any processes.
So in the future it can also report the metrics from remote animator.
This change focuses on the rotation animation handled by shell.
Bug: 199836343
Test: adb shell setprop persist.debug.shell_transit 1; reboot
Rotate display and check trace "L<ACTION_ROTATE_SCREEN>".
Change-Id: I180d2fe1a77e98b6427ba831a2db2593739376bd
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
This reverts commit 289347aedf.
Reason for revert: re-land the CL with CarLauncher change
Merged-In: If4ab0590f4b850103411b6a2dccf2092bb06d563
Change-Id: I5a43908f958b45a936d0e7ac09f96d85d08663b7
This reverts commit f59eccd4a6.
Reason for revert: b/203356785, missed to update CarLauncher correspondingly in sc-v2
Change-Id: I0902b496b69e415fa0208948307fdf3883a1be17
When launching a new app into a specific split, evicts all child tasks
that were originally in the same split.
Fix: 202739668
Test: atest WMShellUnitTests
Test: manual check dropping an app to a specific split evicts other
tasks in the same split.
Change-Id: I3f52a3675d6ead742f0b75c83393462e5778a524
Changes unfold overlay implementation from a window
to surface control view host. To make sure that the
unfold overlay is drawn by the time when we remove
screen blocker we synchronously apply a transaction
with drawn overlay and apply another empty transaction
with vsyncId+1.
Also these changes disable the unfold transition when
using power button by filtering only first screen turning
on events after unfolding the device.
Bug: 197538198
Test: manual fold/unfolds
Test: killing SysUI process, checking rotation animation, magnification
Test: atest com.android.systemui.unfold.updates.DeviceFoldStateProviderTest
Change-Id: I8e0bc635b041595602145b313548b14fcabd157e
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
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
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