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 |