diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3af7142edf2..758c05482dd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -6756,9 +6756,6 @@
Change PIN
-
- Show notifications
-
Help & feedback
@@ -8026,7 +8023,7 @@
When device is unlocked, show notifications as a banner across the top of the screen
- Show notifications
+ All %1$s notifications
Adaptive Notifications
diff --git a/src/com/android/settings/notification/BlockPreferenceController.java b/src/com/android/settings/notification/BlockPreferenceController.java
index 27144b8529e..0dfd38b1420 100644
--- a/src/com/android/settings/notification/BlockPreferenceController.java
+++ b/src/com/android/settings/notification/BlockPreferenceController.java
@@ -62,8 +62,8 @@ public class BlockPreferenceController extends NotificationPreferenceController
pref.setSelectable(false);
SwitchBar bar = pref.findViewById(R.id.switch_bar);
if (bar != null) {
- bar.setSwitchBarText(R.string.notification_switch_label,
- R.string.notification_switch_label);
+ String switchBarText = getSwitchBarText();
+ bar.setSwitchBarText(switchBarText, switchBarText);
bar.show();
try {
bar.addOnSwitchChangeListener(this);
@@ -125,4 +125,18 @@ public class BlockPreferenceController extends NotificationPreferenceController
}
mImportanceListener.onImportanceChanged();
}
+
+ String getSwitchBarText() {
+ if (mChannel != null) {
+ return mContext.getString(R.string.notification_content_block_title);
+ } else {
+ CharSequence fieldContextName;
+ if (mChannelGroup != null) {
+ fieldContextName = mChannelGroup.getName();
+ } else {
+ fieldContextName = mAppRow.label;
+ }
+ return mContext.getString(R.string.notification_switch_label, fieldContextName);
+ }
+ }
}
diff --git a/src/com/android/settings/notification/ChannelListPreferenceController.java b/src/com/android/settings/notification/ChannelListPreferenceController.java
index 7ff407c8e29..7ea33393c60 100644
--- a/src/com/android/settings/notification/ChannelListPreferenceController.java
+++ b/src/com/android/settings/notification/ChannelListPreferenceController.java
@@ -156,7 +156,8 @@ public class ChannelListPreferenceController extends NotificationPreferenceContr
NotificationChannelGroup group) {
RestrictedSwitchPreference preference =
new RestrictedSwitchPreference(mContext);
- preference.setTitle(R.string.notification_switch_label);
+ preference.setTitle(mContext.getString(
+ R.string.notification_switch_label, group.getName()));
preference.setEnabled(mAdmin == null
&& isChannelGroupBlockable(group));
preference.setChecked(!group.isBlocked());