summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-05-09 13:34:28 -0700
committerJeff Brown <jeffbrown@google.com>2012-05-09 13:34:28 -0700
commitfd23e3ed976b22b9a92ddb2cb3a46f9d2a0ce23f (patch)
treeb3d9f4d12fe2d93ba9979e6d66b1d9f4de016178 /include
parentaf67fc65bf113b028ff33e71cd6a45810018c273 (diff)
downloadframeworks_base-fd23e3ed976b22b9a92ddb2cb3a46f9d2a0ce23f.zip
frameworks_base-fd23e3ed976b22b9a92ddb2cb3a46f9d2a0ce23f.tar.gz
frameworks_base-fd23e3ed976b22b9a92ddb2cb3a46f9d2a0ce23f.tar.bz2
Fix bugs in fallback key handling.
If a fallback key is generated using a key plus a modifier, then it's possible we might get a different fallback key generated if the modifier has changed. PhoneWindowManager needs to remember which fallback is last generated for a given key code so that it can apply the same fallback action. When generating cancellation events, it's important to have preserved the policyFlags of the original event. Otherwise we may not dispatch the cancellation properly. For example, some actions are not performed if the POLICY_FLAG_TRUSTED is not specified. Remember the metaState associated with a key event so we can include it when canceled. Tell the policy when a fallback is being cancelled so that it can clean up its state. After a SEARCH shortcut is invoked, clear the flag indicating that a shortcut is pending. This is to prevent SEARCH from getting stuck down in the case where we might forget to send the up. (Shouldn't happen anymore after the prior fixes.) Bug: 5616255 Change-Id: I68f0a9679c7af464eaf31c099f2aa50b53fecf1f
Diffstat (limited to 'include')
-rw-r--r--include/androidfw/Input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/androidfw/Input.h b/include/androidfw/Input.h
index 601a169..6d03fd6 100644
--- a/include/androidfw/Input.h
+++ b/include/androidfw/Input.h
@@ -262,6 +262,8 @@ public:
inline int32_t getFlags() const { return mFlags; }
+ inline void setFlags(int32_t flags) { mFlags = flags; }
+
inline int32_t getKeyCode() const { return mKeyCode; }
inline int32_t getScanCode() const { return mScanCode; }