From ce709c9f22d500606d20c682298e937bd32e14d9 Mon Sep 17 00:00:00 2001 From: Sultanxda Date: Thu, 2 Jun 2016 10:09:38 -0700 Subject: fw: Fix power key interception for PRIVATE_FLAG_PREVENT_POWER_KEY TICKET: CYNGNOS-2958 Change-Id: I67a7469257a1617b1c999f5533c5863014595dcc --- .../core/java/com/android/server/policy/PhoneWindowManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 98104b7..33ede76 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -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; } -- cgit v1.1