Merge "Notification summary updates" into pi-dev am: 81c15c05c8

am: bd9eb14472

Change-Id: I47911d0bb91bc3e00d17c28ca674f7d3c7fcdaa6
This commit is contained in:
Julia Reynolds
2018-04-12 16:36:46 -07:00
committed by android-build-merger
7 changed files with 142 additions and 8 deletions

View File

@@ -81,11 +81,15 @@ public class AppNotificationPreferenceController extends AppInfoPreferenceContro
if (appRow == null) {
return "";
}
if (appRow.banned || appRow.channelCount == appRow.blockedChannelCount) {
return context.getString(R.string.notifications_disabled);
if (appRow.banned) {
return context.getText(R.string.notifications_disabled);
} else if (appRow.channelCount == 0) {
return context.getText(R.string.notifications_enabled);
} else if (appRow.channelCount == appRow.blockedChannelCount) {
return context.getText(R.string.notifications_disabled);
} else {
if (appRow.blockedChannelCount == 0) {
return context.getString(R.string.notifications_enabled);
return context.getText(R.string.notifications_enabled);
}
return context.getString(R.string.notifications_enabled_with_info,
context.getResources().getQuantityString(R.plurals.notifications_categories_off,