Add notification sent count to app info

Test: robotests
Bug: 79607096
Change-Id: I6f96ad7890ff8f224749db10fc8a18d4626cac11
This commit is contained in:
Julia Reynolds
2018-06-12 10:32:46 -04:00
parent 8ebfb12cac
commit 7b5ef08b81
5 changed files with 47 additions and 31 deletions

View File

@@ -84,14 +84,15 @@ public class AppNotificationPreferenceController extends AppInfoPreferenceContro
if (appRow.banned) {
return context.getText(R.string.notifications_disabled);
} else if (appRow.channelCount == 0) {
return context.getText(R.string.notifications_enabled);
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
} else if (appRow.channelCount == appRow.blockedChannelCount) {
return context.getText(R.string.notifications_disabled);
} else {
if (appRow.blockedChannelCount == 0) {
return context.getText(R.string.notifications_enabled);
return NotificationBackend.getSentSummary(context, appRow.sentByApp, false);
}
return context.getString(R.string.notifications_enabled_with_info,
NotificationBackend.getSentSummary(context, appRow.sentByApp, false),
context.getResources().getQuantityString(R.plurals.notifications_categories_off,
appRow.blockedChannelCount, appRow.blockedChannelCount));
}