summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-02-22 15:00:50 -0800
committerJeff Brown <jeffbrown@google.com>2011-02-22 15:00:50 -0800
commitbfaf3b91709ef35e0d5901b186edd7c2a9729161 (patch)
tree9ecdcc0702b8314ba836508d39a5c754b9537a28 /policy
parentcc0c159e9b3dd4e0f48da0ce3e33d2c68a651413 (diff)
downloadframeworks_base-bfaf3b91709ef35e0d5901b186edd7c2a9729161.zip
frameworks_base-bfaf3b91709ef35e0d5901b186edd7c2a9729161.tar.gz
frameworks_base-bfaf3b91709ef35e0d5901b186edd7c2a9729161.tar.bz2
Be more precise about tracking fallback keys.
Only initiate fallback key handling if the first key down was not handled and there is no other fallback key already in progress. This prevents spurious fallbacks from being generated when applications handle the initial down but not repeated downs or the up. Change-Id: I8a513896cf96b16dc502cd72291926d5532aa2ab
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 156391e..14f4df1 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1448,7 +1448,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
| KeyEvent.META_META_LEFT_ON | KeyEvent.META_META_RIGHT_ON));
if (shortcutIntent != null) {
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- mContext.startActivity(shortcutIntent);
+ try {
+ mContext.startActivity(shortcutIntent);
+ } catch (ActivityNotFoundException ex) {
+ Slog.w(TAG, "Dropping shortcut key combination because "
+ + "the activity to which it is registered was not found: "
+ + "META+" + KeyEvent.keyCodeToString(keyCode), ex);
+ }
return null;
}
}