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
This commit is contained in:
Josh Tsuji
2022-06-02 16:51:32 -04:00
parent 0dfb582d5a
commit be9f50bacb

View File

@@ -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;
}