diff options
| author | Beverly Tai <beverlyt@google.com> | 2020-04-30 02:37:04 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-30 02:37:04 +0000 |
| commit | 96fb6298e204e935e186142a49681cf8c35eff4c (patch) | |
| tree | 6bc9520d9bb12ec58f2d5a4046c0667eff443c27 | |
| parent | 07d8f2144419435c3e75077428bfd3384c3abcaa (diff) | |
| parent | 2c41b9ab98dd9ef582095a95d4e4b988e25115b4 (diff) | |
Merge "Fix mocked HighPriorityProvider calls in test" into rvc-dev am: c4c9c0d554 am: 1d93ad8f8b am: 2c41b9ab98
Change-Id: I304f63e8abafd95335523779704dd467eab5aab7
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.java index 4f481081855f..f54252effdd3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.java @@ -176,6 +176,7 @@ public class KeyguardCoordinatorTest extends SysuiTestCase { .setKey(mEntry.getKey()) .setImportance(IMPORTANCE_MIN) .build()); + when(mHighPriorityProvider.isHighPriority(mEntry)).thenReturn(false); // THEN filter out the entry assertTrue(mKeyguardFilter.shouldFilterOut(mEntry, 0)); @@ -197,7 +198,8 @@ public class KeyguardCoordinatorTest extends SysuiTestCase { .setImportance(IMPORTANCE_MIN) .build()); - // WHEN its parent has a summary that exceeds threshold to show on lockscreen + // WHEN its parent does exceed threshold tot show on the lockscreen + when(mHighPriorityProvider.isHighPriority(parent)).thenReturn(true); parent.setSummary(new NotificationEntryBuilder() .setImportance(IMPORTANCE_HIGH) .build()); @@ -205,7 +207,8 @@ public class KeyguardCoordinatorTest extends SysuiTestCase { // THEN don't filter out the entry assertFalse(mKeyguardFilter.shouldFilterOut(entryWithParent, 0)); - // WHEN its parent has a summary that doesn't exceed threshold to show on lockscreen + // WHEN its parent doesn't exceed threshold to show on lockscreen + when(mHighPriorityProvider.isHighPriority(parent)).thenReturn(false); parent.setSummary(new NotificationEntryBuilder() .setImportance(IMPORTANCE_MIN) .build()); @@ -248,5 +251,8 @@ public class KeyguardCoordinatorTest extends SysuiTestCase { .thenReturn(true); // notification doesn't have a summary + + // notification is high priority, so it shouldn't be filtered + when(mHighPriorityProvider.isHighPriority(mEntry)).thenReturn(true); } } |
