Allow the secure keyguard to engage behind Dreams.

TYPE_DREAM windows are now considered for relevant window
flags alongside application windows.

Bug: 6961616
Change-Id: Idee3303276a8b69c7f07de1d6acdce64c6e1b863
This commit is contained in:
Daniel Sandler
2012-08-10 10:24:05 -04:00
parent 75f0fac91b
commit f7178d3cad
2 changed files with 7 additions and 2 deletions

View File

@@ -346,6 +346,11 @@ public class Dream extends Service implements Window.Callback {
lp.type = WindowManager.LayoutParams.TYPE_DREAM;
lp.token = windowToken;
lp.windowAnimations = com.android.internal.R.style.Animation_Dream;
lp.flags |= ( WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD
| WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
);
mWindow.setAttributes(lp);
//WindowManagerImpl.getDefault().addView(mWindow.getDecorView(), lp);

View File

@@ -2854,8 +2854,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
mForceStatusBar = true;
}
if (attrs.type >= FIRST_APPLICATION_WINDOW
&& attrs.type <= LAST_APPLICATION_WINDOW
if (((attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW)
|| attrs.type == TYPE_DREAM)
&& attrs.x == 0 && attrs.y == 0
&& attrs.width == WindowManager.LayoutParams.MATCH_PARENT
&& attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {