From be9f50bacb4e1422a60396ae05409bac162109ef Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Thu, 2 Jun 2022 16:51:32 -0400 Subject: [PATCH] Notify unlock controller when remote animation ends due to null finishedCallback. In some cases, when unlocking to an activity that is rotating, we can end up getting a null apps/callback since the activity we were unlocking to is destroyed. In this case, we should still tell the unlock controller that the animation has ended, so that we can reset state. This was resulting in the launcher icons being 'prepared' for unlock indefinitely, leaving them invisible/shrunken. Fixes: 231690494 Test: rotate to landscape, lock, keep phone physically in landscape, unlock to launcher Change-Id: I1e019fabc988f9ad316824d29e3d6fda5f62177b --- .../src/com/android/systemui/keyguard/KeyguardViewMediator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index e379d766f0caf..62fc960297811 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2497,6 +2497,8 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, // supported, so it's always null. mContext.getMainExecutor().execute(() -> { if (finishedCallback == null) { + mKeyguardUnlockAnimationControllerLazy.get() + .notifyFinishedKeyguardExitAnimation(false /* cancelled */); mInteractionJankMonitor.end(CUJ_LOCKSCREEN_UNLOCK_ANIMATION); return; }