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

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

Issue 1656243002: Implementation of renotify flag for Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TypeError for incorrect options and unit test Created 4 years, 11 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/NotificationUIManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java
index daa6663ef5ddc4b19109a3f4733fa2df18c92d09..8980e4e8fd2c2b294645246a05cb767634d9db7d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java
@@ -422,13 +422,16 @@ public class NotificationUIManager {
* @param vibrationPattern Vibration pattern following the Web Vibration syntax.
* @param timestamp The timestamp of the event for which the notification is being shown.
* @param silent Whether the default sound, vibration and lights should be suppressed.
+ * @param renotify Whether the sound, vibration, and lights should be replayed if the
+ * notification is replacing another notification.
* @param actionTitles Titles of actions to display alongside the notification.
* @see https://developer.android.com/reference/android/app/Notification.html
*/
@CalledByNative
private void displayNotification(long persistentNotificationId, String origin, String profileId,
boolean incognito, String tag, String title, String body, Bitmap icon,
- int[] vibrationPattern, long timestamp, boolean silent, String[] actionTitles) {
+ int[] vibrationPattern, long timestamp, boolean silent, boolean renotify,
+ String[] actionTitles) {
Resources res = mAppContext.getResources();
// Record whether it's known whether notifications can be shown to the user at all.
@@ -492,6 +495,7 @@ public class NotificationUIManager {
if (vibrationPattern.length > 0) {
notificationBuilder.setVibrate(makeVibrationPattern(vibrationPattern));
}
+ notificationBuilder.setRenotify(renotify);
String platformTag = makePlatformTag(persistentNotificationId, origin, tag);
// Temporarily allowing disk access. TODO: Fix. See http://crbug.com/577185

Powered by Google App Engine
This is Rietveld 408576698