Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java |
| index c7665997e2de3934b4e53ef3239a2a1d5ed0a5b7..b8bd8b614913f80ece4104d61e047de2cb4f44f1 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationUIManager.java |
| @@ -452,7 +452,8 @@ public class NotificationUIManager { |
| private void displayNotification(long persistentNotificationId, String origin, String profileId, |
| boolean incognito, String tag, String title, String body, Bitmap icon, Bitmap badge, |
| int[] vibrationPattern, long timestamp, boolean renotify, boolean silent, |
| - String[] actionTitles, Bitmap[] actionIcons) { |
| + int[] actionTypes, String[] actionTitles, Bitmap[] actionIcons, |
| + String[] actionPlaceholders) { |
| if (actionTitles.length != actionIcons.length) { |
|
Michael van Ouwerkerk
2016/04/06 13:27:35
Extend this bit for types and placeholders.
Nina
2016/04/06 16:05:49
Done.
|
| throw new IllegalArgumentException("The number of action titles and icons must match."); |
| } |
| @@ -496,10 +497,13 @@ public class NotificationUIManager { |
| .setTimestamp(timestamp) |
| .setRenotify(renotify) |
| .setOrigin(UrlUtilities.formatUrlForSecurityDisplay( |
| - origin, false /* showScheme */)); |
| + origin, false /* showScheme */)) |
| + .setDefaultActionPlaceholder(res.getString( |
| + R.string.notification_inline_reply_default_placeholder)); |
| for (int actionIndex = 0; actionIndex < actionTitles.length; actionIndex++) { |
| - notificationBuilder.addAction(actionIcons[actionIndex], actionTitles[actionIndex], |
| + notificationBuilder.addAction(actionTypes[actionIndex], actionIcons[actionIndex], |
| + actionTitles[actionIndex], actionPlaceholders[actionIndex], |
| makePendingIntent(NotificationConstants.ACTION_CLICK_NOTIFICATION, |
| persistentNotificationId, origin, profileId, |
| incognito, tag, actionIndex)); |