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
This commit is contained in:
Joe Onorato 2010-09-24 16:17:21 -07:00
parent edfd2a5605
commit 4a79a04bcd
1 changed files with 3 additions and 3 deletions

View File

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