Commit Graph

1306 Commits

Author SHA1 Message Date
wilsonshih
c2a9637541 Cancel the recents animation when keyguard is occluding.[1/2]
User can enter recents animation while a showWhenLocked activity on top
of keyguard by touch down navigation bar. In legacy, Launcher start the
recents animation by keep the original top activity on top. But for
shell transition, Launcher will start home activity with transient
launch flag. When core receive start activity request, unlike
startRecentsAnimation, core will try to move the activity to top, which
break the keyguard occluding state, so the keyguard will pop up on
screen before dismiss recents animation, and there is not have enough
information for shell know whether to hide the surface of the original
top activity.
To make the occluding state unchange during start transient launch, we
do not resume the launcher activity, also we do not move it to top. So
what we need to do is to collect the surfaces from launcher + top
occluding task + wallpaper and send this transition to shell.
Another change is Launcher will finish recents animation by calling the
RecentsAnimationController directly without start home activity. By
determine the top activity when set restoreTransientOrder, there will
update the hierarchy, which may change the occluding state and decide
whether to play unoccluding animation.

Bug: 230582311
Test: monitor no strange animation when running atest KeyguardTests
Test: enable shell transition. Start showWhenLocked activity while
keyguard showing. Scroll up to dismiss the activity and verify the
activity and home shall be stopped and only keyguard remains on the
screen.
Also verify entering recents works fine when device is unlocked.

Change-Id: Ia16fa01fdc09547cfb3ae1370875ac70f07ede8d
2022-05-25 12:56:10 +08:00
Alex Johnston
00090b1d4a Merge "Add background protection when work biometrics is shown" into tm-dev am: ed00c662dc am: 9eeb0112fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18351382

Change-Id: Ic48ca6f44aabcb4cc02ac03dc656603f8e8a3c4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:00:03 +00:00
Alex Johnston
b3aa96f89f Add background protection when work biometrics is shown
* Remove existing coloured background.
* Add a background with a layout that includes a
  badged icon of the app being opened.

Manual testing steps:
* Set up device with a work profile using TestDPC
* Set a fingerprint in the work profile
* Open a work app
* Lock the device
* Verify the background protection is shown behind
  the biometric prompt

Screenshots:
* Dark mode: https://screenshot.googleplex.com/3SwGWrBREYoZFaH
* Light mode: https://screenshot.googleplex.com/8bzX9wLoFGJ2ado

Bug: 206761107
Test: Manual testing
    WorkLockActivityControllerTest
    TaskStackListenerImplTest
Change-Id: I90d117a97d7457a3186953c16db8bd0bbac048ed
2022-05-16 14:20:56 +01:00
Tony Huang
0a066377f3 Merge "Remove supportsSplitScreenMultiWindow" into tm-qpr-dev 2022-05-16 08:04:27 +00:00
Nick Chameyev
0f3c4e522e Extract unfold classes to a separate library
No behaviour changes in this CL.
Extracted classes related to the fold/unfold
animation (that plays on foldable devices) to
a separate library that does not depend on
system classes. This is necessary to ease
reusing these classes in live wallpapers.

Bug: 231936088
Test: fold/unfold device
Change-Id: Ic1e1ec742867fca9c1209b930accd5738de18e39
2022-05-13 13:33:17 +00:00
Tony Huang
98b4783fa8 Remove supportsSplitScreenMultiWindow
For new split screen, we are using supportsMultiWindow and other
multi-window features should use it too so remove
supportsSplitScreenMultiWindow and update some files which still
use it.

Bug: 199236198
Test: pass existing tests
Change-Id: I3b3ec3376a4c79295f9d9f913585534a3815e75a
2022-05-11 17:52:34 +08:00
Dave Mankoff
2a9196841c Remove last call to Dep.get from NavigationBarView
Removes the last call to Dependency#get from NavigationBarView. A few
more calls were added in the process, but they will be easier to deal
with in future cls.

Bug: 218354102
Test: manual && atest SystemUITests
Change-Id: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
Merged-In: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
2022-05-10 00:23:52 +00:00
Dave Mankoff
6c0c934313 Remove last call to Dep.get from NavigationBarView
Removes the last call to Dependency#get from NavigationBarView. A few
more calls were added in the process, but they will be easier to deal
with in future cls.

Bug: 218354102
Test: manual && atest SystemUITests
Change-Id: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
Merged-In: I0b6b3837d9f1cfd11f0cdb4089fb51ecf79b467b
2022-05-09 20:45:25 +00:00
Justin Weir
1ebcb179b4 Merge "Ensure log buffers are dumped to file on uncaught exceptions" into tm-dev am: b41c2879b4 am: 844af86b3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17915248

Change-Id: I3acca5dc2642a2c001d97a841834e0560cfaa139
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 13:36:11 +00:00
TreeHugger Robot
bd3b9d8695 Merge "Listen for VIS window visibility changes in SysUI" into tm-dev am: 0b870355cb am: 9ef47d9ed9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17211291

Change-Id: I7517f6109e45142d02b9749355f5ca7398847a53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:52:48 +00:00
Justin Weir
7209b5baf1 Ensure log buffers are dumped to file on uncaught exceptions
Move the functionality for wrapping an uncaught exception pre-handler
from PluginManager to a standalone manager. Make DumpHandler register
another uncaught exception pre-handler that will tell the log buffer
eulogizer to dump contents to a file.

Fixes: 213884413
Test: manually verified, added tests, and ran atest
Change-Id: If829fc33769819624530f766178689ecf0374926
2022-05-02 20:41:24 +00:00
Josh Tsuji
49b3051783 [conflict] Merge "Use Launcher smartspace instead of SysUI's for the shared element transition." into tm-dev am: 7b5e80f2f6 am: 4c4fac6cad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17892808

Change-Id: I366fed58aafc477399a792e5b65fca4df915a4d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 11:07:45 -04:00
TreeHugger Robot
0b870355cb Merge "Listen for VIS window visibility changes in SysUI" into tm-dev 2022-04-30 03:29:16 +00:00
Winson Chung
4801f789c5 Listen for VIS window visibility changes in SysUI
Bug: 222308557
Bug: 216301097
Test: Manual, invoke assistant on the lockscreen and verify you can
      go back

Change-Id: I675a0c694b8d85e7cd67f7a550fe8e8ab85e9ad2
2022-04-29 21:11:49 +00:00
Josh Tsuji
ddfe8bda75 Use Launcher smartspace instead of SysUI's for the shared element transition.
See justification/explanation in linked bug.

I re-ordered some methods in the unlock controller so they'd make more sense,
they're generally called from top to bottom now during the unlock sequence.

Bug: 229890190
Fixes: 227713319
Test: atest SystemUITests
Test: manual
Merged-In: I58fa437eea183691ff29548143664698498c2105
Change-Id: I58fa437eea183691ff29548143664698498c2105
2022-04-29 05:40:54 +00:00
Nick Chameyev
f970175b79 Merge "Initialize StatusBar unfold animation with 1f progress" into tm-dev am: cd1db9f39e am: bbe6bb795b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17884335

Change-Id: Ic96c76cc1a94621deab7eaf768ac2b1767d4d240
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 14:58:58 +00:00
Nick Chameyev
cd1db9f39e Merge "Initialize StatusBar unfold animation with 1f progress" into tm-dev 2022-04-25 14:24:32 +00:00
Issei Suzuki
3a0ce75489 Merge "Add timestamp to ActivityOptions.OnAnimation*Listener" into tm-dev am: 408b90ffad am: 69ca04c6e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17860344

Change-Id: I2eee80f5c11f997b8071ac62bcb1afa939365251
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 05:10:02 +00:00
Issei Suzuki
8fbc23c5c9 Add timestamp to ActivityOptions.OnAnimation*Listener
Bug: 229948029
Test: atest ActivityTransitionTests
Change-Id: I1e6d21c8b603f4e81bde6c649868baad625c2b38
2022-04-22 21:47:24 +02:00
Josh Tsuji
e585c86f02 Merge "Invalidate home task snapshot onWakeAndUnlock." into tm-dev am: 30183c1cf8 am: 84545d2acf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17802841

Change-Id: Ia919ca13990c794f6ee5f47fae7bf9393bff5208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:59:20 +00:00
Josh Tsuji
30183c1cf8 Merge "Invalidate home task snapshot onWakeAndUnlock." into tm-dev 2022-04-21 18:23:28 +00:00
Nick Chameyev
86054beef0 Initialize StatusBar unfold animation with 1f progress
Initializes move from center animator for the statusbar
views with 1f progress, so when the device is booted
in unfolded state and rotated it the translation
wil be applied with 1f progress.

When booted in folded mode the progress will start
from 0f so it doesn't affect the animation.

Bug: 229738545
Test: kill sysui in unfolded state, rotate the device,
  rotate during fold/unfold animation
Test: atest com.android.systemui.statusbar.phone.StatusBarMoveFromCenterAnimationControllerTest
Change-Id: Ia0d4a44ddc444420d3695cab328558bf2fbe589d
2022-04-21 14:22:24 +01:00
Tony Huang
6ebe572217 Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev am: 64202a268d am: ef3ee7afd4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17518067

Change-Id: I168e8b069a658f09de7d85c4c295eddfc01fcb8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 12:09:32 +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
c9e0ac722a Merge "Revert "Deprecate getSfInstance usage in PiP component"" into tm-dev am: 654c80a2df am: d50b58b680
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17805905

Change-Id: I46e20922880bee9fee52947b5787cae1e6e21e10
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 20:03:42 +00:00
Hongwei Wang
654c80a2df Merge "Revert "Deprecate getSfInstance usage in PiP component"" into tm-dev 2022-04-20 19:31:59 +00:00
Evan Rosky
4c28740628 Merge "Only manipulate leashes for leaf-tasks when adapting to legacy" into tm-qpr-dev 2022-04-20 16:03:20 +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
Evan Rosky
b514790cbc Only manipulate leashes for leaf-tasks when adapting to legacy
We only wrap leaf-tasks for legacy animations; however, I forgot
to update some places so they were trying to use non-leaf leashes.

Bug: 229758341
Test: atest ActivityVisibilityTests#testTurnScreenOnAttrNoLockScreen_SplitScreen
Change-Id: Iee5c08c8dad268b798b372311a80ddede1a4beaa
2022-04-19 15:15:21 -07:00
Nick Chameyev
331df57aae Merge "Finish unfold transition when screen turns on after half-folded" into tm-dev am: 6da0c2fce2 am: 82e49aafcb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17757965

Change-Id: I86827b9b83672c081b76895395ccce04a4900cf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 17:53:15 +00: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
Evan Rosky
6117e9ff3e Merge "Hide leaf-tasks at end of swipe-to-home animation" into tm-qpr-dev 2022-04-18 16:34:59 +00:00
TreeHugger Robot
1ae313718a Merge "Make unfold timeout configurable in resources" into tm-dev am: 915970e486 am: e317ab47ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17539068

Change-Id: I69e3cf55720a96c69d33a9d863585c91b85287fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 05:08:47 +00:00
TreeHugger Robot
915970e486 Merge "Make unfold timeout configurable in resources" into tm-dev 2022-04-15 04:24:02 +00:00
Evan Rosky
49084b0b53 Hide leaf-tasks at end of swipe-to-home animation
This is needed for split-screen. Since their leaf tasks
are not "independent", Transitions.java will not hide them
in the finish-transaction (it shouldn't because it doesn't
know if the parent is doing the hiding). In recents' case,
though, we know that the tasks will be hidden at leaf-level
(due to being reparented out of split).

Without hiding here, there will be a flicker after it gets
reparented out of the animation leash, but before the app
visibility is committed in WMCore.

Bug: 228883780
Test: Enter split, swipe-to-home.
Change-Id: I9d0fa1542cb82aabbc89998368864107cee56c72
2022-04-14 14:47:43 -07:00
Sunny Goyal
699f813c65 Merge "Changing TaskStackChangeListener to an interface" into tm-dev am: 3b952a4a1c am: dc6d585601
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17724905

Change-Id: I6d7ceeff66245b54237ca8d8d019871fe944f2db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 20:45:27 +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
Evan Rosky
811e308f67 Merge "Only wrap leaf tasks when creating legacy remote targets" into tm-qpr-dev 2022-04-13 18:39:53 +00: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
Evan Rosky
9c57479aac Only wrap leaf tasks when creating legacy remote targets
Legacy animations only know how to deal with leaf tasks,
so don't give them any non-leaf tasks. We were originally trying
to hack around this by rewriting task-ids and such, but that
seemed a bit fragile and there were likely several places where
that change was still missing.

This CL just switches back to all leafs.

Bug: 228883780
Test: use split-screen in shell-transitions.
Change-Id: Ic18412ea9e20e1b2f133a936c63d1a6576ce50a6
2022-04-12 18:03:15 -07: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