diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-01-26 23:54:16 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-26 23:54:16 -0800 |
commit | 9d925d2dfdb2a0bd89ff081c1693129f3bf85e77 (patch) | |
tree | 05eb6515abef9f0163c6089a5c017e94223aea07 /policy | |
parent | fcf51a67967a402bf2178c3d0e09828e8942cade (diff) | |
parent | da910fd5ea024f214f806d880d86d77bf94497b5 (diff) | |
download | frameworks_base-9d925d2dfdb2a0bd89ff081c1693129f3bf85e77.zip frameworks_base-9d925d2dfdb2a0bd89ff081c1693129f3bf85e77.tar.gz frameworks_base-9d925d2dfdb2a0bd89ff081c1693129f3bf85e77.tar.bz2 |
am da910fd5: Merge "Handle ActivityNotFoundException in the WM policy." into honeycomb
* commit 'da910fd5ea024f214f806d880d86d77bf94497b5':
Handle ActivityNotFoundException in the WM policy.
Diffstat (limited to 'policy')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 9 |
1 files changed, 8 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 fd84a2a..066daa8 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1402,7 +1402,14 @@ public class PhoneWindowManager implements WindowManagerPolicy { Intent shortcutIntent = mShortcutManager.getIntent(kcm, keyCode, metaState); 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: " + + KeyEvent.keyCodeToString(mShortcutKeyPressed) + + "+" + KeyEvent.keyCodeToString(keyCode), ex); + } } else { Slog.i(TAG, "Dropping unregistered shortcut key combination: " + KeyEvent.keyCodeToString(mShortcutKeyPressed) |