Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java |
index d90e9f11133ed73ba70b39a888ff9e054e20de3c..0b07fedb35c34e2a4779bea639653dc50cedba11 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java |
@@ -14,16 +14,18 @@ import android.content.SharedPreferences; |
import android.graphics.Bitmap; |
import android.net.Uri; |
import android.provider.Browser; |
-import android.support.v4.app.NotificationCompat; |
import org.chromium.base.ContextUtils; |
import org.chromium.base.annotations.CalledByNative; |
import org.chromium.base.annotations.JNINamespace; |
import org.chromium.base.library_loader.LibraryLoader; |
import org.chromium.chrome.R; |
+import org.chromium.chrome.browser.ChromeApplication; |
import org.chromium.chrome.browser.IntentHandler; |
import org.chromium.chrome.browser.ShortcutHelper; |
import org.chromium.chrome.browser.document.ChromeLauncherActivity; |
+import org.chromium.chrome.browser.notifications.ChromeNotificationBuilder; |
+import org.chromium.chrome.browser.notifications.NotificationConstants; |
import org.chromium.chrome.browser.ntp.snippets.ContentSuggestionsNotificationAction; |
import java.util.Collection; |
@@ -146,8 +148,13 @@ public class ContentSuggestionsNotificationHelper { |
.setData(uri) |
.putExtra(NOTIFICATION_CATEGORY_EXTRA, category) |
.putExtra(NOTIFICATION_ID_WITHIN_CATEGORY_EXTRA, idWithinCategory); |
- NotificationCompat.Builder builder = |
- new NotificationCompat.Builder(context) |
+ ChromeNotificationBuilder builder = |
+ ((ChromeApplication) context) |
+ .createChromeNotificationBuilder(true /* preferCompat */, |
+ NotificationConstants.CATEGORY_ID_BROWSER, |
+ context.getString(R.string.notification_category_browser), |
+ NotificationConstants.CATEGORY_GROUP_ID_GENERAL, |
+ context.getString(R.string.notification_category_group_general)) |
.setAutoCancel(true) |
.setContentIntent(PendingIntent.getBroadcast(context, 0, contentIntent, 0)) |
.setDeleteIntent(PendingIntent.getBroadcast(context, 0, deleteIntent, 0)) |