summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java
index ae0e35b80dd2..4018eef6c1ed 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeFilteringTest.java
@@ -70,7 +70,8 @@ public class ZenModeFilteringTest extends UiServiceTestCase {
private NotificationRecord getNotificationRecord(NotificationChannel c) {
StatusBarNotification sbn = mock(StatusBarNotification.class);
- when(sbn.getNotification()).thenReturn(mock(Notification.class));
+ Notification notification = mock(Notification.class);
+ when(sbn.getNotification()).thenReturn(notification);
return new NotificationRecord(mContext, sbn, c);
}