Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7178d3c authored by Daniel Sandler's avatar Daniel Sandler
Browse files

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
parent 75f0fac9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
        
+2 −2
Original line number Diff line number Diff line
@@ -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) {