Loading services/core/java/com/android/server/notification/NotificationManagerService.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -4861,7 +4861,6 @@ public class NotificationManagerService extends SystemService { // calculate the final importance here // calculate the final importance here r.calculateImportance(); r.calculateImportance(); foundEnqueued = true; foundEnqueued = true; break; } } } } if (!foundEnqueued) { if (!foundEnqueued) { Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +21 −1 Original line number Original line Diff line number Diff line Loading @@ -178,7 +178,6 @@ import com.android.server.wm.WindowManagerInternal; import org.junit.After; import org.junit.After; import org.junit.Before; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor; Loading Loading @@ -3773,6 +3772,27 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { assertEquals(USER_SENTIMENT_NEGATIVE, r.getUserSentiment()); assertEquals(USER_SENTIMENT_NEGATIVE, r.getUserSentiment()); } } @Test public void testEnqueuedAdjustmentAppliesAdjustments_MultiNotifications() throws Exception { final NotificationRecord r1 = generateNotificationRecord(mTestNotificationChannel); final NotificationRecord r2 = generateNotificationRecord(mTestNotificationChannel); mService.addEnqueuedNotification(r1); mService.addEnqueuedNotification(r2); when(mAssistants.isSameUser(eq(null), anyInt())).thenReturn(true); Bundle signals = new Bundle(); signals.putInt(Adjustment.KEY_IMPORTANCE, IMPORTANCE_HIGH); Adjustment adjustment = new Adjustment( r1.getSbn().getPackageName(), r1.getKey(), signals, "", r1.getUser().getIdentifier()); mBinderService.applyEnqueuedAdjustmentFromAssistant(null, adjustment); assertEquals(IMPORTANCE_HIGH, r1.getImportance()); assertEquals(IMPORTANCE_HIGH, r2.getImportance()); } @Test @Test public void testRestore() throws Exception { public void testRestore() throws Exception { int systemChecks = mService.countSystemChecks; int systemChecks = mService.countSystemChecks; Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +0 −1 Original line number Original line Diff line number Diff line Loading @@ -4861,7 +4861,6 @@ public class NotificationManagerService extends SystemService { // calculate the final importance here // calculate the final importance here r.calculateImportance(); r.calculateImportance(); foundEnqueued = true; foundEnqueued = true; break; } } } } if (!foundEnqueued) { if (!foundEnqueued) { Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +21 −1 Original line number Original line Diff line number Diff line Loading @@ -178,7 +178,6 @@ import com.android.server.wm.WindowManagerInternal; import org.junit.After; import org.junit.After; import org.junit.Before; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor; Loading Loading @@ -3773,6 +3772,27 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { assertEquals(USER_SENTIMENT_NEGATIVE, r.getUserSentiment()); assertEquals(USER_SENTIMENT_NEGATIVE, r.getUserSentiment()); } } @Test public void testEnqueuedAdjustmentAppliesAdjustments_MultiNotifications() throws Exception { final NotificationRecord r1 = generateNotificationRecord(mTestNotificationChannel); final NotificationRecord r2 = generateNotificationRecord(mTestNotificationChannel); mService.addEnqueuedNotification(r1); mService.addEnqueuedNotification(r2); when(mAssistants.isSameUser(eq(null), anyInt())).thenReturn(true); Bundle signals = new Bundle(); signals.putInt(Adjustment.KEY_IMPORTANCE, IMPORTANCE_HIGH); Adjustment adjustment = new Adjustment( r1.getSbn().getPackageName(), r1.getKey(), signals, "", r1.getUser().getIdentifier()); mBinderService.applyEnqueuedAdjustmentFromAssistant(null, adjustment); assertEquals(IMPORTANCE_HIGH, r1.getImportance()); assertEquals(IMPORTANCE_HIGH, r2.getImportance()); } @Test @Test public void testRestore() throws Exception { public void testRestore() throws Exception { int systemChecks = mService.countSystemChecks; int systemChecks = mService.countSystemChecks; Loading