Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +33 −19 Original line number Diff line number Diff line Loading @@ -2199,14 +2199,21 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, // we explicitly re-set state. if (mShowing && mKeyguardStateController.isShowing()) { if (mPM.isInteractive() && !mHiding) { // It's already showing, and we're not trying to show it while the screen is off. // We can simply reset all of the views, but don't hide the bouncer in case the user // is currently interacting with it. if (DEBUG) Log.d(TAG, "doKeyguard: not showing (instead, resetting) because it is " + "already showing, we're interactive, and we were not previously hiding. " + "It should be safe to short-circuit here."); if (mKeyguardStateController.isKeyguardGoingAway()) { Log.e(TAG, "doKeyguard: we're still showing, but going away. Re-show the " + "keyguard rather than short-circuiting and resetting."); } else { // It's already showing, and we're not trying to show it while the screen is // off. We can simply reset all of the views, but don't hide the bouncer in case // the user is currently interacting with it. if (DEBUG) Log.d(TAG, "doKeyguard: not showing (instead, resetting) because it is " + "already showing, we're interactive, we were not " + "previously hiding. It should be safe to short-circuit " + "here."); resetStateLocked(/* hideBouncer= */ false); return; } } else { // We are trying to show the keyguard while the screen is off or while we were in // the middle of hiding - this results from race conditions involving locking while Loading Loading @@ -2731,13 +2738,18 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, setUnlockAndWakeFromDream(false, WakeAndUnlockUpdateReason.SHOW); setPendingLock(false); // Force if we we're showing in the middle of hiding, to ensure we end up in the correct // state. setShowingLocked(true, mHiding /* force */); if (mHiding) { Log.d(TAG, "Forcing setShowingLocked because mHiding=true, which means we're " + "showing in the middle of hiding."); final boolean hidingOrGoingAway = mHiding || mKeyguardStateController.isKeyguardGoingAway(); if (hidingOrGoingAway) { Log.d(TAG, "Forcing setShowingLocked because one of these is true:" + "mHiding=" + mHiding + ", keyguardGoingAway=" + mKeyguardStateController.isKeyguardGoingAway() + ", which means we're showing in the middle of hiding."); } // Force if we we're showing in the middle of unlocking, to ensure we end up in the // correct state. setShowingLocked(true, hidingOrGoingAway /* force */); mHiding = false; if (!mFeatureFlags.isEnabled(Flags.KEYGUARD_WM_STATE_REFACTOR)) { Loading Loading @@ -2947,7 +2959,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime + " fadeoutDuration=" + fadeoutDuration); synchronized (KeyguardViewMediator.this) { // Tell ActivityManager that we canceled the keyguard animation if // handleStartKeyguardExitAnimation was called, but we're not hiding the keyguard, // unless we're animating the surface behind the keyguard and will be hiding the Loading Loading @@ -3215,10 +3226,13 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, // Post layout changes to the next frame, so we don't hang at the end of the animation. DejankUtils.postAfterTraversal(() -> { if (!mPM.isInteractive()) { Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal" + "Not interactive after traversal. Don't hide the keyguard. This means we " + "re-locked the device during unlock."); if (!mPM.isInteractive() && !mPendingLock) { Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal:" + "mPM.isInteractive()=" + mPM.isInteractive() + "mPendingLock=" + mPendingLock + "." + "One of these being false means we re-locked the device during unlock. " + "Do not proceed to finish keyguard exit and unlock."); finishSurfaceBehindRemoteAnimation(true /* showKeyguard */); return; } Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +33 −19 Original line number Diff line number Diff line Loading @@ -2199,14 +2199,21 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, // we explicitly re-set state. if (mShowing && mKeyguardStateController.isShowing()) { if (mPM.isInteractive() && !mHiding) { // It's already showing, and we're not trying to show it while the screen is off. // We can simply reset all of the views, but don't hide the bouncer in case the user // is currently interacting with it. if (DEBUG) Log.d(TAG, "doKeyguard: not showing (instead, resetting) because it is " + "already showing, we're interactive, and we were not previously hiding. " + "It should be safe to short-circuit here."); if (mKeyguardStateController.isKeyguardGoingAway()) { Log.e(TAG, "doKeyguard: we're still showing, but going away. Re-show the " + "keyguard rather than short-circuiting and resetting."); } else { // It's already showing, and we're not trying to show it while the screen is // off. We can simply reset all of the views, but don't hide the bouncer in case // the user is currently interacting with it. if (DEBUG) Log.d(TAG, "doKeyguard: not showing (instead, resetting) because it is " + "already showing, we're interactive, we were not " + "previously hiding. It should be safe to short-circuit " + "here."); resetStateLocked(/* hideBouncer= */ false); return; } } else { // We are trying to show the keyguard while the screen is off or while we were in // the middle of hiding - this results from race conditions involving locking while Loading Loading @@ -2731,13 +2738,18 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, setUnlockAndWakeFromDream(false, WakeAndUnlockUpdateReason.SHOW); setPendingLock(false); // Force if we we're showing in the middle of hiding, to ensure we end up in the correct // state. setShowingLocked(true, mHiding /* force */); if (mHiding) { Log.d(TAG, "Forcing setShowingLocked because mHiding=true, which means we're " + "showing in the middle of hiding."); final boolean hidingOrGoingAway = mHiding || mKeyguardStateController.isKeyguardGoingAway(); if (hidingOrGoingAway) { Log.d(TAG, "Forcing setShowingLocked because one of these is true:" + "mHiding=" + mHiding + ", keyguardGoingAway=" + mKeyguardStateController.isKeyguardGoingAway() + ", which means we're showing in the middle of hiding."); } // Force if we we're showing in the middle of unlocking, to ensure we end up in the // correct state. setShowingLocked(true, hidingOrGoingAway /* force */); mHiding = false; if (!mFeatureFlags.isEnabled(Flags.KEYGUARD_WM_STATE_REFACTOR)) { Loading Loading @@ -2947,7 +2959,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime + " fadeoutDuration=" + fadeoutDuration); synchronized (KeyguardViewMediator.this) { // Tell ActivityManager that we canceled the keyguard animation if // handleStartKeyguardExitAnimation was called, but we're not hiding the keyguard, // unless we're animating the surface behind the keyguard and will be hiding the Loading Loading @@ -3215,10 +3226,13 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, // Post layout changes to the next frame, so we don't hang at the end of the animation. DejankUtils.postAfterTraversal(() -> { if (!mPM.isInteractive()) { Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal" + "Not interactive after traversal. Don't hide the keyguard. This means we " + "re-locked the device during unlock."); if (!mPM.isInteractive() && !mPendingLock) { Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal:" + "mPM.isInteractive()=" + mPM.isInteractive() + "mPendingLock=" + mPendingLock + "." + "One of these being false means we re-locked the device during unlock. " + "Do not proceed to finish keyguard exit and unlock."); finishSurfaceBehindRemoteAnimation(true /* showKeyguard */); return; } Loading