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

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

Issue 2769213002: [Media>UI] Allow the notification info to be updated before playback service is created (Closed)
Patch Set: Created 3 years, 9 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 01c791d7718515f67e5a2fa88122a78ac04111a4..c4013918973d7712d5a76a7963ed9a56d8252f46 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
@@ -661,10 +661,14 @@ public class MediaNotificationManager {
return;
}
- if (mService == null && mediaNotificationInfo.isPaused) return;
-
mMediaNotificationInfo = mediaNotificationInfo;
+ // If there's no pending service start request, don't try to start service. If there is a
+ // pending service start request but the service haven't started yet, only update the
+ // |mMediaNotificationInfo|. The service will update the notification later once it's
+ // started.
+ if (mService == null && mediaNotificationInfo.isPaused) return;
whywhat 2017/03/23 16:27:39 But we just added this line this month! Hopefully
Zhiqiang Zhang (Slow) 2017/03/23 17:07:52 That's why we need more tests :)
+
if (mService == null) {
updateMediaSession();
updateNotificationBuilder();
« 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