From e1de9f674575df3b17e475c4f32dd93d33e596e3 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Wed, 23 Sep 2015 14:59:50 -0700 Subject: [PATCH] Fix black Keyguard When a window has both the flag fullscreen and the dismiss Keyguard flag, we end up in a state where we hide the status bar window but all other windows, because mShowingLockscreen nevers gets set correctly. Move it up so we always set it no matter whether the status bar window was visible. Bug: 22875357 Change-Id: I7953fe7100cc99fe8fb7424a9b311b4630426657 --- .../java/com/android/server/policy/PhoneWindowManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 31286b6d5ff68..5c11800a4528c 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -4388,6 +4388,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (attrs.type == TYPE_STATUS_BAR) { if ((attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) { mForceStatusBarFromKeyguard = true; + mShowingLockscreen = true; } if ((attrs.privateFlags & PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT) != 0) { mForceStatusBarTransparent = true; @@ -4408,9 +4409,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { mForceStatusBar = true; } } - if ((attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) { - mShowingLockscreen = true; - } if (attrs.type == TYPE_DREAM) { // If the lockscreen was showing when the dream started then wait // for the dream to draw before hiding the lockscreen.