Просмотр исходного кода

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

Signed-off-by: Jens Lody <jens@jenslody.de>
ten
Jens Lody 1 год назад
Родитель
Сommit
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.

Загрузка…
Отмена
Сохранить