From d09bbeefb639df2cc7b5952e97586e0d5f94cdd8 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 11 Feb 2020 14:08:59 -0500 Subject: [PATCH] Link to notif history in shade Test: manual Bug: 137396965 Change-Id: I083cf332ca0b6098a38d68bdff441c929aa0928a --- core/java/android/provider/Settings.java | 9 +++++++++ packages/SystemUI/res/values/strings.xml | 3 +++ .../systemui/statusbar/notification/row/FooterView.java | 4 ++-- .../stack/NotificationStackScrollLayout.java | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index b9207e5a12d56..f95abcf2be5ec 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1770,6 +1770,15 @@ public final class Settings { public static final String ACTION_NOTIFICATION_SETTINGS = "android.settings.NOTIFICATION_SETTINGS"; + /** + * Activity Action: Show notification history screen. + * + * @hide + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_NOTIFICATION_HISTORY + = "android.settings.NOTIFICATION_HISTORY"; + /** * Activity Action: Show app listing settings, filtered by those that send notifications. * diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index ebaf55fd7e9ce..81b43c0f7d1ef 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1195,6 +1195,9 @@ Manage + + History + Silent notifications diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/FooterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/FooterView.java index c2da517772109..41b248fb96340 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/FooterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/FooterView.java @@ -78,9 +78,9 @@ public class FooterView extends StackScrollerDecorView { mDismissButton.setText(R.string.clear_all_notifications_text); mDismissButton.setContentDescription( mContext.getString(R.string.accessibility_clear_all)); - mManageButton.setText(R.string.manage_notifications_text); + mManageButton.setText(R.string.manage_notifications_history_text); mManageButton.setContentDescription( - mContext.getString(R.string.accessibility_manage_notification)); + mContext.getString(R.string.manage_notifications_history_text)); } public boolean isButtonVisible() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 4b9976cc20975..0cc337187f02a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -5481,7 +5481,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @ShadeViewRefactor(RefactorComponent.SHADE_VIEW) public void manageNotifications(View v) { - Intent intent = new Intent(Settings.ACTION_ALL_APPS_NOTIFICATION_SETTINGS); + Intent intent = new Intent(Settings.ACTION_NOTIFICATION_HISTORY); mStatusBar.startActivity(intent, true, true, Intent.FLAG_ACTIVITY_SINGLE_TOP); }