diff options
| author | 2022-09-29 00:02:52 +0000 | |
|---|---|---|
| committer | 2022-09-28 17:11:27 -0700 | |
| commit | 09d0502d8c096b29a4bf3d7b8719bb6d4b71641d (patch) | |
| tree | 9dcd07076018b050f19b68b409c969fc34a995a5 | |
| parent | 2dff081f994a2e06cd089719095e55ecaf06850a (diff) | |
Allow AuthContainerView to appear over lock screen.
This change adds the window flag to enable the associated window to
show over the lockscreen.
Test: atest AuthContainerViewTest#testLayoutParams_hasShowWhenLockedFlag
Fixes: 249366032
Change-Id: Id04414b007037eab210f7b80107fefd3b8c4dbce
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java | 1 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java index 8f5cbb76222f..46c12b24751a 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java @@ -875,6 +875,7 @@ public class AuthContainerView extends LinearLayout static WindowManager.LayoutParams getLayoutParams(IBinder windowToken, CharSequence title) { final int windowFlags = WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED | WindowManager.LayoutParams.FLAG_SECURE + | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_DIM_BEHIND; final WindowManager.LayoutParams lp = new WindowManager.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt index 4a5b23c02e40..d52612b000bc 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt @@ -322,6 +322,13 @@ class AuthContainerViewTest : SysuiTestCase() { } @Test + fun testLayoutParams_hasShowWhenLockedFlag() { + val layoutParams = AuthContainerView.getLayoutParams(windowToken, "") + assertThat((layoutParams.flags and WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED) != 0) + .isTrue() + } + + @Test fun testLayoutParams_hasDimbehindWindowFlag() { val layoutParams = AuthContainerView.getLayoutParams(windowToken, "") val lpFlags = layoutParams.flags |