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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user