summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Bringert <bringert@android.com>2009-10-01 11:56:11 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-01 11:56:11 -0700
commitf28c81c5e39b29fe437d2070f89240affe92c009 (patch)
treeaddaadf8577ad3d495046778c665a75acae400a9
parent4d56d14f1ec62f8750714981298d01bab356ad6e (diff)
parent69f3ad88adcbcfcbbb8b25090faaca676711428a (diff)
downloadApplicationsProvider-f28c81c5e39b29fe437d2070f89240affe92c009.tar.gz
am 69f3ad88: Don\'t crash when trying to launch missing application
Merge commit '69f3ad88adcbcfcbbb8b25090faaca676711428a' * commit '69f3ad88adcbcfcbbb8b25090faaca676711428a': Don't crash when trying to launch missing application
-rw-r--r--src/com/android/providers/applications/ApplicationLauncher.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/providers/applications/ApplicationLauncher.java b/src/com/android/providers/applications/ApplicationLauncher.java
index 8463fb6..830597f 100644
--- a/src/com/android/providers/applications/ApplicationLauncher.java
+++ b/src/com/android/providers/applications/ApplicationLauncher.java
@@ -17,6 +17,7 @@
package com.android.providers.applications;
import android.app.Activity;
+import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
@@ -45,7 +46,11 @@ public class ApplicationLauncher extends Activity {
launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
launchIntent.setComponent(componentName);
- startActivity(launchIntent);
+ try {
+ startActivity(launchIntent);
+ } catch (ActivityNotFoundException ex) {
+ Log.w(TAG, "Activity not found: " + componentName);
+ }
handled = true;
}
}