Limit unconfigurability to specified channels.

Bug: 62426259
Test: Unit test in NotificationBackendTest.java
Change-Id: I79d069cee0b641d520b02f8a25751ec3e0d4632d
This commit is contained in:
Alison Cichowlas
2017-06-08 16:17:23 -04:00
parent d77b699e60
commit 80fa6b5833
5 changed files with 164 additions and 9 deletions

View File

@@ -212,7 +212,8 @@ public class AppNotificationSettings extends NotificationSettingsBase {
MasterSwitchPreference channelPref = new MasterSwitchPreference(
getPrefContext());
channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null
&& isChannelBlockable(mAppRow.systemApp, channel));
&& isChannelBlockable(mAppRow.systemApp, channel)
&& isChannelConfigurable(channel));
channelPref.setKey(channel.getId());
channelPref.setTitle(channel.getName());
channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE);