summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2014-04-22 15:03:48 -0700
committerMichael Wright <michaelwr@google.com>2014-04-28 14:33:40 -0700
commit337d9d2edc262141f9b8f684e53aae5e47f0ae13 (patch)
tree486f2c212e2084a2730cf670fa3a41d11c16b188 /policy
parentb78263d37690a6a5cb12dd31d82ad2e140b3dfc7 (diff)
downloadframeworks_base-337d9d2edc262141f9b8f684e53aae5e47f0ae13.zip
frameworks_base-337d9d2edc262141f9b8f684e53aae5e47f0ae13.tar.gz
frameworks_base-337d9d2edc262141f9b8f684e53aae5e47f0ae13.tar.bz2
Move key attribute information into KeyEvent.
This consolidates all of the information that was in the native KeyEvent and the KeyLayout files into the managed KeyEvent class. It also moves the definition for all of the key names to the native side, rather than having them in both places. Change-Id: I172e3b554e7eb52c79ae2ec406ef4332e8b25ffa
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 77e2462..8bc669a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -3859,12 +3859,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mKeyguardDelegate.isShowingAndNotOccluded() :
mKeyguardDelegate.isShowing()));
- if (keyCode == KeyEvent.KEYCODE_POWER
- || keyCode == KeyEvent.KEYCODE_SLEEP
- || keyCode == KeyEvent.KEYCODE_WAKEUP) {
- policyFlags |= WindowManagerPolicy.FLAG_WAKE;
- }
-
if (DEBUG_INPUT) {
Log.d(TAG, "interceptKeyTq keycode=" + keyCode
+ " interactive=" + interactive + " keyguardActive=" + keyguardActive
@@ -3878,8 +3872,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// Basic policy based on interactive state.
int result;
- boolean isWakeKey = (policyFlags & (WindowManagerPolicy.FLAG_WAKE
- | WindowManagerPolicy.FLAG_WAKE_DROPPED)) != 0;
+ boolean isWakeKey = (policyFlags & WindowManagerPolicy.FLAG_WAKE) != 0
+ || event.isWakeKey();
if (interactive || (isInjected && !isWakeKey)) {
// When the screen is on or if the key is injected pass the key to the application.
result = ACTION_PASS_TO_USER;