| 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..59c4d87c0fab6a47a9603f0ee247e74c2ade3cf9 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
|
| @@ -10,9 +10,6 @@
|
|
|
| import org.chromium.chrome.browser.tab.Tab;
|
| import org.chromium.content_public.common.MediaMetadata;
|
| -
|
| -import java.util.HashSet;
|
| -import java.util.Set;
|
|
|
| /**
|
| * Exposes information about the current media notification to the external clients.
|
| @@ -58,7 +55,6 @@
|
| private int mId = INVALID_ID;
|
| private Intent mContentIntent = null;
|
| private MediaNotificationListener mListener = null;
|
| - private Set<Integer> mMediaSessionActions = null;
|
|
|
| /**
|
| * Initializes the builder with the default values.
|
| @@ -72,19 +68,18 @@
|
| assert mListener != null;
|
|
|
| return new MediaNotificationInfo(
|
| - mMetadata,
|
| - mIsPaused,
|
| - mOrigin,
|
| - mTabId,
|
| - mIsPrivate,
|
| - mIcon,
|
| - mLargeIcon,
|
| - mDefaultLargeIcon,
|
| - mActions,
|
| - mId,
|
| - mContentIntent,
|
| - mListener,
|
| - mMediaSessionActions);
|
| + mMetadata,
|
| + mIsPaused,
|
| + mOrigin,
|
| + mTabId,
|
| + mIsPrivate,
|
| + mIcon,
|
| + mLargeIcon,
|
| + mDefaultLargeIcon,
|
| + mActions,
|
| + mId,
|
| + mContentIntent,
|
| + mListener);
|
| }
|
|
|
| public Builder setMetadata(MediaMetadata metadata) {
|
| @@ -146,11 +141,6 @@
|
| mListener = listener;
|
| return this;
|
| }
|
| -
|
| - public Builder setMediaSessionActions(Set<Integer> actions) {
|
| - mMediaSessionActions = actions;
|
| - return this;
|
| - }
|
| }
|
|
|
| /**
|
| @@ -212,11 +202,6 @@
|
| * The listener for the control events.
|
| */
|
| public final MediaNotificationListener listener;
|
| -
|
| - /**
|
| - * The actions enabled in MediaSession.
|
| - */
|
| - public final Set<Integer> mediaSessionActions;
|
|
|
| /**
|
| * @return if play/pause actions are supported by this notification.
|
| @@ -249,10 +234,19 @@
|
| * @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) {
|
| this.metadata = metadata;
|
| this.isPaused = isPaused;
|
| this.origin = origin;
|
| @@ -265,9 +259,6 @@
|
| this.id = id;
|
| this.contentIntent = contentIntent;
|
| this.listener = listener;
|
| - this.mediaSessionActions = (mediaSessionActions != null)
|
| - ? new HashSet<Integer>(mediaSessionActions)
|
| - : new HashSet<Integer>();
|
| }
|
|
|
| @Override
|
| @@ -276,22 +267,22 @@
|
| if (!(obj instanceof MediaNotificationInfo)) return false;
|
|
|
| MediaNotificationInfo other = (MediaNotificationInfo) obj;
|
| - return isPaused == other.isPaused && isPrivate == other.isPrivate && tabId == other.tabId
|
| + return isPaused == other.isPaused
|
| + && isPrivate == other.isPrivate
|
| + && tabId == other.tabId
|
| && icon == other.icon
|
| && (largeIcon == other.largeIcon
|
| - || (largeIcon != null && largeIcon.sameAs(other.largeIcon)))
|
| - && defaultLargeIcon == other.defaultLargeIcon && mActions == other.mActions
|
| + || (largeIcon != null && largeIcon.sameAs(other.largeIcon)))
|
| + && defaultLargeIcon == other.defaultLargeIcon
|
| + && mActions == other.mActions
|
| && id == other.id
|
| && (metadata == other.metadata
|
| - || (metadata != null && metadata.equals(other.metadata)))
|
| + || (metadata != null && metadata.equals(other.metadata)))
|
| && TextUtils.equals(origin, other.origin)
|
| && (contentIntent == other.contentIntent
|
| - || (contentIntent != null && contentIntent.equals(other.contentIntent)))
|
| + || (contentIntent != null && contentIntent.equals(other.contentIntent)))
|
| && (listener == other.listener
|
| - || (listener != null && listener.equals(other.listener)))
|
| - && (mediaSessionActions == other.mediaSessionActions
|
| - || (mediaSessionActions != null
|
| - && mediaSessionActions.equals(other.mediaSessionActions)));
|
| + || (listener != null && listener.equals(other.listener)));
|
| }
|
|
|
| @Override
|
| @@ -308,7 +299,6 @@
|
| result = 31 * result + mActions;
|
| result = 31 * result + id;
|
| result = 31 * result + listener.hashCode();
|
| - result = 31 * result + mediaSessionActions.hashCode();
|
| return result;
|
| }
|
| }
|
|
|