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

Commit 3850211a authored by Adrian Roos's avatar Adrian Roos
Browse files

Protect WindowManager's PRIVATE_FLAG_KEYGUARD

Enforce that only status bar can use the new keyguard flag.

Bug: 13635952
Change-Id: I807ffbb1e431fa187f22d030331374eb61dedcf3
parent 770f9f81
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1362,6 +1362,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                }
                break;
        }

        if (attrs.type != TYPE_STATUS_BAR) {
            // The status bar is the only window allowed to exhibit keyguard behavior.
            attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
        }
    }
    
    void readLidState() {