Merge "Reorder visual effect fields" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-09 18:52:25 +00:00
committed by Android (Google) Code Review
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