| Index: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
|
| index c770d7bbcf5c54ca6c61899d334267af53b669cc..58991a3331cd60aefc4016b8ee77604572ab2c93 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationCompatBuilder.java
|
| @@ -8,7 +8,9 @@ import android.app.Notification;
|
| import android.app.PendingIntent;
|
| import android.content.Context;
|
| import android.graphics.Bitmap;
|
| +import android.graphics.drawable.Icon;
|
| import android.support.v4.app.NotificationCompat;
|
| +import android.widget.RemoteViews;
|
|
|
| /**
|
| * Wraps a NotificationCompat.Builder object.
|
| @@ -33,13 +35,13 @@ public class NotificationCompatBuilder implements ChromeNotificationBuilder {
|
| }
|
|
|
| @Override
|
| - public ChromeNotificationBuilder setContentTitle(String title) {
|
| + public ChromeNotificationBuilder setContentTitle(CharSequence title) {
|
| mBuilder.setContentTitle(title);
|
| return this;
|
| }
|
|
|
| @Override
|
| - public ChromeNotificationBuilder setContentText(String text) {
|
| + public ChromeNotificationBuilder setContentText(CharSequence text) {
|
| mBuilder.setContentText(text);
|
| return this;
|
| }
|
| @@ -51,7 +53,13 @@ public class NotificationCompatBuilder implements ChromeNotificationBuilder {
|
| }
|
|
|
| @Override
|
| - public ChromeNotificationBuilder setTicker(String text) {
|
| + public ChromeNotificationBuilder setSmallIcon(Icon icon) {
|
| + assert false; // unused
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| + public ChromeNotificationBuilder setTicker(CharSequence text) {
|
| mBuilder.setTicker(text);
|
| return this;
|
| }
|
| @@ -87,12 +95,17 @@ public class NotificationCompatBuilder implements ChromeNotificationBuilder {
|
| }
|
|
|
| @Override
|
| - public ChromeNotificationBuilder addAction(int icon, String title, PendingIntent intent) {
|
| + public ChromeNotificationBuilder addAction(int icon, CharSequence title, PendingIntent intent) {
|
| mBuilder.addAction(icon, title, intent);
|
| return this;
|
| }
|
|
|
| @Override
|
| + public ChromeNotificationBuilder addAction(Notification.Action action) {
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| public ChromeNotificationBuilder setDeleteIntent(PendingIntent intent) {
|
| mBuilder.setDeleteIntent(intent);
|
| return this;
|
| @@ -111,7 +124,7 @@ public class NotificationCompatBuilder implements ChromeNotificationBuilder {
|
| }
|
|
|
| @Override
|
| - public ChromeNotificationBuilder setSubText(String text) {
|
| + public ChromeNotificationBuilder setSubText(CharSequence text) {
|
| mBuilder.setSubText(text);
|
| return this;
|
| }
|
| @@ -141,6 +154,46 @@ public class NotificationCompatBuilder implements ChromeNotificationBuilder {
|
| }
|
|
|
| @Override
|
| + public ChromeNotificationBuilder setDefaults(int defaults) {
|
| + mBuilder.setDefaults(defaults);
|
| + return this;
|
| + }
|
| +
|
| + public ChromeNotificationBuilder setOnlyAlertOnce(boolean onlyAlertOnce) {
|
| + mBuilder.setOnlyAlertOnce(onlyAlertOnce);
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| + public ChromeNotificationBuilder setPublicVersion(Notification publicNotification) {
|
| + mBuilder.setPublicVersion(publicNotification);
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| + public ChromeNotificationBuilder setContent(RemoteViews views) {
|
| + mBuilder.setCustomContentView(views);
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| + public ChromeNotificationBuilder setStyle(Notification.BigPictureStyle style) {
|
| + assert false; // unused
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| + public ChromeNotificationBuilder setStyle(Notification.BigTextStyle bigTextStyle) {
|
| + assert false; // unused
|
| + return this;
|
| + }
|
| +
|
| + @Override
|
| + public Notification buildWithBigContentView(RemoteViews view) {
|
| + return mBuilder.setCustomBigContentView(view).build();
|
| + }
|
| +
|
| + @Override
|
| public Notification buildWithBigTextStyle(String bigText) {
|
| NotificationCompat.BigTextStyle bigTextStyle =
|
| new NotificationCompat.BigTextStyle(mBuilder);
|
|
|