Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1323)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/util/IntentUtils.java

Issue 2814593003: 🔍 Continue working on the search widget prototype (Closed)
Patch Set: 🔍 Continue cleaning up the search widget. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698