diff options
author | Craig Mautner <cmautner@google.com> | 2014-03-25 10:29:48 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-25 10:29:48 -0700 |
commit | 4cf6286c3ccfe63bf73e6a1fb33e67d1becd16be (patch) | |
tree | 690651a217d8fb28ac9758a93f5ee989a06b666b /policy | |
parent | 759445c5bdb2eb54af9e974f604226596976e078 (diff) | |
parent | 02c7ba73e8733def289535b6d13dc6a504a0443f (diff) | |
download | frameworks_base-4cf6286c3ccfe63bf73e6a1fb33e67d1becd16be.zip frameworks_base-4cf6286c3ccfe63bf73e6a1fb33e67d1becd16be.tar.gz frameworks_base-4cf6286c3ccfe63bf73e6a1fb33e67d1becd16be.tar.bz2 |
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 '02c7ba73e8733def289535b6d13dc6a504a0443f':
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 b1064bb..19aa0f8 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -104,6 +104,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; @@ -383,7 +384,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; @@ -3213,7 +3214,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; @@ -3265,12 +3266,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; @@ -3289,8 +3295,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) { mAllowLockscreenWhenOn = true; } - } else if (!showWhenLocked) { - mHideWindowBehindKeyguard = true; } } } |