| Index: chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| index 451bb1df8e38449ee0b9c3deeaece6243ed1a397..a3fa31f1f084fab4cd4d3fc1bfbb03fb4f6f2f15 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java
|
| @@ -14,6 +14,7 @@ import android.os.IBinder;
|
| import android.os.Parcel;
|
| import android.os.Parcelable;
|
| import android.os.TransactionTooLargeException;
|
| +import android.support.annotation.Nullable;
|
| import android.support.v4.app.BundleCompat;
|
|
|
| import org.chromium.base.Log;
|
| @@ -312,15 +313,22 @@ public class IntentUtils {
|
| intent.putExtras(bundle);
|
| }
|
|
|
| + /** See {@link #safeStartActivity(Context, Intent, Bundle)}. */
|
| + public static boolean safeStartActivity(Context context, Intent intent) {
|
| + return safeStartActivity(context, intent, null);
|
| + }
|
| +
|
| /**
|
| * Catches any failures to start an Activity.
|
| * @param context Context to use when starting the Activity.
|
| * @param intent Intent to fire.
|
| + * @param bundle Bundle of launch options.
|
| * @return Whether or not Android accepted the Intent.
|
| */
|
| - public static boolean safeStartActivity(Context context, Intent intent) {
|
| + public static boolean safeStartActivity(
|
| + Context context, Intent intent, @Nullable Bundle bundle) {
|
| try {
|
| - context.startActivity(intent);
|
| + context.startActivity(intent, bundle);
|
| return true;
|
| } catch (ActivityNotFoundException e) {
|
| return false;
|
|
|