diff options
author | vm03 <vasy@vasy.ru> | 2016-02-27 17:16:02 +0300 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-03-08 11:18:39 -0800 |
commit | 1bbe8064a8c1a7b320aaf6d7df900d210d38c2f2 (patch) | |
tree | a6d0b1bf4e4bd23a27ff3c6a50a30d90f1ddefbf | |
parent | 8ecd5a5276f4f725c167b887e799c20a9a27e16e (diff) | |
download | frameworks_base-1bbe8064a8c1a7b320aaf6d7df900d210d38c2f2.zip frameworks_base-1bbe8064a8c1a7b320aaf6d7df900d210d38c2f2.tar.gz frameworks_base-1bbe8064a8c1a7b320aaf6d7df900d210d38c2f2.tar.bz2 |
base: Fix proximity check on non power key
To test, enable "Settings >> Display >> Prevent accidental wake-up"
and "Settings >> Buttons >> Home button Wake up device", hold your
hand over the proximity sensor and turn your phone on by home key.
Prior to this change, it will wake up the phone and after the change
it will not.
Change-Id: Ifd14ff2ad9cd2cbc64209b9cf19e3c0ee0b6f40f
-rw-r--r-- | services/core/java/com/android/server/policy/PhoneWindowManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 12429ea..1d91277 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -5648,7 +5648,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (isValidGlobalKey(keyCode) && mGlobalKeyManager.shouldHandleGlobalKey(keyCode, event)) { if (isWakeKey) { - wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, "android.policy:KEY"); + wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, + "android.policy:KEY", true); } return result; } @@ -5986,7 +5987,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } if (isWakeKey) { - wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, "android.policy:KEY"); + wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, "android.policy:KEY", true); } return result; |