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

Commit 0af13be4 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Fix force close from PREVENT_POWER_KEY permission being checked even...

Merge "Fix force close from PREVENT_POWER_KEY permission being checked even when not requested." into gingerbread
parents 21af0190 0c77bfee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -687,7 +687,7 @@ public abstract class Window {
     * @param mask Which of the window flag bits to modify.
     */
    public void setFlags(int flags, int mask) {
        if ((flags & WindowManager.LayoutParams.PREVENT_POWER_KEY) != 0){
        if ((flags & mask & WindowManager.LayoutParams.PREVENT_POWER_KEY) != 0){
            mContext.enforceCallingOrSelfPermission("android.permission.PREVENT_POWER_KEY", "No permission to prevent power key");
        }
        final WindowManager.LayoutParams attrs = getAttributes();