From 4a79a04bcd5f8c4d4fab7bcc46eea9e19a3dc63e Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 24 Sep 2010 16:17:21 -0700 Subject: [PATCH] When we're launching apps, we need to always use startActivitySafely. It's possible that the app doesn't implement the component as promised, and the launcher shouldn't crash. Bug: 3005141 Change-Id: Ieac51433a467fd12160247bfd281828a69f5f7d2 --- src/com/android/launcher2/Launcher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 28a6712635..bc529a4a5f 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -1223,9 +1223,9 @@ public final class Launcher extends Activity Intent pickIntent = new Intent(Intent.ACTION_PICK_ACTIVITY); pickIntent.putExtra(Intent.EXTRA_INTENT, mainIntent); - startActivityForResult(pickIntent, REQUEST_PICK_APPLICATION); + startActivityForResultSafely(pickIntent, REQUEST_PICK_APPLICATION); } else { - startActivityForResult(intent, REQUEST_CREATE_SHORTCUT); + startActivityForResultSafely(intent, REQUEST_CREATE_SHORTCUT); } } @@ -1237,7 +1237,7 @@ public final class Launcher extends Activity if (folderName != null && folderName.equals(shortcutName)) { addFolder(); } else { - startActivityForResult(intent, REQUEST_CREATE_LIVE_FOLDER); + startActivityForResultSafely(intent, REQUEST_CREATE_LIVE_FOLDER); } }