Clean up notification settings

- Reorganize settings
- Fix dividers
- Add icons
- Fix titles
- Fix colors
- Fix indentation
- Add summaries

Fixes: 190079590
Test: manual inspection, robotests

Change-Id: Ia03219575d3b0c78f9f9b088aa3cdaa29cfdf412
This commit is contained in:
Julia Reynolds
2021-06-17 16:31:35 -04:00
parent 0fcac8bf0d
commit 6a603e7f4b
21 changed files with 231 additions and 135 deletions

View File

@@ -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());
}
}