Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +8 −9 Original line number Original line Diff line number Diff line Loading @@ -833,8 +833,10 @@ public class KeyguardViewMediator extends SystemUI { mDeviceInteractive = false; mDeviceInteractive = false; mGoingToSleep = true; mGoingToSleep = true; // Reset keyguard going away state so we can start listening for biometric auth // Reset keyguard going away state so we can start listening for fingerprint. We setKeyguardGoingAway(false); // explicitly DO NOT want to call mStatusBarWindowController.setKeyguardGoingAway(false) // here, since that will mess with the device lock state. mUpdateMonitor.setKeyguardGoingAway(false); // Lock immediately based on setting if secure (user has a pin/pattern/password). // Lock immediately based on setting if secure (user has a pin/pattern/password). // This also "locks" the device when not secure to provide easy access to the // This also "locks" the device when not secure to provide easy access to the Loading Loading @@ -1814,7 +1816,8 @@ public class KeyguardViewMediator extends SystemUI { mHideAnimationRun = false; mHideAnimationRun = false; adjustStatusBarLocked(); adjustStatusBarLocked(); userActivity(); userActivity(); setKeyguardGoingAway(false); mUpdateMonitor.setKeyguardGoingAway(false); mStatusBarWindowController.setKeyguardGoingAway(false); mShowKeyguardWakeLock.release(); mShowKeyguardWakeLock.release(); } } mKeyguardDisplayManager.show(); mKeyguardDisplayManager.show(); Loading Loading @@ -1846,7 +1849,8 @@ public class KeyguardViewMediator extends SystemUI { .KEYGUARD_GOING_AWAY_FLAG_SUBTLE_WINDOW_ANIMATIONS; .KEYGUARD_GOING_AWAY_FLAG_SUBTLE_WINDOW_ANIMATIONS; } } setKeyguardGoingAway(true); mUpdateMonitor.setKeyguardGoingAway(true); mStatusBarWindowController.setKeyguardGoingAway(true); // Don't actually hide the Keyguard at the moment, wait for window // Don't actually hide the Keyguard at the moment, wait for window // manager until it tells us it's safe to do so with // manager until it tells us it's safe to do so with Loading Loading @@ -2081,11 +2085,6 @@ public class KeyguardViewMediator extends SystemUI { mHandler.removeMessages(KEYGUARD_DONE_PENDING_TIMEOUT); mHandler.removeMessages(KEYGUARD_DONE_PENDING_TIMEOUT); } } private void setKeyguardGoingAway(boolean goingAway) { mUpdateMonitor.setKeyguardGoingAway(goingAway); mStatusBarWindowController.setKeyguardGoingAway(goingAway); } @Override @Override public void onBootCompleted() { public void onBootCompleted() { mUpdateMonitor.dispatchBootCompleted(); mUpdateMonitor.dispatchBootCompleted(); Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,8 @@ package com.android.systemui.keyguard; import static android.view.WindowManagerPolicyConstants.OFF_BECAUSE_OF_USER; import static android.view.WindowManagerPolicyConstants.OFF_BECAUSE_OF_USER; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.Mockito.when; Loading Loading @@ -88,6 +90,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.start(); mViewMediator.start(); mViewMediator.onStartedGoingToSleep(OFF_BECAUSE_OF_USER); mViewMediator.onStartedGoingToSleep(OFF_BECAUSE_OF_USER); verify(mUpdateMonitor).setKeyguardGoingAway(false); verify(mUpdateMonitor).setKeyguardGoingAway(false); verify(mStatusBarWindowController).setKeyguardGoingAway(false); verify(mStatusBarWindowController, never()).setKeyguardGoingAway(anyBoolean()); } } } } Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +8 −9 Original line number Original line Diff line number Diff line Loading @@ -833,8 +833,10 @@ public class KeyguardViewMediator extends SystemUI { mDeviceInteractive = false; mDeviceInteractive = false; mGoingToSleep = true; mGoingToSleep = true; // Reset keyguard going away state so we can start listening for biometric auth // Reset keyguard going away state so we can start listening for fingerprint. We setKeyguardGoingAway(false); // explicitly DO NOT want to call mStatusBarWindowController.setKeyguardGoingAway(false) // here, since that will mess with the device lock state. mUpdateMonitor.setKeyguardGoingAway(false); // Lock immediately based on setting if secure (user has a pin/pattern/password). // Lock immediately based on setting if secure (user has a pin/pattern/password). // This also "locks" the device when not secure to provide easy access to the // This also "locks" the device when not secure to provide easy access to the Loading Loading @@ -1814,7 +1816,8 @@ public class KeyguardViewMediator extends SystemUI { mHideAnimationRun = false; mHideAnimationRun = false; adjustStatusBarLocked(); adjustStatusBarLocked(); userActivity(); userActivity(); setKeyguardGoingAway(false); mUpdateMonitor.setKeyguardGoingAway(false); mStatusBarWindowController.setKeyguardGoingAway(false); mShowKeyguardWakeLock.release(); mShowKeyguardWakeLock.release(); } } mKeyguardDisplayManager.show(); mKeyguardDisplayManager.show(); Loading Loading @@ -1846,7 +1849,8 @@ public class KeyguardViewMediator extends SystemUI { .KEYGUARD_GOING_AWAY_FLAG_SUBTLE_WINDOW_ANIMATIONS; .KEYGUARD_GOING_AWAY_FLAG_SUBTLE_WINDOW_ANIMATIONS; } } setKeyguardGoingAway(true); mUpdateMonitor.setKeyguardGoingAway(true); mStatusBarWindowController.setKeyguardGoingAway(true); // Don't actually hide the Keyguard at the moment, wait for window // Don't actually hide the Keyguard at the moment, wait for window // manager until it tells us it's safe to do so with // manager until it tells us it's safe to do so with Loading Loading @@ -2081,11 +2085,6 @@ public class KeyguardViewMediator extends SystemUI { mHandler.removeMessages(KEYGUARD_DONE_PENDING_TIMEOUT); mHandler.removeMessages(KEYGUARD_DONE_PENDING_TIMEOUT); } } private void setKeyguardGoingAway(boolean goingAway) { mUpdateMonitor.setKeyguardGoingAway(goingAway); mStatusBarWindowController.setKeyguardGoingAway(goingAway); } @Override @Override public void onBootCompleted() { public void onBootCompleted() { mUpdateMonitor.dispatchBootCompleted(); mUpdateMonitor.dispatchBootCompleted(); Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,8 @@ package com.android.systemui.keyguard; import static android.view.WindowManagerPolicyConstants.OFF_BECAUSE_OF_USER; import static android.view.WindowManagerPolicyConstants.OFF_BECAUSE_OF_USER; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import static org.mockito.Mockito.when; Loading Loading @@ -88,6 +90,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mViewMediator.start(); mViewMediator.start(); mViewMediator.onStartedGoingToSleep(OFF_BECAUSE_OF_USER); mViewMediator.onStartedGoingToSleep(OFF_BECAUSE_OF_USER); verify(mUpdateMonitor).setKeyguardGoingAway(false); verify(mUpdateMonitor).setKeyguardGoingAway(false); verify(mStatusBarWindowController).setKeyguardGoingAway(false); verify(mStatusBarWindowController, never()).setKeyguardGoingAway(anyBoolean()); } } } }