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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java

Issue 2841193002: Implement privacy disclosure for an unbound webapk. (Closed)
Patch Set: fix test Created 3 years, 7 months 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
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) {

Powered by Google App Engine
This is Rietveld 408576698