Loading src/com/android/settings/notification/AppNotificationSettings.java +2 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,8 @@ public class AppNotificationSettings extends NotificationSettingsBase { final NotificationChannel channel) { MasterSwitchPreference channelPref = new MasterSwitchPreference( getPrefContext()); channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null && !mAppRow.systemApp); channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null && isChannelBlockable(mAppRow.systemApp, channel)); channelPref.setKey(channel.getId()); channelPref.setTitle(channel.getName()); channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE); Loading src/com/android/settings/notification/ChannelNotificationSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ public class ChannelNotificationSettings extends NotificationSettingsBase { mBlockBar.setKey(KEY_BLOCK); getPreferenceScreen().addPreference(mBlockBar); if (mAppRow.systemApp && mChannel.getImportance() != NotificationManager.IMPORTANCE_NONE) { if (!isChannelBlockable(mAppRow.systemApp, mChannel)) { setVisible(mBlockBar, false); } Loading src/com/android/settings/notification/NotificationSettingsBase.java +8 −0 Original line number Diff line number Diff line Loading @@ -443,4 +443,12 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen return lockscreenSecure; } protected boolean isChannelBlockable(boolean systemApp, NotificationChannel channel) { if (!mAppRow.systemApp) { return true; } return channel.isBlockableSystem() || channel.getImportance() == NotificationManager.IMPORTANCE_NONE; } } Loading
src/com/android/settings/notification/AppNotificationSettings.java +2 −1 Original line number Diff line number Diff line Loading @@ -203,7 +203,8 @@ public class AppNotificationSettings extends NotificationSettingsBase { final NotificationChannel channel) { MasterSwitchPreference channelPref = new MasterSwitchPreference( getPrefContext()); channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null && !mAppRow.systemApp); channelPref.setSwitchEnabled(mSuspendedAppsAdmin == null && isChannelBlockable(mAppRow.systemApp, channel)); channelPref.setKey(channel.getId()); channelPref.setTitle(channel.getName()); channelPref.setChecked(channel.getImportance() != IMPORTANCE_NONE); Loading
src/com/android/settings/notification/ChannelNotificationSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ public class ChannelNotificationSettings extends NotificationSettingsBase { mBlockBar.setKey(KEY_BLOCK); getPreferenceScreen().addPreference(mBlockBar); if (mAppRow.systemApp && mChannel.getImportance() != NotificationManager.IMPORTANCE_NONE) { if (!isChannelBlockable(mAppRow.systemApp, mChannel)) { setVisible(mBlockBar, false); } Loading
src/com/android/settings/notification/NotificationSettingsBase.java +8 −0 Original line number Diff line number Diff line Loading @@ -443,4 +443,12 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen return lockscreenSecure; } protected boolean isChannelBlockable(boolean systemApp, NotificationChannel channel) { if (!mAppRow.systemApp) { return true; } return channel.isBlockableSystem() || channel.getImportance() == NotificationManager.IMPORTANCE_NONE; } }