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

Unified Diff: ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java

Issue 907593002: Remove requirement for an error message for showing Intents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
diff --git a/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
index 07f48dcc13f3248fa107f146abd0de462dbd2944..b32cd9b95a81e997d40cc3593ac3871d4a3f1cf8 100644
--- a/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
@@ -32,7 +32,8 @@ public class ActivityWindowAndroid extends WindowAndroid {
}
@Override
- public int showCancelableIntent(PendingIntent intent, IntentCallback callback, int errorId) {
+ public int showCancelableIntent(
+ PendingIntent intent, IntentCallback callback, Integer errorId) {
Activity activity = mActivityRef.get();
if (activity == null) return START_INTENT_FAILURE;
@@ -50,7 +51,7 @@ public class ActivityWindowAndroid extends WindowAndroid {
}
@Override
- public int showCancelableIntent(Intent intent, IntentCallback callback, int errorId) {
+ public int showCancelableIntent(Intent intent, IntentCallback callback, Integer errorId) {
Activity activity = mActivityRef.get();
if (activity == null) return START_INTENT_FAILURE;
@@ -104,8 +105,9 @@ public class ActivityWindowAndroid extends WindowAndroid {
return requestCode;
}
- private void storeCallbackData(int requestCode, IntentCallback callback, int errorId) {
+ private void storeCallbackData(int requestCode, IntentCallback callback, Integer errorId) {
mOutstandingIntents.put(requestCode, callback);
- mIntentErrors.put(requestCode, mApplicationContext.getString(errorId));
+ mIntentErrors.put(
+ requestCode, errorId == null ? null : mApplicationContext.getString(errorId));
}
}

Powered by Google App Engine
This is Rietveld 408576698