Merge "If two groups are posted to settings, remove old group and log." into oc-dev am: 9fa5e66a66
am: 59b4e5b6c4
Change-Id: I0661ae34df7dcca80b394e9751ce91dd2f5f25e1
This commit is contained in:
@@ -145,6 +145,15 @@ public class AppNotificationSettings extends NotificationSettingsBase {
|
||||
}
|
||||
|
||||
private void populateChannelList() {
|
||||
if (!mChannelGroups.isEmpty()) {
|
||||
// If there's anything in mChannelGroups, we've called populateChannelList twice.
|
||||
// Clear out existing channels and log.
|
||||
Log.w(TAG, "Notification channel group posted twice to settings - old size " +
|
||||
mChannelGroups.size() + ", new size " + mChannelGroupList.size());
|
||||
for (Preference p : mChannelGroups) {
|
||||
getPreferenceScreen().removePreference(p);
|
||||
}
|
||||
}
|
||||
if (mChannelGroupList.isEmpty()) {
|
||||
PreferenceCategory groupCategory = new PreferenceCategory(getPrefContext());
|
||||
groupCategory.setTitle(R.string.notification_channels);
|
||||
|
Reference in New Issue
Block a user