Update subTitle of NotificationChannelSlice

If there are <=3 channels, should not have the "Tap to manage all".

Fixes: 124461104
Test: visual, robotests
Change-Id: Iebb957c65b8ca53f4c5d482041837338b7b3bbf2
This commit is contained in:
Yanting Yang
2019-02-21 23:12:15 +08:00
parent cd1718c9e4
commit e7f2ec1360
3 changed files with 56 additions and 6 deletions

View File

@@ -415,9 +415,13 @@ public class NotificationChannelSlice implements CustomSliceable {
private CharSequence getSubTitle(String packageName, int uid) {
final int channelCount = mNotificationBackend.getChannelCount(packageName, uid);
if (channelCount > DEFAULT_EXPANDED_ROW_COUNT) {
return mContext.getString(
R.string.notification_many_channel_count_summary, channelCount);
}
return mContext.getResources().getQuantityString(
R.plurals.notification_channel_count_summary,
channelCount, channelCount);
R.plurals.notification_few_channel_count_summary, channelCount, channelCount);
}
private Intent getAppAndNotificationPageIntent() {