diff options
| author | 2023-05-22 22:52:25 +0200 | |
|---|---|---|
| committer | 2023-05-24 10:13:12 +0000 | |
| commit | 2a095eadeaca1fd86c9a3e8f70a7172383ecff85 (patch) | |
| tree | 7eba5418a9d067e1c03334d78064488480ed8796 | |
| parent | 20c31b7b209a1dde2de42ded6ff866d0798e76a1 (diff) | |
Bring back Keyguard CANNED_UNLOCK_START_DELAY wait
This was taken out in I7bc350689affde76f9d3427ea94ff31f56bb75f0 because
I didn't think it was necessary, but it skipped over the "widgets going
away" animation inside the notification shade, so we really need it.
Bug: 281859780
Bug: 283077960
Test: atest KeyguardUnlockAnimationControllerTest
Change-Id: Id4db8771c668767d0c0738c486dd7c711a4941ea
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt index 122e25975837..64d00c576d4d 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt @@ -664,8 +664,24 @@ class KeyguardUnlockAnimationController @Inject constructor( // visible, hide our smartspace. lockscreenSmartspace?.visibility = View.INVISIBLE - // Start an animation for the wallpaper, which will finish keyguard exit when it completes. - fadeInWallpaper() + // As soon as the shade has animated out of the way, start the canned unlock animation, + // which will finish keyguard exit when it completes. The in-window animations in the + // Launcher window will end on their own. + handler.postDelayed({ + if (keyguardViewMediator.get().isShowingAndNotOccluded && + !keyguardStateController.isKeyguardGoingAway) { + Log.e(TAG, "Finish keyguard exit animation delayed Runnable ran, but we are " + + "showing and not going away.") + return@postDelayed + } + + if (wallpaperTargets != null) { + fadeInWallpaper() + } else { + keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation( + false /* cancelled */) + } + }, CANNED_UNLOCK_START_DELAY) } /** |