Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +8 −1 Original line number Diff line number Diff line Loading @@ -3207,7 +3207,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, * visible */ public void exitKeyguardAndFinishSurfaceBehindRemoteAnimation(boolean showKeyguard) { Log.d(TAG, "onKeyguardExitRemoteAnimationFinished"); Log.d(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation"); if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) { Log.d(TAG, "skip onKeyguardExitRemoteAnimationFinished showKeyguard=" + showKeyguard + " surfaceAnimationRunning=" + mSurfaceBehindRemoteAnimationRunning Loading @@ -3222,6 +3222,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."); return; } onKeyguardExitFinished(); if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) { Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -221,6 +221,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mSystemClock = new FakeSystemClock(); when(mLockPatternUtils.getDevicePolicyManager()).thenReturn(mDevicePolicyManager); when(mPowerManager.newWakeLock(anyInt(), any())).thenReturn(mock(WakeLock.class)); when(mPowerManager.isInteractive()).thenReturn(true); when(mInteractionJankMonitor.begin(any(), anyInt())).thenReturn(true); when(mInteractionJankMonitor.end(anyInt())).thenReturn(true); mContext.addMockSystemService(Context.ALARM_SERVICE, mAlarmManager); Loading Loading @@ -869,8 +870,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { when(mKeyguardStateController.isShowing()).thenReturn(true); TestableLooper.get(this).processAllMessages(); when(mPowerManager.isInteractive()).thenReturn(true); mViewMediator.onSystemReady(); TestableLooper.get(this).processAllMessages(); Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +8 −1 Original line number Diff line number Diff line Loading @@ -3207,7 +3207,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, * visible */ public void exitKeyguardAndFinishSurfaceBehindRemoteAnimation(boolean showKeyguard) { Log.d(TAG, "onKeyguardExitRemoteAnimationFinished"); Log.d(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation"); if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) { Log.d(TAG, "skip onKeyguardExitRemoteAnimationFinished showKeyguard=" + showKeyguard + " surfaceAnimationRunning=" + mSurfaceBehindRemoteAnimationRunning Loading @@ -3222,6 +3222,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."); return; } onKeyguardExitFinished(); if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) { Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -221,6 +221,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mSystemClock = new FakeSystemClock(); when(mLockPatternUtils.getDevicePolicyManager()).thenReturn(mDevicePolicyManager); when(mPowerManager.newWakeLock(anyInt(), any())).thenReturn(mock(WakeLock.class)); when(mPowerManager.isInteractive()).thenReturn(true); when(mInteractionJankMonitor.begin(any(), anyInt())).thenReturn(true); when(mInteractionJankMonitor.end(anyInt())).thenReturn(true); mContext.addMockSystemService(Context.ALARM_SERVICE, mAlarmManager); Loading Loading @@ -869,8 +870,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { when(mKeyguardStateController.isShowing()).thenReturn(true); TestableLooper.get(this).processAllMessages(); when(mPowerManager.isInteractive()).thenReturn(true); mViewMediator.onSystemReady(); TestableLooper.get(this).processAllMessages(); Loading