Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09d0502d authored by Bryce Lee's avatar Bryce Lee
Browse files

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
parent 2dff081f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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,
+7 −0
Original line number Diff line number Diff line
@@ -321,6 +321,13 @@ class AuthContainerViewTest : SysuiTestCase() {
        assertThat((layoutParams.flags and WindowManager.LayoutParams.FLAG_SECURE) != 0).isTrue()
    }

    @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, "")