Add bubble confirmation prompt

@ the app level if the global level is off

Test: robotests
Bug: 129068779
Change-Id: I94acb334dc9879cd372a2a0dfa8e9508fbf1c316
This commit is contained in:
Julia Reynolds
2019-04-01 11:51:21 -04:00
parent 44427259e8
commit 19e2473bed
9 changed files with 279 additions and 30 deletions

View File

@@ -109,6 +109,15 @@ public class BubbleSummaryPreferenceControllerTest {
assertTrue(mController.isAvailable());
}
@Test
public void testIsAvailable_app_globalOff() {
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
mController.onResume(appRow, null, null, null);
Settings.Secure.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, 0);
assertTrue(mController.isAvailable());
}
@Test
public void testIsAvailable_defaultChannel() {
NotificationBackend.AppRow appRow = new NotificationBackend.AppRow();
@@ -141,6 +150,10 @@ public class BubbleSummaryPreferenceControllerTest {
assertEquals("On", mController.getSummary());
Settings.Secure.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, 0);
assertEquals("Off", mController.getSummary());
Settings.Secure.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, 1);
appRow.allowBubbles = false;
mController.onResume(appRow, null, null, null);