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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java

Issue 2359763003: [Download Home] Various M55 adjustments (Closed)
Patch Set: Tests Created 4 years, 3 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java » ('j') | 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/customtabs/CustomTabIntentDataProvider.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
index 3666e15b3f9b3d1cabe5c249997163ecc270d18e..931d6578ad9fbc7ffbd23b464fff0924e4dff26e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
@@ -344,8 +344,11 @@ public class CustomTabIntentDataProvider {
Intent addedIntent = new Intent();
addedIntent.setData(Uri.parse(url));
try {
+ // Media viewers pass in PendingIntents that contain CHOOSER Intents. Setting the data
+ // in these cases prevents the Intent from firing correctly.
PendingIntent pendingIntent = mMenuEntries.get(menuIndex).second;
- pendingIntent.send(activity, 0, addedIntent, mOnFinished, null);
+ pendingIntent.send(
+ activity, 0, isMediaViewer() ? null : addedIntent, mOnFinished, null);
} catch (CanceledException e) {
Log.e(TAG, "Custom tab in Chrome failed to send pending intent.");
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698