diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-21 01:44:23 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-10-21 01:44:23 +0000 |
commit | 984449b8f1c9c0862d076489cc7d17b669abbc3b (patch) | |
tree | 92071400b0984620c217b81e5fdc08488777f3f2 | |
parent | a256d2fcc73f1dcc9d1e94edde28ec3b4e2ed220 (diff) | |
parent | cd71228303c13c06e3e566b13e20878e7ade71cc (diff) | |
download | base-984449b8f1c9c0862d076489cc7d17b669abbc3b.tar.gz |
Merge cherrypicks of [20226843] into sc-v2-platform-release.
Change-Id: Idee00d747e2e1ad36bb1e324cb33b441fa11fd00
-rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java index 88d951fd6a8b..a24490418e80 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerImplTest.java @@ -260,4 +260,20 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); assertThat((mLayoutParameters.getValue().flags & FLAG_SECURE) == 0).isTrue(); } + + @Test + public void setKeyguardShowing_enablesSecureFlag() { + mNotificationShadeWindowController.setBouncerShowing(true); + + verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); + assertThat((mLayoutParameters.getValue().flags & FLAG_SECURE) != 0).isTrue(); + } + + @Test + public void setKeyguardNotShowing_disablesSecureFlag() { + mNotificationShadeWindowController.setBouncerShowing(false); + + verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); + assertThat((mLayoutParameters.getValue().flags & FLAG_SECURE) == 0).isTrue(); + } } |