When the default display changed due to unfolded the device, the split
root tasks might be changed to invisible before reporting display info
changed to split component. This causing the split component didn't
update split layout due to the divider bar is not "initialized" after
released with stage roots changed to invisible.
This makes sure to update split layout while the split is activated no
matter the divider bar is initialized or not.
Fix: 189726605
Test: atest WMShellUnitTests
Test: check the split bounds updated properly after the device unfolded.
Change-Id: I722b08116a97b8482ea6e25b60ffe71005076cd7
This is extracted from PipTaskOrganizer and updated/used by both
TaskOrganizer and PipTransition.
Bug: 165793917
Test: Enter PiP with ENABLE_SHELL_TRANSITIONS flag on
Change-Id: Iebc70744f075112f47a3f1bec84311343acae24c
Without a name, waitFor invocations appear as:
***Waiting for ... retry=5 elapsed=3524 ms
Requesting new device state dump
***Waiting for ... Failed!
Which makes it hard to debug
Bug: 167521849
Test: atest FlickerLibTest
Change-Id: Id04a33a51987043651ae982a3007681a72e0b382
Previously the test sometimes failed because the it ended before the PIP window flags were correctly updated. Now ensure animation is complete before making assertions
Bug: 190215146
Test: atest WMShellFlickerTests
Change-Id: I9c49ca3919e2e43602745b113499e086b9febb50
The background color of splash screen starting window may depend
on the declared window background and the content if icon. That
may be expensive operations if the drawables are not using pure
color. Because the attributes to compute the colors are simple,
it only need a few fields to identify whether the incoming request
has been computed. So it is worth to cache them with very small
extra memory. The cache of a package will be cleared if the package
is removed or replaced.
It may save the creation time up to 20ms (depends on the complexity
of the drawable).
Bug: 190176296
Test: atest StartingSurfaceDrawerTests#testColorCache
Test: Cold/warm launch app twice and compare the duration of
trace name "makeSplashScreenContentView". The second time
should be faster. Re-install the app and launch again,
the trace will contain "peekWindowBGColor" that means
that cache for the package was cleared.
Change-Id: I61158416694a226999843fa8fc6a8b23d6893f02
* adjust the default spacing so that its small enough that 5 bubbles
can show on crosshatch (5 is the default)
* Add max bubbles to BubblePositioner, replace the other usages
Test: atest BubbleDataTest
Test: manual - have 5 bubbles
- adjust screen size to largest
- open the stack
=> notice that the number of bubbles have changed and
they all fit on the screen without overlap
- repeat & check the different densities
Bug: 187715444
Change-Id: I4794ed89541eeb573c367748f980cf7ffe45d3f3
* Add shadows back -- icon lib is no longer adding shadows but
bubbles should still have them for background protection.
* The shadow is active on all bubbles when:
- the stack is being dragged around & bubbles trail behind it
- the stack is expanded (the bubbles can be dragged to dismiss &
can show on top of the expanded view or overflow)
* When the stack is resting, only the top two bubbles show a shadow
& the bubbles below that animate their Z translation so the change
is smooth.
* Also put the # of bubbles we show in the stack in a static int &
updated usages
Test: visual - add 5 of the 'test bubbles' from the test app
and notice the white backgrounds don't blend together
due to the shadow & that they are distinct when
placed on a white background
- drag / fling the stack around & notice shadows show
for all the bubbles while moving but once they come
to rest you don't see a stack of shadows
Bug: 183657577
Change-Id: I0c273f4d0261db9eac1b49ef584fd62fbb67cc9a
TaskSurfaceHelper(Controller) will be used as an interface to communicate
with the SurfaceControl of the underlying Task. This change adds a function
to set the game mode metadata for the task layer.
Bug: 186025682
Test: atest TaskSurfaceControllerTest
Change-Id: I136b65636b98e1883eaf9e4f4f0b34c61350d4e4
* Update sizes of badge & bubble; also simplify some of the sizing
code, we can do it with just the overall size
* Simplified things, instead of the inner / outer sizes just use
the overall size
Test: visual - create a bubble and look at the size of the bubble and
badge
visual - have some bubbles, change display size, create a new
bubble & verify that all of the sizes are the same
Bug: 183657577
Change-Id: Ibd8609a8737bb0a57519fa70fba17138bb69b379
Adds a parameter to the IRemoteTransitionFinishedCallback. This
transaction will be merged into the finish transaction before it is
applied. This is needed by transitions like live-tile recents where
the end-state of the transition is altered during the "animation".
Bug: 172695387
Test: open app, swipe up to overview, resume that same app, screen
shouldn't turn black anymore.
Change-Id: I6fa1e22288ce087ad17fdfc950a8419e6ba61a47
The display area's bounds and orientation changed might be callbacked
seperatedly when the device's folded state changed, causing the
SplitLayout rendered divider bar into wrong orientation. This makes sure
to update divider bar and split layout correspondingly when the
orientation, rotation and root bounds chagned.
Fix: 189101216
Test: atest WMShellUnitTests
Change-Id: Ie5d7132e4122b82d9b5b404a40f97cca3095ce2c
Test: manual - add more than 2 bubbles, note you only see the top 2
- expand & collapse the stack, note you only see top 2
after collapse
- fling the stack around, note once it hits the edge
you only see top 2 bubbles but while dragging around
you see all of them following
Bug: 180142824
Change-Id: I168a14e1fba1506f53ed0734b55b44971d128de4
When iterating through registered transitions and finding one and
marking as active, WM sets a reset transition which runs at when the
transition handler runs its finish callback. However, not all transition
handler wants a complete reset of the transition; in PiP's case, it
actually wants to set the final position to the new PiP x and y
coordinates. Passing in the finish transition to #startAnimation will allow
each transition handler to customize and overwrite values as necessary.
Bug: 165793917
Test: Enable Transitions, enter PIP - PIP animates correctly now
Change-Id: I741a04c1a9123c924383168c0db48646ef34059d
The flicker test suite grew and now trigger a treehuger SLO violation. To address this problem create different groups for different tests using: --module-arg <TEST SUITE>:include-annotation:<GROUP>
Where:
<TEST SUITE> = FlickerTests or WMShellFlickerTests
<GROUP> = com.android.server.wm.flicker.annotation.Group1 or com.android.server.wm.flicker.annotation.Group2 or com.android.server.wm.flicker.annotation.Group3
For example:
1) to run only tests in the first group in flicker use: `--module-arg FlickerTests:include-annotation:com.android.server.wm.flicker.annotation.Group1`
2) to run only the third group of tests from wmshell flicker: ``--module-arg FlickerTests:include-annotation:com.android.server.wm.flicker.annotation.Group3`
Bug: 180620475
Test: atest FlickerTests WMShellFlickerTests with the respective parameters
Change-Id: I82f668713ba262bafe2758e2c618bfc060cc2c8a
* Allow bounds to be set on launch params for multiwindow activities
* Users of TaskView should pass bounds when starting an activity
otherwise they will see this animation
* Modify bubbles & controls to pass launch bounds
Test: atest TaskLaunchParamsModifierTests LaunchParamsControllerTests
MultiWindowTests
Bug: 182299605
Bug: 182516248
Change-Id: Ie5337593d776309f8aac0c6991cf846463e519a7
Tasksnapshot window can block touch event so user may not able
to touch the screen after showing task snapshot. Remove the delay
so app window can response touch event as soon as possible.
Bug: 187227846
Test: atest TaskSnapshotWindowTest
Change-Id: I5fb0fa3a1e6a5e6210d3baf400a84c5892bd2e34
The splashscreenview can be replaced if starting window was transferred
and the first starting window didn't added success.
There should verify the appToken before setViewSynchronized set the
splashscreenview back to the container.
Issue sequence:
- Start first activity A, core request to add a starting window for it.
- Start second activity B, core try to transfer starting window from A
to B but since the window haven't added back, there will trigger to
add a new starting window for B.
- SystemUI add starting window to A but added fail because there was
transferred.
- SystemUI add starting window to B, success.
- Choreographer post setViewSynchronized to add view for A and B to the
container, because we only verify by taskId, so the SplashscreenView was
overwrite by A.
- After reveal animation finish, SplashScreenView#post will not be
executed because this view was not on screen.
Fixes: 188540606
Test: atest StartingSurfaceDrawerTests
Test: Open twitter from notification.
Change-Id: I894da75827556d3c1bc8bb0656196102de5a6847
When a Task is detached but is still stored as a recent Task, it should
be allowed to launched into split screen.
Bug: 176061101
Test: atest WMShellFlickerTests:EnterSplitScreenFromDetachedRecentTask
Test: atest WmTests:RecentTasksTest
Change-Id: Ic72901ca76f4acb6e68926062675ecc290b399be
* changes:
Adjust split layout with IME animation in split (5/N)
Adjust split layout with IME animation in split (4/N)
Adjust split layout with IME animation in split (3/N)
Adjust split layout with IME animation in split (2/N)
Adjust split layout with IME animation in split (1/N)