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

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

Issue 2765003002: [Android O] Upstreaming notification channels code (Closed)
Patch Set: Rebase + update tag Created 3 years, 9 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/StandardNotificationBuilder.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java
index e4f5c2952d7821bab77243142da926b25f1a9e31..025f167ed4ee3037e0f616451998285a95858923 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java
@@ -8,8 +8,6 @@ import android.app.Notification;
import android.content.Context;
import android.os.Build;
-import org.chromium.chrome.browser.AppHooks;
-
/**
* Builds a notification using the standard Notification.BigTextStyle layout.
*/
@@ -26,12 +24,14 @@ public class StandardNotificationBuilder extends NotificationBuilderBase {
// Note: this is not a NotificationCompat builder so be mindful of the
// API level of methods you call on the builder.
// TODO(crbug.com/697104) We should probably use a Compat builder.
- ChromeNotificationBuilder builder = AppHooks.get().createChromeNotificationBuilder(
- false /* preferCompat */, NotificationConstants.CATEGORY_ID_SITES,
- mContext.getString(org.chromium.chrome.R.string.notification_category_sites),
- NotificationConstants.CATEGORY_GROUP_ID_GENERAL,
- mContext.getString(
- org.chromium.chrome.R.string.notification_category_group_general));
+ ChromeNotificationBuilder builder =
+ NotificationBuilderFactory.createChromeNotificationBuilder(false /* preferCompat */,
+ NotificationConstants.CATEGORY_ID_SITES,
+ mContext.getString(
+ org.chromium.chrome.R.string.notification_category_sites),
+ NotificationConstants.CATEGORY_GROUP_ID_GENERAL,
+ mContext.getString(
+ org.chromium.chrome.R.string.notification_category_group_general));
builder.setContentTitle(mTitle);
builder.setContentText(mBody);

Powered by Google App Engine
This is Rietveld 408576698