Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java +2 −2 Original line number Diff line number Diff line Loading @@ -313,7 +313,7 @@ public class NotificationGuts extends LinearLayout { } else if (mHighImportanceButton.isChecked()) { return NotificationManager.IMPORTANCE_HIGH; } else { return NotificationManager.IMPORTANCE_NONE; return NotificationManager.IMPORTANCE_UNSPECIFIED; } } Loading @@ -333,10 +333,10 @@ public class NotificationGuts extends LinearLayout { // Set to current importance setting switch (importance) { case NotificationManager.IMPORTANCE_UNSPECIFIED: case NotificationManager.IMPORTANCE_NONE: break; case NotificationManager.IMPORTANCE_MIN: case NotificationManager.IMPORTANCE_UNSPECIFIED: mMinImportanceButton.setChecked(true); break; case NotificationManager.IMPORTANCE_LOW: Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,18 @@ public class NotificationGutsTest { anyString(), anyInt(), any()); } @Test @UiThreadTest public void testCloseControls_DoesNotUpdateNotificationChannelIfUnspecified() throws Exception { mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_UNSPECIFIED); mNotificationGuts.bindNotification(mMockPackageManager, mMockINotificationManager, mMockStatusBarNotification, null, null, null); mNotificationGuts.closeControls(-1, -1, true); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); } @Test @UiThreadTest public void testCloseControls_CallsUpdateNotificationChannelIfChanged() throws Exception { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java +2 −2 Original line number Diff line number Diff line Loading @@ -313,7 +313,7 @@ public class NotificationGuts extends LinearLayout { } else if (mHighImportanceButton.isChecked()) { return NotificationManager.IMPORTANCE_HIGH; } else { return NotificationManager.IMPORTANCE_NONE; return NotificationManager.IMPORTANCE_UNSPECIFIED; } } Loading @@ -333,10 +333,10 @@ public class NotificationGuts extends LinearLayout { // Set to current importance setting switch (importance) { case NotificationManager.IMPORTANCE_UNSPECIFIED: case NotificationManager.IMPORTANCE_NONE: break; case NotificationManager.IMPORTANCE_MIN: case NotificationManager.IMPORTANCE_UNSPECIFIED: mMinImportanceButton.setChecked(true); break; case NotificationManager.IMPORTANCE_LOW: Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -208,6 +208,18 @@ public class NotificationGutsTest { anyString(), anyInt(), any()); } @Test @UiThreadTest public void testCloseControls_DoesNotUpdateNotificationChannelIfUnspecified() throws Exception { mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_UNSPECIFIED); mNotificationGuts.bindNotification(mMockPackageManager, mMockINotificationManager, mMockStatusBarNotification, null, null, null); mNotificationGuts.closeControls(-1, -1, true); verify(mMockINotificationManager, never()).updateNotificationChannelForPackage( anyString(), anyInt(), any()); } @Test @UiThreadTest public void testCloseControls_CallsUpdateNotificationChannelIfChanged() throws Exception { Loading