| 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..8d652bc0ca2c96a91755a4097d7bbd885d47a580 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,9 +452,17 @@ 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) {
|
| - if (actionTitles.length != actionIcons.length) {
|
| - throw new IllegalArgumentException("The number of action titles and icons must match.");
|
| + int[] actionTypes, String[] actionTitles, Bitmap[] actionIcons,
|
| + String[] actionPlaceholders) {
|
| + if (actionTypes.length != actionTitles.length) {
|
| + throw new IllegalArgumentException("The number of action types and titles must match.");
|
| + }
|
| + if (actionTypes.length != actionIcons.length) {
|
| + throw new IllegalArgumentException("The number of action types and icons must match.");
|
| + }
|
| + if (actionTypes.length != actionPlaceholders.length) {
|
| + throw new IllegalArgumentException(
|
| + "The number of action types and placeholders must match.");
|
| }
|
|
|
| Resources res = mAppContext.getResources();
|
| @@ -496,10 +504,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));
|
|
|