Improve notification slice string on home page

Add ContextualNotificationChannelSlice to show more clear sub title on
notification slice.

Fixes: 128641319
Test: visual, robotests
Change-Id: I650102f4cde7d8d397c7a501ba9ee76c401ba9db
This commit is contained in:
Yanting Yang
2019-03-19 18:17:50 +08:00
parent e4359a9eee
commit aed7ad5a43
6 changed files with 120 additions and 7 deletions

View File

@@ -128,7 +128,7 @@ public class NotificationChannelSlice implements CustomSliceable {
return leftChannel.getId().compareTo(rightChannel.getId());
};
private final Context mContext;
protected final Context mContext;
@VisibleForTesting
NotificationBackend mNotificationBackend;
private String mPackageName;
@@ -413,7 +413,7 @@ public class NotificationChannelSlice implements CustomSliceable {
return maxSentCountPackage;
}
private CharSequence getSubTitle(String packageName, int uid) {
protected CharSequence getSubTitle(String packageName, int uid) {
final int channelCount = mNotificationBackend.getChannelCount(packageName, uid);
if (channelCount > DEFAULT_EXPANDED_ROW_COUNT) {