Commit Graph

1274 Commits

Author SHA1 Message Date
Josh Tsuji
30183c1cf8 Merge "Invalidate home task snapshot onWakeAndUnlock." into tm-dev 2022-04-21 18:23:28 +00:00
Tony Huang
64202a268d Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev 2022-04-21 11:31:22 +00:00
Hongwei Wang
654c80a2df Merge "Revert "Deprecate getSfInstance usage in PiP component"" into tm-dev 2022-04-20 19:31:59 +00:00
Jerry Chang
1a14fc4a5e Add jank instrument support for split screen enter and exit transition
Bug: 203439850
Test: build passed
Test: verified with systrace dump
Change-Id: I9c4464126af2d7631f49d0b001307782d4c01787
2022-04-20 16:36:53 +08:00
Nick Chameyev
6da0c2fce2 Merge "Finish unfold transition when screen turns on after half-folded" into tm-dev 2022-04-19 17:10:27 +00:00
Hongwei Wang
1afd093567 Revert "Deprecate getSfInstance usage in PiP component"
This reverts commit 74092d1e49.

Reason for revert: regression as b/228282275

Bug: 222697646
Bug: 228282275
Change-Id: If21af3b5bf993fa0ed3760bb5c68d23ba0b4cfd5
2022-04-18 22:59:19 +00:00
Josh Tsuji
c1b5ff0481 Invalidate home task snapshot onWakeAndUnlock.
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
2022-04-18 13:07:58 -04:00
TreeHugger Robot
915970e486 Merge "Make unfold timeout configurable in resources" into tm-dev 2022-04-15 04:24:02 +00:00
Sunny Goyal
3b952a4a1c Merge "Changing TaskStackChangeListener to an interface" into tm-dev 2022-04-14 20:11:58 +00:00
Nick Chameyev
fd355c0945 Finish unfold transition when screen turns on after half-folded
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
2022-04-14 14:59:11 +01:00
Hongwei Wang
634396baaf Merge "Use sourceRectHint to calculate scale when enter PiP" into tm-dev 2022-04-13 17:38:34 +00:00
Sunny Goyal
17c0dcb4d2 Changing TaskStackChangeListener to an interface
Bug: 221961069
Test: Presubmit
Change-Id: I37b2604140d9cfa8f828cb3e900a538212f2bb00
2022-04-13 10:30:55 -07:00
TreeHugger Robot
36d012ca1c Merge "Extend providedInternalInsets to be type specific" into tm-dev 2022-04-13 01:53:07 +00:00
Hongwei Wang
be9da6d252 Use sourceRectHint to calculate scale when enter PiP
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
2022-04-11 14:33:33 -07:00
Josh Tsuji
0bd4d53a64 Merge "Adds the staggered ring unlock animation!" into tm-dev 2022-04-11 14:32:46 +00:00
Jerry Chang
ecbc9712eb Merge "Fix weird animation when switching back to split pair from recents" into tm-dev 2022-04-07 02:31:12 +00:00
Yunfan Chen
72e2997f31 Extend providedInternalInsets to be type specific
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
2022-04-06 16:55:54 +09:00
Josh Tsuji
5aedd5edec Adds the staggered ring unlock animation!
Bug: 197636896
Test: a lot of unlocking
Change-Id: I18438b279c911c4f6ca37d954eeca506a1e05980
2022-04-05 18:48:00 -04:00
Nicolo' Mazzucato
42768e94d4 Make unfold timeout configurable in resources
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
2022-04-01 18:05:48 +00:00
Jerry Chang
73656f2ad1 Fix weird animation when switching back to split pair from recents
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
2022-03-31 12:27:52 +00:00
Hongwei Wang
b68626be54 Merge "Deprecate getSfInstance usage in PiP component" into tm-dev 2022-03-31 00:12:04 +00:00
Evan Rosky
b4749ccefa Merge "Hook up shell-transitions screenshotting for recents" into tm-dev 2022-03-30 23:52:15 +00:00
Hongwei Wang
b2a5b198cd Merge "Handle PiP shadow radius in WMShell" into tm-dev 2022-03-30 22:23:51 +00:00
Hongwei Wang
74092d1e49 Deprecate getSfInstance usage in PiP component
- 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
2022-03-30 12:50:54 -07:00
Hongwei Wang
2708c3a74d Handle PiP shadow radius in WMShell
Deprecate also the shadow radius for PiP in Task

Bug: 206508708
Test: Verify the PiP enter/exit/move/resize transitions
Change-Id: I8ff83dd4e626a3455373fed6c908cf131ecae8fe
2022-03-28 16:43:46 -07:00
TreeHugger Robot
f2843d672a Merge "Fix DeviceFoldStateProviderTest" into tm-dev 2022-03-27 20:44:40 +00:00
Nicolo' Mazzucato
ec295771f7 Fix DeviceFoldStateProviderTest
topActivityType is available directly from taskInfo. In the test, the windowConfiguration was not mocked correctly.

Fixes: 226967913
Test: atest DeviceFoldStateProviderTest
Change-Id: Ia0f2114ff675d943a7e2c2555aa0d11b854883a0
2022-03-26 00:19:12 +00:00
Evan Rosky
be2f1eaea9 Merge "Detect "expand to fullscreen" over recents and switch to it" into tm-dev 2022-03-25 21:26:12 +00:00
Nick Chameyev
54c3d1b82e Merge "Continue folding animation after it cancelled if necessary" into tm-dev 2022-03-25 10:28:40 +00:00
Nicolò Mazzucato
c1f95fd38b Merge "Tune fold animation on top of apps" into tm-dev 2022-03-25 09:31:11 +00:00
Evan Rosky
da6af4048d Hook up shell-transitions screenshotting for recents
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
2022-03-24 13:43:38 -07:00
Nick Chameyev
e40fb48498 Continue folding animation after it cancelled if necessary
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
2022-03-24 17:45:30 +00:00
Nicolo' Mazzucato
ef3dfe2a8f Tune fold animation on top of apps
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
2022-03-24 14:53:27 +00:00
Evan Rosky
11df410f7d Detect "expand to fullscreen" over recents and switch to it
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
2022-03-23 16:05:48 -07:00
Evan Rosky
53e39e5d06 Merge "Pass through Recent's finish-but-not-really intent" into tm-dev 2022-03-23 22:45:17 +00:00
Jerry Chang
4f5a02e5ec Merge "Integrate recent animation of single-root split with shell transition" into tm-dev 2022-03-23 00:47:08 +00:00
Evan Rosky
69a8b77741 Pass through Recent's finish-but-not-really intent
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
2022-03-22 14:54:24 -07:00
Dave Mankoff
214c0014ef Add support for TEAMFOOD flag.
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
2022-03-18 10:05:06 -04:00
Jerry Chang
bb750d8ad3 Integrate recent animation of single-root split with shell transition
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
2022-03-16 13:49:04 +00:00
Tony Huang
791c8fed1b Merge "Clean up the legacy split screen (8/n)" into tm-dev 2022-03-14 04:07:44 +00:00
Nick Chameyev
31fc5489fd Merge "Do not run unfold taskbar animation when in portrait" into tm-dev 2022-03-09 10:26:21 +00:00
Nick Chameyev
51e873f5b1 Do not run unfold taskbar animation when in portrait
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
2022-03-08 12:04:34 +00:00
Xiang Wang
ab322f8521 Provide game task bitmap to TakeScreenshotService as screenshot
* 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
2022-03-04 17:23:07 -08:00
Nicolò Mazzucato
4b6d20e55b Merge "Register hinge angle sensor listener in a background thread" into tm-dev 2022-03-04 18:18:55 +00:00
Nicolo' Mazzucato
89e5aa5900 Register hinge angle sensor listener in a background thread
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
2022-03-04 13:50:53 +01:00
Wei Sheng Shih
a8b20748f3 Merge "Cancel recents animation when touch home key" into tm-dev 2022-03-04 08:40:42 +00:00
Tony Huang
d99ba757bd Clean up the legacy split screen (8/n)
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
2022-03-01 16:40:18 +08:00
Ady Abraham
4700294c96 Merge "Remove getSfInstance from InputConsumerController" into tm-dev 2022-02-28 17:30:41 +00:00
Tony Huang
e4590dbf5d Merge "Clean up the legacy split screen (7/n)" into tm-dev 2022-02-25 07:29:40 +00:00
Evan Rosky
0ef57a2152 Merge "Support restoring the original task ordering of transient-launches" into tm-dev 2022-02-25 03:47:37 +00:00