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

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

Issue 2577063003: [MediaNotification] Fix a button computation issue with PLAY_PAUSE (Closed)
Patch Set: Created 4 years 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 c2f190f070d2838648b233927084598496bf1911..1e4b3162e0a3bb5c759da98aa035e75876d25f0f 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
@@ -870,6 +870,7 @@ public class MediaNotificationManager {
// https://crbug.com/667500
if (mMediaNotificationInfo.supportsPlayPause()) {
actions.addAll(mMediaNotificationInfo.mediaSessionActions);
+ actions.remove(MediaSessionAction.PLAY_PAUSE);
if (mMediaNotificationInfo.isPaused) {
actions.remove(MediaSessionAction.PAUSE);
actions.add(MediaSessionAction.PLAY);
@@ -954,6 +955,8 @@ public class MediaNotificationManager {
assert !actions.contains(MediaSessionAction.PLAY)
|| !actions.contains(MediaSessionAction.PAUSE);
+ assert !actions.contains(MediaSessionAction.PLAY_PAUSE);
+
int[] actionByOrder = {
MediaSessionAction.PREVIOUS_TRACK,
MediaSessionAction.SEEK_BACKWARD,
@@ -1018,6 +1021,8 @@ public class MediaNotificationManager {
assert !actions.contains(MediaSessionAction.PLAY)
|| !actions.contains(MediaSessionAction.PAUSE);
+ assert !actions.contains(MediaSessionAction.PLAY_PAUSE);
+
if (actions.size() <= COMPACT_VIEW_ACTIONS_COUNT) {
// If the number of actions is less than |COMPACT_VIEW_ACTIONS_COUNT|, just return an
// array of 0, 1, ..., |actions.size()|-1.
« 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