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

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

Issue 2585823002: Revert "Revert of Implement GetDisplayed on android M+ (patchset #3 id:60001 of https://codereview.… (Closed)
Patch Set: Created 4 years 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 6635ecca72c969545d3f25e12d52abd9980284de..94ee79608e7d19e1fc88eccca368e74f01ce3e3a 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
@@ -18,6 +18,7 @@ import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Icon;
import android.os.Build;
+import android.os.Bundle;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.widget.RoundedIconGenerator;
@@ -121,6 +122,7 @@ public abstract class NotificationBuilderBase {
protected long[] mVibratePattern;
protected long mTimestamp;
protected boolean mRenotify;
+ protected Bundle mExtras;
private Bitmap mLargeIcon;
@@ -309,6 +311,18 @@ public abstract class NotificationBuilderBase {
}
/**
+ * Sets the extras bundle on supported platforms.
+ */
+ @TargetApi(Build.VERSION_CODES.M)
+ public NotificationBuilderBase setExtras(Bundle extras) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+ return this;
+ }
+ mExtras = extras;
+ return this;
+ }
+
+ /**
* Gets the large icon for the notification.
*
* If a large icon was supplied to the builder, returns this icon, scaled to an appropriate size

Powered by Google App Engine
This is Rietveld 408576698