Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a1550ad authored by Josh Tsuji's avatar Josh Tsuji Committed by Automerger Merge Worker
Browse files

Merge "Prevent double keyguardGoingAway, and finish cancelled animations."...

Merge "Prevent double keyguardGoingAway, and finish cancelled animations." into sc-v2-dev am: 13453180 am: aebaaa29

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16441222

Change-Id: Ia59b4b68eb8f1b93ae5a1fc1240c04e221a22774
parents 8199ec0d aebaaa29
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -2099,6 +2099,15 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
    private final Runnable mKeyguardGoingAwayRunnable = new Runnable() {
        @Override
        public void run() {
            // If the keyguard is already going away, or it's about to because we are going to
            // trigger the going-away remote animation to show the surface behind, don't do it
            // again. That will cause the current animation to be cancelled unnecessarily.
            if (mKeyguardStateController.isKeyguardGoingAway()
                    || mSurfaceBehindRemoteAnimationRequested
                    || mSurfaceBehindRemoteAnimationRunning) {
                return;
            }

            Trace.beginSection("KeyguardViewMediator.mKeyGuardGoingAwayRunnable");
            if (DEBUG) Log.d(TAG, "keyguardGoingAway");
            mKeyguardViewControllerLazy.get().keyguardGoingAway();
@@ -2457,9 +2466,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,

        if (mSurfaceBehindRemoteAnimationFinishedCallback != null) {
            try {
                if (!cancelled) {
                mSurfaceBehindRemoteAnimationFinishedCallback.onAnimationFinished();
                }
                mSurfaceBehindRemoteAnimationFinishedCallback = null;
            } catch (RemoteException e) {
                e.printStackTrace();