am da910fd5: Merge "Handle ActivityNotFoundException in the WM policy." into honeycomb

* commit 'da910fd5ea024f214f806d880d86d77bf94497b5':
  Handle ActivityNotFoundException in the WM policy.
This commit is contained in:
Jeff Brown
2011-01-26 23:54:16 -08:00
committed by Android Git Automerger

View File

@@ -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)