Also, add ability to pass in null to invalidateHomeTaskSnapshot
if the correct permissions are held, so that System UI does not
need to IPC to Launcher to ask it to invalidate itself.
Fixes: 229191103
Test: atest SystemUITests
Test: wake and unlock, note no double launcher
Change-Id: I0c547639979460b3a85b0ef0a8bbf760d60054cb
When screen turns on after we received half-folded event
the transition started and didn't end. We had the same issue
when the fully unfolded event was received before screen
turned on. In this case now we forcefully finish the transition.
I added the same behaviour for half-folded case as well.
Bug: 222705041
Test: quick folding/unfolding with only
0/10 degrees hinge angle sensor
Test: atest com.android.systemui.unfold.updates.DeviceFoldStateProviderTest
Change-Id: I964217acaaba77926c43796d16ad00a4ca15203e
This is to patch the entering PiP transition with YT tablet UI, which is
used in unfolded state and/or tablets landscape mode.
Changed also to use SurfaceControl.Transaction#setCrop instead of
deprecated setWindowCrop.
Bug: 198309223
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/eODHpvqAQPfbwjFamtRYC1
Test: manual, see video
Change-Id: I6fbfea110f9a73faf05ebeb90773dcee58b41328
This change will change the providedInternalInsets from a single insets
to a insets array. The one adding the insets can make use of the array
to apply different insets to the window when calculating the provided
insets by the window for different insets types.
With that, the task bar can provide zero insets for the tappable element
type when stashed.
Bug: 215411414
Test: DisplayPolicyTests
Change-Id: I84cd7ef6a2bc19229d3c09f752f65c83eb5c7dde
This allows to have a different timeout for the emulator, and to write better e2e integration tests for the unfold transition.
For now, the timeout is pretty low and the emulator is not able do dump all the views in time.
Test: atest DeviceFoldStateProviderTest
Bug: 220087235
Change-Id: Icd45a312c878f0a9d9f33f35cbaf4bac37cc5dd1
Since Launcher indexes TaskView with leaf task ids directly. Collects
opening leaf tasks only to make sure Launcher can identify the proper
TaskView to animate in while finishing the recents transition.
Bug: 223396206
Test: adb shell setprop persist.wm.debug.shell_transit 1 && adb reboot,
enter split mode, switch back and forth between the split pair and
normal fullscreen tasks in overview. Verified both of the
splitting tasks animate in together.
Change-Id: Icec4e3376d7127f6a9ab2820057a2bba63539c3f
- Deprecated also the custom animation handler in PhysicsAnimator
- Ensures the transactions within PiP have VsyncId being set
Bug: 222697646
Test: verify PiP functionalities still work
Change-Id: Ib9a9bab2ffdc11b887271f4a05ee9953865db8b1
Deprecate also the shadow radius for PiP in Task
Bug: 206508708
Test: Verify the PiP enter/exit/move/resize transitions
Change-Id: I8ff83dd4e626a3455373fed6c908cf131ecae8fe
topActivityType is available directly from taskInfo. In the test, the windowConfiguration was not mocked correctly.
Fixes: 226967913
Test: atest DeviceFoldStateProviderTest
Change-Id: Ia0f2114ff675d943a7e2c2555aa0d11b854883a0
shell-transitions doesn't use IRecentsAnimationController, so
instead add a companion takeTaskSnapshot to ATMS and use that
in the RecentsAnimation adapter.
Bug: 226446305
Test: go to recents, start select-mode on live tile
Change-Id: I35a1e7be02a01767802eca02b6ba045a7c8309b0
When folding the device immediately after unfolding
the folding animation wasn't triggering sometimes.
It happenned because we force the animation to end
by 'cancelling' it (setting target progress to 1f and
ignoring all hinge angle events).
Added resetting cancelling when we started folding
again during this cancellation animation.
Bug: 219962337
Test: atest com.android.systemui.unfold.progress.PhysicsBasedUnfoldTransitionProgressProviderTest
Change-Id: Iafd1b3e40f40debf4c09874ddb418a1f2fd2824c
On top of apps, the fold animation is triggered only after a threshold. On Launcher, there is not threshold.
In this way, we don't show fold animation while apps might be handling table top/half_folded state.
+ timeout to finish the animation made shorter
Test: atest DeviceFoldStateProviderTest
Bug: 225185239
Change-Id: Idaed140cec723ab54ed8c75aaf4a8e80261dc0eb
If a pip (or any other window) is expanded to fullscreen, it will
occlude recents. In this situation, we should immediately finish
the recents "animation" and let the new one play so we don't hang.
This also adds a new "callback" for "replace with screenshot".
We need this because if we just finish recents, it will immediately
destroy the "live" tile. So this callback lets us replace the
"live" tile with a screenshot beforehand.
Bug: 223321653
Test: Put app in Pip, open another app, go to recents, expand pip
Change-Id: I8a5ca05d5eef43e37c74f38b7988003bad7cdade
There are a few situations where recents will tell WMCore
that it is finishing (going home), but then actually doesn't
finish. In these cases, we need to tell WMCore not to enter
PiP even when it normally would.
This functionality is added to shell-transitions by adding
a signal to WindowContainerTransaction.
Bug: 223317893
Bug: 223317556
Test: open pipable, go to recents, swipe pipable to close.
Change-Id: I969ae8b562aa54fc06e35164e676205682f24994
A list of boolean teamfood flags is now available. Adding a flag to
the list means that the flag is tied to the value of the teamfood
flag.
If the flag is manually set, that manually set value will take
precedence.
If the flag is true by default, the true value will take precedence.
Otherwise, the flag will fallback to the value of the teamfood flag.
Bug: 223379190
Test: atest SystemUITests
Change-Id: Id4739679e633c25abccd9093d15eb5e016cd5ac2
Stop propergating child task information up if the parent task having
multiple child task changes in the same transition. And skip wrapping it
into the final remote animation targets so its child tasks won't get
transfered multiple-times in such transition.
Bug: 207185041
Bug: 206487881
Test: enabled shell-transition and triggered split screen, observed
the recent animation works properly
Change-Id: I8d2c62df99ccb88303aa2b06dd18f2f4edb330f2
Limits taskbar icons translation animation
only when the display is in natural orientation.
Bug: 219958588
Test: fold/unfold in portrait and landscape
Change-Id: I602fad8ce11a7b9443c8d66e850f819a86372a7e
* Move the BitmapUtil to com.android.internal package
* Remove bitmap result from GameSession#takeScreenshot API
Bug: 219992742
Test: atest GameServiceProviderInstanceImplTest
Change-Id: I4bf29d623f781434ec7ffe4443e658880c31e619
Move the BitmapUtil to com.android.internal package
This was taking ~13ms on the ui thread.
I had to move up the sysui background executor as it was only provided inside sysui dagger component, but those classes are also used in WM component.
Bug: 221394115
Test: Folding device and check animation
Change-Id: I766d879d68f555214f9c1d2434cfab732937cd32
Remove remaing using of legacy split on SysUi and
wm-shell(not include legacy split screen packages).
Bug: 199236198
Test: pass exising tests
Change-Id: Iaf0bb6da51fce7dbcf4e9b262540628497fd2ba7