Loading src/com/android/settings/notification/app/BubblePreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ public class BubblePreferenceController extends NotificationPreferenceController if (isDefaultChannel()) { return true; } else { return mAppRow != null; return mAppRow != null && mAppRow.bubblePreference != BUBBLE_PREFERENCE_NONE; } } return true; Loading tests/robotests/src/com/android/settings/notification/app/BubblePreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class BubblePreferenceControllerTest { } @Test public void isAvailable_channel_yesIfAppOff() { public void isAvailable_channel_notIfAppOff() { Settings.Global.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, SYSTEM_WIDE_ON); NotificationBackend.AppRow appRow = new NotificationBackend.AppRow(); appRow.bubblePreference = BUBBLE_PREFERENCE_NONE; Loading @@ -145,7 +145,7 @@ public class BubblePreferenceControllerTest { when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); mController.onResume(appRow, channel, null, null, null, null); assertTrue(mController.isAvailable()); assertFalse(mController.isAvailable()); } @Test Loading Loading
src/com/android/settings/notification/app/BubblePreferenceController.java +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ public class BubblePreferenceController extends NotificationPreferenceController if (isDefaultChannel()) { return true; } else { return mAppRow != null; return mAppRow != null && mAppRow.bubblePreference != BUBBLE_PREFERENCE_NONE; } } return true; Loading
tests/robotests/src/com/android/settings/notification/app/BubblePreferenceControllerTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class BubblePreferenceControllerTest { } @Test public void isAvailable_channel_yesIfAppOff() { public void isAvailable_channel_notIfAppOff() { Settings.Global.putInt(mContext.getContentResolver(), NOTIFICATION_BUBBLES, SYSTEM_WIDE_ON); NotificationBackend.AppRow appRow = new NotificationBackend.AppRow(); appRow.bubblePreference = BUBBLE_PREFERENCE_NONE; Loading @@ -145,7 +145,7 @@ public class BubblePreferenceControllerTest { when(channel.getImportance()).thenReturn(IMPORTANCE_HIGH); mController.onResume(appRow, channel, null, null, null, null); assertTrue(mController.isAvailable()); assertFalse(mController.isAvailable()); } @Test Loading