Chromium Code Reviews| 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 32cc7bd0ec5d26b43fc368894fc84f8b862cbd3a..b1a00fb1f24c99f56616e2fb78400f0ab6f8ef3c 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 |
| @@ -50,6 +50,7 @@ public class MediaNotificationInfo { |
| private boolean mIsPrivate = true; |
| private int mIcon = -1; |
| private Bitmap mLargeIcon = null; |
| + private int mDefaultLargeIcon = -1; |
|
gone
2016/05/17 17:53:46
mDefaultLargeIconResourceId? Same with mIcon abov
Zhiqiang Zhang (Slow)
2016/05/17 18:27:47
Done.
|
| private int mActions = ACTION_PLAY_PAUSE | ACTION_SWIPEAWAY; |
| private int mId = INVALID_ID; |
| private Intent mContentIntent = null; |
| @@ -74,6 +75,7 @@ public class MediaNotificationInfo { |
| mIsPrivate, |
| mIcon, |
| mLargeIcon, |
| + mDefaultLargeIcon, |
| mActions, |
| mId, |
| mContentIntent, |
| @@ -115,6 +117,11 @@ public class MediaNotificationInfo { |
| return this; |
| } |
| + public Builder setDefaultLargeIcon(int icon) { |
| + mDefaultLargeIcon = icon; |
| + return this; |
| + } |
| + |
| public Builder setActions(int actions) { |
| mActions = actions; |
| return this; |
| @@ -177,6 +184,11 @@ public class MediaNotificationInfo { |
| public final Bitmap largeIcon; |
| /** |
| + * The id of the default large icon from R.drawable. |
| + */ |
| + public final int defaultLargeIcon; |
| + |
| + /** |
| * The id to use for the notification itself. |
| */ |
| public final int id; |
| @@ -230,6 +242,7 @@ public class MediaNotificationInfo { |
| boolean isPrivate, |
| int icon, |
| Bitmap largeIcon, |
| + int defaultLargeIcon, |
| int actions, |
| int id, |
| Intent contentIntent, |
| @@ -241,6 +254,7 @@ public class MediaNotificationInfo { |
| this.isPrivate = isPrivate; |
| this.icon = icon; |
| this.largeIcon = largeIcon; |
| + this.defaultLargeIcon = defaultLargeIcon; |
| this.mActions = actions; |
| this.id = id; |
| this.contentIntent = contentIntent; |
| @@ -259,6 +273,7 @@ public class MediaNotificationInfo { |
| && icon == other.icon |
| && (largeIcon == other.largeIcon |
| || (largeIcon != null && largeIcon.sameAs(other.largeIcon))) |
| + && defaultLargeIcon == other.defaultLargeIcon |
| && mActions == other.mActions |
| && id == other.id |
| && (metadata == other.metadata |
| @@ -280,6 +295,7 @@ public class MediaNotificationInfo { |
| result = 31 * result + tabId; |
| result = 31 * result + icon; |
| result = 31 * result + (largeIcon == null ? 0 : largeIcon.hashCode()); |
| + result = 31 * result + defaultLargeIcon; |
| result = 31 * result + mActions; |
| result = 31 * result + id; |
| result = 31 * result + listener.hashCode(); |