summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Lee <syeonlee@google.com>2023-04-18 14:39:39 -0700
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-06-14 02:45:13 +0000
commitc4d5c2ccf2f9fb8913f88f50e8a3ceb44f4c04f4 (patch)
tree0667b6031c7a08082f735aeb508b7559e49eff49
parent263b1c1e91655c688dc0d1145c9f73da90547838 (diff)
downloadbase-c4d5c2ccf2f9fb8913f88f50e8a3ceb44f4c04f4.tar.gz
DO NOT MERGE Adding tests for updated EmptyShadeView logic
Tests for ag/22688474 Bug: 267060171 Test: tests run (cherry picked from commit 6a19675b120b497618259cbcdedde4ffb68389c8) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e6fe1a0ef1ebb9123f4ed943c8470a873efbaada) Merged-In: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73 Change-Id: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
index 45ae96c10345..ac60626ba768 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
@@ -295,6 +295,34 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
}
@Test
+ public void testUpdateEmptyShadeView_bouncerShowing_hideEmptyView() {
+ when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
+ mController.attach(mNotificationStackScrollLayout);
+
+ when(mCentralSurfaces.isBouncerShowing()).thenReturn(true);
+ setupShowEmptyShadeViewState(true);
+ reset(mNotificationStackScrollLayout);
+ mController.updateShowEmptyShadeView();
+ verify(mNotificationStackScrollLayout).updateEmptyShadeView(
+ /* visible= */ false,
+ /* areNotificationsHiddenInShade= */ false);
+ }
+
+ @Test
+ public void testUpdateEmptyShadeView_bouncerNotShowing_showEmptyView() {
+ when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
+ mController.attach(mNotificationStackScrollLayout);
+
+ when(mCentralSurfaces.isBouncerShowing()).thenReturn(false);
+ setupShowEmptyShadeViewState(true);
+ reset(mNotificationStackScrollLayout);
+ mController.updateShowEmptyShadeView();
+ verify(mNotificationStackScrollLayout).updateEmptyShadeView(
+ /* visible= */ true,
+ /* areNotificationsHiddenInShade= */ false);
+ }
+
+ @Test
public void testOnUserChange_verifySensitiveProfile() {
when(mNotificationLockscreenUserManager.isAnyProfilePublicMode()).thenReturn(true);