Design refresh for modes that don't filter notifications
And fix a crash noticed in ZenModeAppsLinkPreferenceController Test: atest com/android/settings/notification/modes Fixes: 308820027 Flag: android.app.modes_ui Change-Id: I0cfe4e10ca7ff97dac3b3b8756cc36f4d6f91ea2
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.settings.notification.modes;
|
||||
|
||||
import static android.app.NotificationManager.INTERRUPTION_FILTER_ALL;
|
||||
import static android.service.notification.ZenPolicy.CONVERSATION_SENDERS_ANYONE;
|
||||
import static android.service.notification.ZenPolicy.CONVERSATION_SENDERS_IMPORTANT;
|
||||
import static android.service.notification.ZenPolicy.CONVERSATION_SENDERS_NONE;
|
||||
@@ -187,7 +188,8 @@ class ZenModeSummaryHelper {
|
||||
String getDisplayEffectsSummary(ZenMode zenMode) {
|
||||
boolean isFirst = true;
|
||||
List<String> enabledEffects = new ArrayList<>();
|
||||
if (!zenMode.getPolicy().shouldShowAllVisualEffects()) {
|
||||
if (!zenMode.getPolicy().shouldShowAllVisualEffects()
|
||||
&& zenMode.getRule().getInterruptionFilter() != INTERRUPTION_FILTER_ALL) {
|
||||
enabledEffects.add(getBlockedEffectsSummary(zenMode));
|
||||
isFirst = false;
|
||||
}
|
||||
@@ -411,8 +413,6 @@ class ZenModeSummaryHelper {
|
||||
return formatAppsList(appsBypassing);
|
||||
} else if (zenMode.getPolicy().getAllowedChannels() == ZenPolicy.CHANNEL_POLICY_NONE) {
|
||||
return mContext.getResources().getString(R.string.zen_mode_apps_none_apps);
|
||||
} else if (zenMode.getPolicy().getAllowedChannels() == ZenMode.CHANNEL_POLICY_ALL) {
|
||||
return mContext.getResources().getString(R.string.zen_mode_apps_all_apps);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user