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

Unified Diff: ui/android/java/src/org/chromium/ui/base/WindowAndroid.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
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
diff --git a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
index 8f1c58f67ffcf8a7829660e24877662fa70bdd59..8c938d4204bec86ef98ac157fa6dd9eb47e4ea30 100644
--- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
@@ -83,10 +83,10 @@ public class WindowAndroid {
* @param intent The PendingIntent that needs to be shown.
* @param callback The object that will receive the results for the intent.
* @param errorId The ID of error string to be show if activity is paused before intent
- * results.
+ * results, or null if no message is required.
* @return Whether the intent was shown.
*/
- public boolean showIntent(PendingIntent intent, IntentCallback callback, int errorId) {
+ public boolean showIntent(PendingIntent intent, IntentCallback callback, Integer errorId) {
return showCancelableIntent(intent, callback, errorId) >= 0;
}
@@ -95,10 +95,10 @@ public class WindowAndroid {
* @param intent The intent that needs to be shown.
* @param callback The object that will receive the results for the intent.
* @param errorId The ID of error string to be show if activity is paused before intent
- * results.
+ * results, or null if no message is required.
* @return Whether the intent was shown.
*/
- public boolean showIntent(Intent intent, IntentCallback callback, int errorId) {
+ public boolean showIntent(Intent intent, IntentCallback callback, Integer errorId) {
return showCancelableIntent(intent, callback, errorId) >= 0;
}
@@ -107,11 +107,12 @@ public class WindowAndroid {
* @param intent The PendingIntent that needs to be shown.
* @param callback The object that will receive the results for the intent.
* @param errorId The ID of error string to be show if activity is paused before intent
- * results.
+ * results, or null if no message is required.
* @return A non-negative request code that could be used for finishActivity, or
* START_INTENT_FAILURE if failed.
*/
- public int showCancelableIntent(PendingIntent intent, IntentCallback callback, int errorId) {
+ public int showCancelableIntent(
+ PendingIntent intent, IntentCallback callback, Integer errorId) {
Log.d(TAG, "Can't show intent as context is not an Activity: " + intent);
return START_INTENT_FAILURE;
}
@@ -121,11 +122,11 @@ public class WindowAndroid {
* @param intent The intent that needs to be showed.
* @param callback The object that will receive the results for the intent.
* @param errorId The ID of error string to be show if activity is paused before intent
- * results.
+ * results, or null if no message is required.
* @return A non-negative request code that could be used for finishActivity, or
* START_INTENT_FAILURE if failed.
*/
- public int showCancelableIntent(Intent intent, IntentCallback callback, int errorId) {
+ public int showCancelableIntent(Intent intent, IntentCallback callback, Integer errorId) {
Log.d(TAG, "Can't show intent as context is not an Activity: " + intent);
return START_INTENT_FAILURE;
}
« no previous file with comments | « ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698