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

Commit ce709c9f authored by Sultanxda's avatar Sultanxda Committed by Adnan Begovic
Browse files

fw: Fix power key interception for PRIVATE_FLAG_PREVENT_POWER_KEY

TICKET: CYNGNOS-2958
Change-Id: I67a7469257a1617b1c999f5533c5863014595dcc
parent cb4391b4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3265,8 +3265,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {

            if (mTopFullscreenOpaqueWindowState != null &&
                    (mTopFullscreenOpaqueWindowState.getAttrs().privateFlags
                            & (WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS |
                                WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_POWER_KEY)) != 0
                            & WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS) != 0
                    && mScreenOnFully) {
                return 0;
            }
@@ -5855,7 +5854,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_POWER: {
                if (mTopFullscreenOpaqueWindowState != null &&
                        (mTopFullscreenOpaqueWindowState.getAttrs().privateFlags
                        & WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS) != 0
                        & (WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS |
                            WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_POWER_KEY)) != 0
                        && mScreenOnFully) {
                    return result;
                }