diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 542ef617622e..4518ee9cb884 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -4210,10 +4210,7 @@ public class StatusBar extends SystemUI implements DemoMode, public void showKeyguard() { mKeyguardRequested = true; - // Unconditionally show keyguard again. There's some logic that relies on this - // being called even when the keyguard is already showing, e.g. for updating - // sensitiveness of notifications and making sure the panels are expanded. - showKeyguardImpl(); + updateIsKeyguard(); } public boolean hideKeyguard() { @@ -4233,7 +4230,12 @@ public class StatusBar extends SystemUI implements DemoMode, updatePanelExpansionForKeyguard(); } if (shouldBeKeyguard) { - showKeyguardImpl(); + if (isGoingToSleep() + && mScreenLifecycle.getScreenState() == ScreenLifecycle.SCREEN_TURNING_OFF) { + // Delay showing the keyguard until screen turned off. + } else { + showKeyguardImpl(); + } } else { return hideKeyguardImpl(); } |