From 41eecffa01f010ab71aecab7a57e528f677c1707 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 29 Jun 2017 14:09:52 +0200 Subject: [PATCH] AOD: Hide SIM PIN entry while dozing Fixes an issue where the SIM pin entry was still showing on AOD instead of being hidden while the device is off. Change-Id: I1f0493b22818a817c2e519f7b4aa1c1df4be9a20 Test: Enable SIM PIN, reboot device, ensure that SIM PIN entry dialog is not showing on AOD. Fixes: 62657496 --- .../statusbar/phone/StatusBarKeyguardViewManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 9b0307d6522ef..2833ff1db27ff 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -152,7 +152,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb * {@link KeyguardBouncer#needsFullscreenBouncer()}. */ protected void showBouncerOrKeyguard(boolean hideBouncerWhenShowing) { - if (mBouncer.needsFullscreenBouncer()) { + if (mBouncer.needsFullscreenBouncer() && !mDozing) { // The keyguard might be showing (already). So we need to hide it. mStatusBar.hideKeyguard(); @@ -258,8 +258,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } public void setDozing(boolean dozing) { - mDozing = dozing; - updateStates(); + if (mDozing != dozing) { + mDozing = dozing; + reset(dozing /* hideBouncerWhenShowing */); + updateStates(); + } } public void onScreenTurnedOff() {