Clean up notification settings am: 6a603e7f4b
am: 2ae83f85d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15029783 Change-Id: Idedee8c5e89cbc1abd847f806964ba866b491f27
This commit is contained in:
@@ -118,7 +118,7 @@ public class HeaderPreferenceControllerTest {
|
||||
|
||||
NotificationChannelGroup group = new NotificationChannelGroup("id", "name");
|
||||
mController.onResume(appRow, null, group, null, null, null, null);
|
||||
assertEquals(group.getName(), mController.getLabel());
|
||||
assertEquals(appRow.label, mController.getLabel());
|
||||
|
||||
NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE);
|
||||
mController.onResume(appRow, channel, group, null, null, null, null);
|
||||
@@ -155,4 +155,24 @@ public class HeaderPreferenceControllerTest {
|
||||
mController.onResume(appRow, defaultChannel, null, null, null, null, null);
|
||||
assertEquals("", mController.getSummary());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetSecondSummary() {
|
||||
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
|
||||
appRow.label = "bananas";
|
||||
mController.onResume(appRow, null, null, null, null, null, null);
|
||||
assertEquals("", mController.getSecondSummary());
|
||||
|
||||
NotificationChannelGroup group = new NotificationChannelGroup("id", "name");
|
||||
mController.onResume(appRow, null, group, null, null, null, null);
|
||||
assertEquals("", mController.getSecondSummary());
|
||||
|
||||
NotificationChannel channel = new NotificationChannel("cid", "cname", IMPORTANCE_NONE);
|
||||
mController.onResume(appRow, channel, group, null, null, null, null);
|
||||
assertEquals("", mController.getSecondSummary());
|
||||
|
||||
channel.setDescription("description");
|
||||
mController.onResume(appRow, channel, group, null, null, null, null);
|
||||
assertEquals("description", mController.getSecondSummary());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user