summaryrefslogtreecommitdiffstats
path: root/services/inputflinger
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2014-04-22 15:03:51 -0700
committerMichael Wright <michaelwr@google.com>2014-04-22 16:55:36 -0700
commit872db4f11e407accccba9d37c335ef7e3597eba4 (patch)
treee527c6316160e6e2dcb062f0440fd7c4afc43eed /services/inputflinger
parent4cbf3c53447215a31f69d3ac615ba0daa902f717 (diff)
downloadframeworks_native-872db4f11e407accccba9d37c335ef7e3597eba4.zip
frameworks_native-872db4f11e407accccba9d37c335ef7e3597eba4.tar.gz
frameworks_native-872db4f11e407accccba9d37c335ef7e3597eba4.tar.bz2
Move key attribute information out of native.
Native doesn't ever actually care about the attributes of keys, so move all of it up into the managed layer and move all of the key names down so they're defined once. Change-Id: Ic8ded13ce050b2b98744735ff50d11e8d882d7d5
Diffstat (limited to 'services/inputflinger')
-rw-r--r--services/inputflinger/InputDispatcher.cpp12
-rw-r--r--services/inputflinger/InputReader.cpp9
2 files changed, 4 insertions, 17 deletions
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
index f219f95..0bae399 100644
--- a/services/inputflinger/InputDispatcher.cpp
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -2360,18 +2360,6 @@ void InputDispatcher::notifyKey(const NotifyKeyArgs* args) {
policyFlags |= POLICY_FLAG_VIRTUAL;
flags |= AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY;
}
- if (policyFlags & POLICY_FLAG_ALT) {
- metaState |= AMETA_ALT_ON | AMETA_ALT_LEFT_ON;
- }
- if (policyFlags & POLICY_FLAG_ALT_GR) {
- metaState |= AMETA_ALT_ON | AMETA_ALT_RIGHT_ON;
- }
- if (policyFlags & POLICY_FLAG_SHIFT) {
- metaState |= AMETA_SHIFT_ON | AMETA_SHIFT_LEFT_ON;
- }
- if (policyFlags & POLICY_FLAG_CAPS_LOCK) {
- metaState |= AMETA_CAPS_LOCK_ON;
- }
if (policyFlags & POLICY_FLAG_FUNCTION) {
metaState |= AMETA_FUNCTION_ON;
}
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index f27ba96..8295c4c 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -2167,9 +2167,8 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
// For internal keyboards, the key layout file should specify the policy flags for
// each wake key individually.
// TODO: Use the input device configuration to control this behavior more finely.
- if (down && getDevice()->isExternal()
- && !(policyFlags & (POLICY_FLAG_WAKE | POLICY_FLAG_WAKE_DROPPED))) {
- policyFlags |= POLICY_FLAG_WAKE_DROPPED;
+ if (down && getDevice()->isExternal()) {
+ policyFlags |= POLICY_FLAG_WAKE;
}
if (mParameters.handlesKeyRepeat) {
@@ -2510,7 +2509,7 @@ void CursorInputMapper::sync(nsecs_t when) {
// TODO: Use the input device configuration to control this behavior more finely.
uint32_t policyFlags = 0;
if ((buttonsPressed || moved || scrolled) && getDevice()->isExternal()) {
- policyFlags |= POLICY_FLAG_WAKE_DROPPED;
+ policyFlags |= POLICY_FLAG_WAKE;
}
// Synthesize key down from buttons if needed.
@@ -3787,7 +3786,7 @@ void TouchInputMapper::sync(nsecs_t when) {
}
if (mParameters.wake) {
- policyFlags |= POLICY_FLAG_WAKE_DROPPED;
+ policyFlags |= POLICY_FLAG_WAKE;
}
}