Loading aconfig/settings_notification_flag_declarations.aconfig +0 −6 Original line number Diff line number Diff line package: "com.android.settings.flags" container: "system_ext" flag { name: "dedupe_dnd_settings_channels" namespace: "systemui" description: "Controls adding group names to channel names in the DND>Apps settings page" bug: "294333850" } src/com/android/settings/notification/app/AppChannelsBypassingDndPreferenceController.java +14 −18 Original line number Diff line number Diff line Loading @@ -148,7 +148,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre for (NotificationChannel channel : channelGroup.getChannels()) { if (!isConversation(channel)) { newChannelList.add(channel); if (Flags.dedupeDndSettingsChannels()) { mChannelGroupNames.put(channel, channelGroup.getName().toString()); // Check if channel name is unique on this page; if not, save it. if (allChannelNames.contains(channel.getName())) { Loading @@ -159,7 +158,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre } } } } Collections.sort(newChannelList, CHANNEL_COMPARATOR); mChannels = newChannelList; return null; Loading Loading @@ -190,7 +188,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre && isChannelConfigurable(channel) && showNotification(channel)); channelPreference.setTitle(BidiFormatter.getInstance().unicodeWrap(channel.getName())); if (Flags.dedupeDndSettingsChannels()) { // If the channel shares its name with another channel, set group name as summary // to disambiguate in the list. if (mDuplicateChannelNames.contains(channel.getName().toString()) Loading @@ -200,7 +197,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre channelPreference.setSummary(BidiFormatter.getInstance().unicodeWrap( mChannelGroupNames.get(channel))); } } channelPreference.setChecked(showNotificationInDnd(channel)); channelPreference.setOnPreferenceChangeListener( new Preference.OnPreferenceChangeListener() { Loading tests/robotests/src/com/android/settings/notification/app/AppChannelsBypassingDndPreferenceControllerTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ public class AppChannelsBypassingDndPreferenceControllerTest { @Test public void displayPreference_duplicateChannelName_AddsGroupNameAsSummary() { mSetFlagsRule.enableFlags(Flags.FLAG_DEDUPE_DND_SETTINGS_CHANNELS); NotificationChannelGroup group1 = new NotificationChannelGroup("group1_id", "Group1"); NotificationChannelGroup group2 = new NotificationChannelGroup("group2_id", "Group2"); Loading Loading
aconfig/settings_notification_flag_declarations.aconfig +0 −6 Original line number Diff line number Diff line package: "com.android.settings.flags" container: "system_ext" flag { name: "dedupe_dnd_settings_channels" namespace: "systemui" description: "Controls adding group names to channel names in the DND>Apps settings page" bug: "294333850" }
src/com/android/settings/notification/app/AppChannelsBypassingDndPreferenceController.java +14 −18 Original line number Diff line number Diff line Loading @@ -148,7 +148,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre for (NotificationChannel channel : channelGroup.getChannels()) { if (!isConversation(channel)) { newChannelList.add(channel); if (Flags.dedupeDndSettingsChannels()) { mChannelGroupNames.put(channel, channelGroup.getName().toString()); // Check if channel name is unique on this page; if not, save it. if (allChannelNames.contains(channel.getName())) { Loading @@ -159,7 +158,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre } } } } Collections.sort(newChannelList, CHANNEL_COMPARATOR); mChannels = newChannelList; return null; Loading Loading @@ -190,7 +188,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre && isChannelConfigurable(channel) && showNotification(channel)); channelPreference.setTitle(BidiFormatter.getInstance().unicodeWrap(channel.getName())); if (Flags.dedupeDndSettingsChannels()) { // If the channel shares its name with another channel, set group name as summary // to disambiguate in the list. if (mDuplicateChannelNames.contains(channel.getName().toString()) Loading @@ -200,7 +197,6 @@ public class AppChannelsBypassingDndPreferenceController extends NotificationPre channelPreference.setSummary(BidiFormatter.getInstance().unicodeWrap( mChannelGroupNames.get(channel))); } } channelPreference.setChecked(showNotificationInDnd(channel)); channelPreference.setOnPreferenceChangeListener( new Preference.OnPreferenceChangeListener() { Loading
tests/robotests/src/com/android/settings/notification/app/AppChannelsBypassingDndPreferenceControllerTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ public class AppChannelsBypassingDndPreferenceControllerTest { @Test public void displayPreference_duplicateChannelName_AddsGroupNameAsSummary() { mSetFlagsRule.enableFlags(Flags.FLAG_DEDUPE_DND_SETTINGS_CHANNELS); NotificationChannelGroup group1 = new NotificationChannelGroup("group1_id", "Group1"); NotificationChannelGroup group2 = new NotificationChannelGroup("group2_id", "Group2"); Loading