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

Commit 9de5d93f authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Android (Google) Code Review
Browse files

Merge "Lockscreen bouncer: Always set INPUT_FEATURE_SENSITIVE_FOR_TRACING" into main

parents bbaca83d 96da3cb0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -417,6 +417,12 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW
        } else {
            mLpChanged.flags &= ~LayoutParams.FLAG_SECURE;
        }

        if (state.bouncerShowing) {
            mLpChanged.inputFeatures |= LayoutParams.INPUT_FEATURE_SENSITIVE_FOR_TRACING;
        } else {
            mLpChanged.inputFeatures &= ~LayoutParams.INPUT_FEATURE_SENSITIVE_FOR_TRACING;
        }
    }

    protected boolean isDebuggable() {
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
import static android.view.WindowManager.LayoutParams.INPUT_FEATURE_SENSITIVE_FOR_TRACING;

import static com.google.common.truth.Truth.assertThat;

@@ -436,6 +437,10 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase {

        verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture());
        assertThat((mLayoutParameters.getValue().flags & FLAG_SECURE) != 0).isTrue();
        assertThat(
                (mLayoutParameters.getValue().inputFeatures & INPUT_FEATURE_SENSITIVE_FOR_TRACING)
                        != 0)
                .isTrue();
    }

    @Test
@@ -444,6 +449,10 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase {

        verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture());
        assertThat((mLayoutParameters.getValue().flags & FLAG_SECURE) == 0).isTrue();
        assertThat(
                (mLayoutParameters.getValue().inputFeatures & INPUT_FEATURE_SENSITIVE_FOR_TRACING)
                        == 0)
                .isTrue();
    }

    @Test