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

@@ -56,10 +56,12 @@ public class SettingsContextualCardProvider extends ContextualCardProvider {
.setCardName(CustomSliceRegistry.BATTERY_FIX_SLICE_URI.toString())
.setCardCategory(ContextualCard.Category.IMPORTANT)
.build();
final String contextualNotificationChannelSliceUri =
CustomSliceRegistry.CONTEXTUAL_NOTIFICATION_CHANNEL_SLICE_URI.toString();
final ContextualCard notificationChannelCard =
ContextualCard.newBuilder()
.setSliceUri(CustomSliceRegistry.NOTIFICATION_CHANNEL_SLICE_URI.toString())
.setCardName(CustomSliceRegistry.NOTIFICATION_CHANNEL_SLICE_URI.toString())
.setSliceUri(contextualNotificationChannelSliceUri)
.setCardName(contextualNotificationChannelSliceUri)
.setCardCategory(ContextualCard.Category.POSSIBLE)
.build();
final ContextualCardList cards = ContextualCardList.newBuilder()
@@ -72,4 +74,4 @@ public class SettingsContextualCardProvider extends ContextualCardProvider {
return cards;
}
}
}