diff options
author | Craig Mautner <cmautner@google.com> | 2014-03-25 20:11:08 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-25 20:11:08 +0000 |
commit | d09550687360544f0659e37f393ba2f5b04b55a4 (patch) | |
tree | 1ead2551061659bbba2a905ab29e06a4ba986973 /policy/src/com/android | |
parent | dc18ce783fa10466d15ec74be38d38555c4750c6 (diff) | |
parent | 74e19f572a598ce907661ed2f5127319f8d7c635 (diff) | |
download | frameworks_base-d09550687360544f0659e37f393ba2f5b04b55a4.zip frameworks_base-d09550687360544f0659e37f393ba2f5b04b55a4.tar.gz frameworks_base-d09550687360544f0659e37f393ba2f5b04b55a4.tar.bz2 |
am 74e19f57: am 6f955df8: am 550b44d1: am f4644189: am 4cf6286c: am 02c7ba73: am 41bb0637: am 76e85eec: am 3bc9971d: am 95d6e32b: am 86f9a93e: Merge "Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs" into jb-mr1-dev
* commit '74e19f572a598ce907661ed2f5127319f8d7c635':
Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
Diffstat (limited to 'policy/src/com/android')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 50037bc..f1adcff 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -105,6 +105,7 @@ import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; +import java.util.HashSet; import static android.view.WindowManager.LayoutParams.*; import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_ABSENT; @@ -381,7 +382,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final Rect mTmpNavigationFrame = new Rect(); WindowState mTopFullscreenOpaqueWindowState; - boolean mHideWindowBehindKeyguard; + HashSet<IApplicationToken> mAppsToBeHidden = new HashSet<IApplicationToken>(); boolean mTopIsFullscreen; boolean mForceStatusBar; boolean mForceStatusBarFromKeyguard; @@ -3370,7 +3371,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) { mTopFullscreenOpaqueWindowState = null; - mHideWindowBehindKeyguard = false; + mAppsToBeHidden.clear(); mForceStatusBar = false; mForceStatusBarFromKeyguard = false; mForcingShowNavBar = false; @@ -3420,12 +3421,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { final boolean showWhenLocked = (attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0; if (appWindow) { + if (showWhenLocked) { + mAppsToBeHidden.remove(win.getAppToken()); + } else { + mAppsToBeHidden.add(win.getAppToken()); + } if (attrs.x == 0 && attrs.y == 0 && attrs.width == WindowManager.LayoutParams.MATCH_PARENT && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) { if (DEBUG_LAYOUT) Slog.v(TAG, "Fullscreen window: " + win); mTopFullscreenOpaqueWindowState = win; - if (!mHideWindowBehindKeyguard) { + if (mAppsToBeHidden.isEmpty()) { if (showWhenLocked) { if (DEBUG_LAYOUT) Slog.v(TAG, "Setting mHideLockScreen to true by win " + win); @@ -3445,8 +3451,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) { mAllowLockscreenWhenOn = true; } - } else if (!showWhenLocked) { - mHideWindowBehindKeyguard = true; } } } |