| 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 84cbf4bd0a7cb6c7c52353c5e36d5a182b7faeb6..370575f66cf95caf98be2f4cc7eebd7921254fc8 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
|
| @@ -25,7 +25,7 @@ import java.util.List;
|
| * Utilities dealing with extracting information from intents.
|
| */
|
| public class IntentUtils {
|
| - private static final String TAG = "IntentUtils";
|
| + private static final String TAG = "cr_IntentUtils";
|
|
|
| /** See {@link #isIntentTooLarge(Intent)}. */
|
| private static final int MAX_INTENT_SIZE_THRESHOLD = 750000;
|
| @@ -124,6 +124,19 @@ public class IntentUtils {
|
| }
|
|
|
| /**
|
| + * Just like {@link Bundle#getBundle(String)} but doesn't throw exceptions.
|
| + */
|
| + public static Bundle safeGetBundle(Bundle bundle, String name) {
|
| + try {
|
| + return bundle.getBundle(name);
|
| + } catch (Throwable t) {
|
| + // Catches un-parceling exceptions.
|
| + Log.e(TAG, "getBundle failed on bundle " + bundle);
|
| + return null;
|
| + }
|
| + }
|
| +
|
| + /**
|
| * Just like {@link Bundle#getParcelable(String)} but doesn't throw exceptions.
|
| */
|
| public static <T extends Parcelable> T safeGetParcelable(Bundle bundle, String name) {
|
|
|