| 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 a775e00861b618a13bd678fdc0f2760a81524837..bf9291b14f5817e774549be33967c42deafcf4f3 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
|
| @@ -467,17 +467,16 @@ private void displayNotification(long persistentNotificationId, String origin, S
|
| persistentNotificationId, origin, profileId,
|
| incognito, tag, actionIndex));
|
| }
|
| - // Site settings button is always the last action button.
|
| - if (actionTitles.length == 0) {
|
| - notificationBuilder.addAction(R.drawable.settings_cog,
|
| - res.getString(R.string.page_info_site_settings_button), pendingSettingsIntent);
|
| - } else {
|
| - // Hide site settings icon and use shorter text when website provided
|
| - // action buttons.
|
| - notificationBuilder.addAction(0 /* actionIcon */,
|
| - res.getString(R.string.notification_site_settings_button),
|
| - pendingSettingsIntent);
|
| - }
|
| +
|
| + // If the settings button is displayed together with the other buttons it has to be the last
|
| + // one, so add it after the other actions.
|
| + // If there are no actions provided by the website, use a longer title string.
|
| + CharSequence settingsTitle = actionTitles.length == 0
|
| + ? res.getString(R.string.page_info_site_settings_button)
|
| + : res.getString(R.string.notification_site_settings_button);
|
| + // If there are no actions provided by the website, use an icon.
|
| + int settingsIconId = actionTitles.length == 0 ? R.drawable.settings_cog : 0;
|
| + notificationBuilder.addSettingsAction(settingsIconId, settingsTitle, pendingSettingsIntent);
|
|
|
| notificationBuilder.setDefaults(makeDefaults(vibrationPattern.length, silent));
|
| if (vibrationPattern.length > 0) {
|
|
|