From 23fd1db68d1c28c8edc4ece1a0a1aa36c278e980 Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Mon, 25 Apr 2016 17:21:34 -0700 Subject: [PATCH] Don't hide app windows due to not showing when locked when keyguard is hidden This worked in pre-N because the only visible app was the app that can be shown when the keyguard is hidden. That isn't the case in multi-window mode where one of the apps can be shown when locked and the other doesn't have the show when locked flag. Only hide the other app if the keyguard is shown. Bug: 28368875 Change-Id: I5039098db74492fadf667fed24fc58448436681a --- .../core/java/com/android/server/policy/PhoneWindowManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 9f31f4fb3f591..cd27fb87357ba 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -4912,7 +4912,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } - if (mWinShowWhenLocked != null && + if (!mKeyguardHidden && mWinShowWhenLocked != null && mWinShowWhenLocked.getAppToken() != win.getAppToken() && (attrs.flags & FLAG_SHOW_WHEN_LOCKED) == 0) { win.hideLw(false);