diff options
author | Craig Mautner <cmautner@google.com> | 2014-03-25 10:22:56 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-25 10:22:56 -0700 |
commit | 02c7ba73e8733def289535b6d13dc6a504a0443f (patch) | |
tree | 6a1629d20b82b211d1488d23cf5be4d8f412fd83 /policy | |
parent | c53ad4cd807e74897ba2d7b799cb8ff6824b34e8 (diff) | |
parent | 41bb0637ca430808ab40a0300467ea58ae0a05c3 (diff) | |
download | frameworks_base-02c7ba73e8733def289535b6d13dc6a504a0443f.zip frameworks_base-02c7ba73e8733def289535b6d13dc6a504a0443f.tar.gz frameworks_base-02c7ba73e8733def289535b6d13dc6a504a0443f.tar.bz2 |
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 '41bb0637ca430808ab40a0300467ea58ae0a05c3':
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 f9a5b6d..1ff0c00 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -153,6 +153,7 @@ import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; +import java.util.HashSet; /** * WindowManagerPolicy implementation for the Android phone UI. This @@ -408,7 +409,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; @@ -2945,7 +2946,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; @@ -2997,12 +2998,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); mHideLockScreen = true; @@ -3020,8 +3026,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) { mAllowLockscreenWhenOn = true; } - } else if (!showWhenLocked) { - mHideWindowBehindKeyguard = true; } } } |