Index: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java |
index c3dce37967316b46cff0f342eaf9ff5e5653fc6a..67ddb78efca9fa68d947a2ddc8d59dd54e916bb2 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationInfo.java |
@@ -11,8 +11,8 @@ import android.text.TextUtils; |
import org.chromium.chrome.browser.tab.Tab; |
import org.chromium.content_public.common.MediaMetadata; |
-import java.util.HashSet; |
-import java.util.Set; |
+import java.util.ArrayList; |
+import java.util.List; |
/** |
* Exposes information about the current media notification to the external clients. |
@@ -58,7 +58,7 @@ public class MediaNotificationInfo { |
private int mId = INVALID_ID; |
private Intent mContentIntent = null; |
private MediaNotificationListener mListener = null; |
- private Set<Integer> mMediaSessionActions = null; |
+ private List<Integer> mMediaSessionActions = null; |
whywhat
2016/11/22 23:13:16
Why this change?
Zhiqiang Zhang (Slow)
2016/11/25 14:50:41
Undone this change.
Actually I thought we are now
|
/** |
* Initializes the builder with the default values. |
@@ -147,7 +147,7 @@ public class MediaNotificationInfo { |
return this; |
} |
- public Builder setMediaSessionActions(Set<Integer> actions) { |
+ public Builder setMediaSessionActions(List<Integer> actions) { |
mMediaSessionActions = actions; |
return this; |
} |
@@ -216,7 +216,7 @@ public class MediaNotificationInfo { |
/** |
* The actions enabled in MediaSession. |
*/ |
- public final Set<Integer> mediaSessionActions; |
+ public final List<Integer> mediaSessionActions; |
/** |
* @return if play/pause actions are supported by this notification. |
@@ -249,10 +249,20 @@ public class MediaNotificationInfo { |
* @param contentIntent the intent to send when the notification is selected. |
* @param listener The listener for the control events. |
*/ |
- private MediaNotificationInfo(MediaMetadata metadata, boolean isPaused, String origin, |
- int tabId, boolean isPrivate, int icon, Bitmap largeIcon, int defaultLargeIcon, |
- int actions, int id, Intent contentIntent, MediaNotificationListener listener, |
- Set<Integer> mediaSessionActions) { |
+ private MediaNotificationInfo( |
+ MediaMetadata metadata, |
+ boolean isPaused, |
+ String origin, |
+ int tabId, |
+ boolean isPrivate, |
+ int icon, |
+ Bitmap largeIcon, |
+ int defaultLargeIcon, |
+ int actions, |
+ int id, |
+ Intent contentIntent, |
+ MediaNotificationListener listener, |
+ List<Integer> mediaSessionActions) { |
this.metadata = metadata; |
this.isPaused = isPaused; |
this.origin = origin; |
@@ -266,8 +276,8 @@ public class MediaNotificationInfo { |
this.contentIntent = contentIntent; |
this.listener = listener; |
this.mediaSessionActions = (mediaSessionActions != null) |
- ? new HashSet<Integer>(mediaSessionActions) |
- : new HashSet<Integer>(); |
+ ? new ArrayList<Integer>(mediaSessionActions) |
+ : new ArrayList<Integer>(); |
} |
@Override |