OSDN Git Service

Hide windows even when AOD is off
authorLucas Dupin <dupin@google.com>
Mon, 2 Jul 2018 20:15:23 +0000 (13:15 -0700)
committerLucas Dupin <dupin@google.com>
Mon, 2 Jul 2018 23:05:44 +0000 (23:05 +0000)
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
Fixes: 110938816
Change-Id: I6f2db86579d5b86a86fcd1a4515ee77c78460c9d
Merged-In: I6f2db86579d5b86a86fcd1a4515ee77c78460c9d

packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java

index 6809e76..25fdd84 100644 (file)
@@ -2100,6 +2100,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);
     }
index cd30104..a05dc9a 100644 (file)
@@ -4719,7 +4719,6 @@ public class StatusBar extends SystemUI implements DemoMode,
         boolean dozing = mDozingRequested && mState == StatusBarState.KEYGUARD
                 || mFingerprintUnlockController.getMode()
                         == FingerprintUnlockController.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 (mFingerprintUnlockController.getMode() ==
@@ -4728,7 +4727,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) {