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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java

Issue 1677273003: Check for null intent when creating notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO for Anton. Created 4 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 | « no previous file | 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/media/ui/MediaNotificationManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
index b9fc49c583b796eab93e8cd723cdbc5d8aa5f254..1ce836f8f631de115eb70dd1c6cc9883d4ca399a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
@@ -587,8 +587,12 @@ public class MediaNotificationManager {
mNotificationBuilder.setOngoing(!mMediaNotificationInfo.isPaused);
}
- mNotificationBuilder.setContentIntent(
- PendingIntent.getActivity(mContext, 0, mMediaNotificationInfo.contentIntent, 0));
+ // The intent will currently only be null when using a custom tab.
+ // TODO(avayvod) work out what we should do in this case. See https://crbug.com/585395.
+ if (mMediaNotificationInfo.contentIntent != null) {
+ mNotificationBuilder.setContentIntent(PendingIntent.getActivity(mContext, 0,
+ mMediaNotificationInfo.contentIntent, 0));
+ }
mNotificationBuilder.setContent(createContentView());
mNotificationBuilder.setVisibility(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698