Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java |
| index 16fa66e7d17e0effe0777cb3a3276b7a4258a061..77d0401c5fa33ccb0b8f2ba34efbd43d1ffa2b4b 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java |
| @@ -123,15 +123,18 @@ public abstract class NotificationBuilderBase { |
| protected long[] mVibratePattern; |
| protected long mTimestamp; |
| protected boolean mRenotify; |
| - |
| + protected int mPriority; |
| private Bitmap mLargeIcon; |
| + protected final String mChannelId; |
| - public NotificationBuilderBase(Resources resources) { |
| + public NotificationBuilderBase( |
| + Resources resources, @ChannelDefinitions.ChannelId String channelId) { |
| mLargeIconWidthPx = |
| resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width); |
| mLargeIconHeightPx = |
| resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_height); |
| mIconGenerator = createIconGenerator(resources); |
| + mChannelId = channelId; |
| } |
| /** |
| @@ -300,6 +303,15 @@ public abstract class NotificationBuilderBase { |
| } |
| /** |
| + * Sets the priority of the notification (if set to private, overrides \setDefaults| and |
|
Yaron
2017/05/24 18:08:29
will fix comment
|
| + * |setVibrate|) |
| + */ |
| + public NotificationBuilderBase setPriority(int priority) { |
| + mPriority = priority; |
| + return this; |
| + } |
| + |
| + /** |
| * Sets the timestamp at which the event of the notification took place. |
| */ |
| public NotificationBuilderBase setTimestamp(long timestamp) { |