瀏覽代碼

Do not disable wake keys in ambient and when screen is off.

Signed-off-by: Jens Lody <jens@jenslody.de>
ten
Jens Lody 1 年之前
父節點
當前提交
3dfed1158d
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5
    5
      services/core/java/com/android/server/policy/PhoneWindowManager.java

+ 5
- 5
services/core/java/com/android/server/policy/PhoneWindowManager.java 查看文件

@@ -4060,11 +4060,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return 0;
}

// Disable hw keys in Ambient and when screen off
if ((isDozeMode() || !isScreenOn()) && (appSwitchKey || homeKey || menuKey || backKey)) {
return 0;
}

// Basic policy based on interactive state.
boolean isVolumeRockerWake = !isScreenOn()
&& mVolumeRockerWake
@@ -4074,6 +4069,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
int result;
boolean isWakeKey = (policyFlags & WindowManagerPolicy.FLAG_WAKE) != 0
|| event.isWakeKey() || isVolumeRockerWake;
// Disable hw keys in Ambient and when screen off
if ((isDozeMode() || !isScreenOn()) && (appSwitchKey || homeKey || menuKey || backKey) && !isWakeKey) {
return 0;
}

if (interactive || (isInjected && !isWakeKey)) {
// When the device is interactive or the key is injected pass the
// key to the application.

Loading…
取消
儲存