Workaround to fix remote animation hanging.

After Ic78c603b2375d36cf2170b81cca7cddbf334408b, sometimes there will
call keyguardGoingAway twice to trigger the second phase unlock
animation, so several conditions the remote animation may not execute,
so better to send the callback to update the status in window manager.

Right now the framework cannot ignore the second keyguardGoingAway call
because keyguard status in KeyguardViewMediator could be hiding, so
better to trigger startKeyguardExitAnimation once there was receive
keyguardGoingAway.

Still need to find out why will keyguardGoingAway been called twice,
better to merge those call together.

Bug: 190040281
Test: No hanging when launch app and received two keyguardGoingAway
calls.

Change-Id: I3c425066e2fc2d00dc8f55f470efa229607ac83f
This commit is contained in:
wilsonshih
2021-06-17 14:27:21 +08:00
parent fc3e38324f
commit 24ed9cac0e

View File

@@ -2161,6 +2161,15 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
if (!mHiding
&& !mSurfaceBehindRemoteAnimationRequested
&& !mKeyguardStateController.isFlingingToDismissKeyguardDuringSwipeGesture()) {
if (finishedCallback != null) {
// There will not execute animation, send a finish callback to ensure the remote
// animation won't hanging there.
try {
finishedCallback.onAnimationFinished();
} catch (RemoteException e) {
Slog.w(TAG, "Failed to call onAnimationFinished", e);
}
}
setShowingLocked(mShowing, true /* force */);
return;
}