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
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
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)
Previously if user do not trigger OHM, target view was attached
to window and setVisbility INVISIBLE.
Refactor to improve memory & perforamcne for systemui, and align
the state changes of one handed controller
1) Bind OneHandedController OneHandedState to handle target view
attach and remove from window.
2) Do NOT create view and attach to window until STATE_ENTERING,
remove legacy redundant visibility change flow.
3) Detach view from window when STATE_NONE
4) Refine OneHandedState static field definition
5) Consolidate OneHandedTutorialHandlerTest
Test: atest WMShellUnitTests
Test: atest OneHandedTutorialHandlerTest
Test: adb shell dumpsys activity service com.android.systemui
Test: adb shell settings put secure one_handed_tutorial_show_count 0
Test: manual trigger OHM
Test: Trigger OHM and invoke onConfigurationChanged()
Bug: 185558765
Change-Id: I3e9666e2379bceb23e3f80f0d8617a7884100a72
1) UX mentioned the swipe gesture in 3-Button NavgationBar area
may confuse user from taping NavBar buttons(Back, Home, Recents).
They decide to disable the swipe gesture and allow user to trigger
One Handed Mode(3 Button Mode) through A11y shortcut.
However, user can still use OHM by enabled shortcut button on
both Gesture Navigation & 3-Button mode.
2) OHM gestural handler consume the touch event while window
Magnification overlap with NavigationBar area in 3-button mode,
this result Magnification function can no long obtain the control.
Bug: 184903678
Bug: 179648683
Test: manual
Test: atest WMShellUnitTests
Change-Id: Ib9a06e19d749707e6f5e08c3ef803c1681f86bbc
Dismiss multi window from Shell if the task no longer supports multi
window.
Bug: 176061101
Test: manually test with fold/unfold
Change-Id: Ie8bdb70ed63805c6e51a20e6db8f02e91f18dd35
Update Task/ActivityRecord to use the new elgibility check and update
tests
Bug: 176061101
Test: pass existing
Change-Id: Ibb78a43d5901a604b02904be0a0bfdc6da0eb421
Listen to IME position changes in SplitLayout to make sure it updates
divider view status after re-inflated. Also add functions to get IME
position of split which is needed for integrating IME animation with
new split implementations.
Bug: 179262787
Test: atest WMShellUnitTests
Test: observed divider bar won't change to interactive after rotating
devices with IME shown.
Change-Id: Ic01c23e61ffb666cfc292e56dd6dcf4646be749b
Add surface utils to help establishing dim surface layer for splits.
Bug: 179262787
Test: atest WMShellUnitTests
Change-Id: I0c268e0b1891fddcf717e8e54e0d29acbf8c5f24
Update StagePosition to more general SplitPosition so that it could be
shared among split implementations.
Bug: 179262787
Test: atest WMShellUnitTests
Change-Id: I6f461fac62d350f50171136f079cb0254b06d767
Check : go/wm-tests
Ignore the unit tests until the better approach available
Test: atest WMShellUnitTests
Bug: 184813408
Change-Id: I3139afa58ed15c535a55822504c3331771f1bfdf
Per discussion, will keep the two classes in Launcher and WMShell as for
now and re-address the unification in next release. In this change
- deprecate config_pipEnableRoundCorner since it's now behind a system
property and waiting to be turned on
- pass the corner radius value from WMShell to Launcher
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dmUy8qBEMxHShFcFKB3cT3
Bug: 171721389
Test: make sure autoEnterPip has round corner support, see video
Change-Id: If978ee6c3b0307a7423fe51b996f535d7009e74c
1) Fix `Could not find: PipApp`, the test previously used the launcher name, instead of the window name for assertion
2) The command previously missed a `verify` call to actually execute the assertion
Bug: 186115871
Bug: 186445782
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ie9274e273bcda2be24491705cd28d7dc0d5ea5db
The core function of OHM is translate all windows down
instead of resize, it's unnecessary to set WCT & app bounds
that will introduce DA require to cache configuration in
DAInfo as well as handle configuration changes stuffs
This change ensure App Compat mode works good:
- Remove wct.setBounds() & wct.setAppBounds()
- Use float instead of bounds for transition/animation
- Remove unused code
- Reset setWindowCrop(leash, -1, -1) after rotate
- Reset setCornerRadius(leash, -1) after rotate
- Add dump() for OneHandedAnimationController
- Add dump() for OneHandedSurfaceTransactionHelper
Test: atest WMShellUnitTests
Test: maunal trigger OHM, rotate, and obseve function works
Bug: 184091042
Bug: 181091031
Change-Id: I401d9b8a79a2a1526b8683362a1e0330458141b1
When stashing, currently it assumes the entire display is usable - not
taking into insets into consideration that can be caused by navigation
bar, etc.
Bug: 186698828
Test: Manual. Stashing PIP while w/ insets now stashes correctly.
Test: atest PipSnapAlgorithmTest
Change-Id: Ia6cbb8f21b666a4ba4ee10b84e3087b6a23cd982