diff options
author | Craig Mautner <cmautner@google.com> | 2014-03-25 20:15:49 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-25 20:15:49 +0000 |
commit | c89283c5863855fadd8853e524e36e19aaaf142a (patch) | |
tree | 8b0187e5226d825283ac464a665879322cbfb7e2 /policy | |
parent | 1cf8117aa22c5ef16c5513fd1c6d428233df4833 (diff) | |
parent | d09550687360544f0659e37f393ba2f5b04b55a4 (diff) | |
download | frameworks_base-c89283c5863855fadd8853e524e36e19aaaf142a.zip frameworks_base-c89283c5863855fadd8853e524e36e19aaaf142a.tar.gz frameworks_base-c89283c5863855fadd8853e524e36e19aaaf142a.tar.bz2 |
am d0955068: 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 'd09550687360544f0659e37f393ba2f5b04b55a4':
Allow FLAG_SHOW_WHEN_LOCKED to apply to dialogs
Diffstat (limited to 'policy')
-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 36b9679..c6b25cc 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; } } } |