Loading res/values/strings.xml +1 −4 Original line number Diff line number Diff line Loading @@ -6756,9 +6756,6 @@ <!-- Restrictions screen - menu label to change restrictions pin [CHAR LIMIT=25] --> <string name="restriction_menu_change_pin">Change PIN</string> <!-- Label for are-notifications-enabled checkbox in app details [CHAR LIMIT=20] --> <string name="app_notifications_switch_label">Show notifications</string> <!-- Help URLs for some screens. Not specified here. Specified in product overlays --><skip/> <!-- Help menu label [CHAR LIMIT=20] --> <string name="help_label">Help & feedback</string> Loading Loading @@ -8026,7 +8023,7 @@ <string name="notification_channel_summary_high">When device is unlocked, show notifications as a banner across the top of the screen</string> <!-- [CHAR LIMIT=100] Label for on/off toggle --> <string name="notification_switch_label">Show notifications</string> <string name="notification_switch_label">All <xliff:g id="app_name" example="Android Services">%1$s</xliff:g> notifications</string> <!-- Default Apps > Default notification assistant --> <string name="default_notification_assistant">Adaptive Notifications</string> src/com/android/settings/notification/BlockPreferenceController.java +16 −2 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); } } } src/com/android/settings/notification/ChannelListPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading Loading
res/values/strings.xml +1 −4 Original line number Diff line number Diff line Loading @@ -6756,9 +6756,6 @@ <!-- Restrictions screen - menu label to change restrictions pin [CHAR LIMIT=25] --> <string name="restriction_menu_change_pin">Change PIN</string> <!-- Label for are-notifications-enabled checkbox in app details [CHAR LIMIT=20] --> <string name="app_notifications_switch_label">Show notifications</string> <!-- Help URLs for some screens. Not specified here. Specified in product overlays --><skip/> <!-- Help menu label [CHAR LIMIT=20] --> <string name="help_label">Help & feedback</string> Loading Loading @@ -8026,7 +8023,7 @@ <string name="notification_channel_summary_high">When device is unlocked, show notifications as a banner across the top of the screen</string> <!-- [CHAR LIMIT=100] Label for on/off toggle --> <string name="notification_switch_label">Show notifications</string> <string name="notification_switch_label">All <xliff:g id="app_name" example="Android Services">%1$s</xliff:g> notifications</string> <!-- Default Apps > Default notification assistant --> <string name="default_notification_assistant">Adaptive Notifications</string>
src/com/android/settings/notification/BlockPreferenceController.java +16 −2 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); } } }
src/com/android/settings/notification/ChannelListPreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -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()); Loading