Add filtering to notification channel settings
Allow apps that are launching this page to specify targeted subsets of settings that should be shown. Test: settings notification robotests Bug: 177246841 Change-Id: Ib491c43f1861a9775e3b25f39134cdbe105a7ff8
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.notification.app;
|
||||
|
||||
import android.app.NotificationChannel;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -56,6 +57,11 @@ public class ConversationDemotePreferenceController extends NotificationPreferen
|
||||
return !TextUtils.isEmpty(mChannel.getConversationId()) && !mChannel.isDemoted();
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isIncludedInFilter() {
|
||||
return mPreferenceFilter.contains(NotificationChannel.EDIT_CONVERSATION);
|
||||
}
|
||||
|
||||
public void updateState(Preference preference) {
|
||||
preference.setEnabled(mAdmin == null);
|
||||
}
|
||||
|
Reference in New Issue
Block a user