Reorder visual effect fields

Bug: 77657376
Test: RunSettingsRoboTests
Change-Id: I9f5be8f173d8d987d419f6d444d76d2abe175b4e
This commit is contained in:
Julia Reynolds
2018-04-06 13:02:53 -04:00
parent 2df5a0b322
commit 9c3e2f6ceb
6 changed files with 98 additions and 35 deletions

View File

@@ -71,6 +71,35 @@ public class ZenModeSettingsTest {
assertEquals(alarmsAndMedia, result);
}
@Test
public void testBlockedEffectsSummary_none() {
NotificationManager.Policy policy = new NotificationManager.Policy(0, 0, 0, 0);
assertEquals("Never", mBuilder.getBlockedEffectsSummary(policy));
}
@Test
public void testBlockedEffectsSummary_screen_on() {
NotificationManager.Policy policy = new NotificationManager.Policy(
0, 0, 0, NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK);
assertEquals("When screen is on", mBuilder.getBlockedEffectsSummary(policy));
}
@Test
public void testBlockedEffectsSummary_screen_off() {
NotificationManager.Policy policy = new NotificationManager.Policy(
0, 0, 0, NotificationManager.Policy.SUPPRESSED_EFFECT_AMBIENT);
assertEquals("When screen is off", mBuilder.getBlockedEffectsSummary(policy));
}
@Test
public void testBlockedEffectsSummary_both() {
NotificationManager.Policy policy = new NotificationManager.Policy(0, 0, 0,
NotificationManager.Policy.SUPPRESSED_EFFECT_NOTIFICATION_LIST
| NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS);
assertEquals("When screen is off, When screen is on",
mBuilder.getBlockedEffectsSummary(policy));
}
@Test
public void searchProvider_shouldIndexDefaultXml() {
final List<SearchIndexableResource> sir = ZenModeSettings.SEARCH_INDEX_DATA_PROVIDER