From 5a4f92c209e4b20bb6e60df176673c42865d5131 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 2 Jul 2018 13:15:23 -0700 Subject: [PATCH] Hide windows even when AOD is off AOD might be off but it can become visible when the user double taps or lifts the phone. We should prepare the window manager for these cases. Test: turn AOD on and off, set screen lock to 'None', double tap display Bug: 110938816 Change-Id: I6f2db86579d5b86a86fcd1a4515ee77c78460c9d --- .../com/android/systemui/keyguard/KeyguardViewMediator.java | 3 +++ .../src/com/android/systemui/statusbar/phone/StatusBar.java | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index b9d1021f086d8..120fa428fe2e9 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2103,6 +2103,9 @@ public class KeyguardViewMediator extends SystemUI { pw.print(" mDrawnCallback: "); pw.println(mDrawnCallback); } + /** + * @param aodShowing true when AOD - or ambient mode - is showing. + */ public void setAodShowing(boolean aodShowing) { setShowingLocked(mShowing, aodShowing); } 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 ae1da56973214..e3e791de0ffa7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -4733,7 +4733,6 @@ public class StatusBar extends SystemUI implements DemoMode, boolean dozing = mDozingRequested && mState == StatusBarState.KEYGUARD || mBiometricUnlockController.getMode() == BiometricUnlockController.MODE_WAKE_AND_UNLOCK_PULSING; - final boolean alwaysOn = DozeParameters.getInstance(mContext).getAlwaysOn(); // When in wake-and-unlock we may not have received a change to mState // but we still should not be dozing, manually set to false. if (mBiometricUnlockController.getMode() == @@ -4742,7 +4741,7 @@ public class StatusBar extends SystemUI implements DemoMode, } if (mDozing != dozing) { mDozing = dozing; - mKeyguardViewMediator.setAodShowing(mDozing && alwaysOn); + mKeyguardViewMediator.setAodShowing(mDozing); mStatusBarWindowManager.setDozing(mDozing); mStatusBarKeyguardViewManager.setDozing(mDozing); if (mAmbientIndicationContainer instanceof DozeReceiver) {