diff options
| author | Kevin Chyn <kchyn@google.com> | 2020-06-08 17:48:17 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-06-08 17:48:17 +0000 |
| commit | 06174db579ff1e30825568b894e6172bc4b044fa (patch) | |
| tree | f3fb711e4d21a0e2e04eab558616a6407ef53b21 | |
| parent | 5538b27dc916c3f14c522a0e174148ed42e154ef (diff) | |
| parent | 09ca6e50d099d1b6aa5aa57023a8c41cf792b222 (diff) | |
Merge "Exclude WindowInsets.Type.ime() from credential UI" into rvc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java | 2 | ||||
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.java | 9 |
2 files changed, 11 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 1dd6409b8582..dbe5a77965be 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java @@ -34,6 +34,7 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.WindowInsets; import android.view.WindowManager; import android.view.animation.Interpolator; import android.widget.FrameLayout; @@ -632,6 +633,7 @@ public class AuthContainerView extends LinearLayout windowFlags, PixelFormat.TRANSLUCENT); lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; + lp.setFitInsetsTypes(lp.getFitInsetsTypes() & ~WindowInsets.Type.ime()); lp.setTitle("BiometricPrompt"); lp.token = windowToken; return lp; diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.java index 74d0610ee0d6..29d7a524dd8b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.java @@ -45,6 +45,7 @@ import android.testing.TestableLooper.RunWithLooper; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.WindowInsets; import android.view.WindowManager; import android.widget.FrameLayout; import android.widget.ImageView; @@ -210,6 +211,14 @@ public class AuthContainerViewTest extends SysuiTestCase { assertTrue((layoutParams.flags & WindowManager.LayoutParams.FLAG_SECURE) != 0); } + @Test + public void testLayoutParams_excludesImeInsets() { + final IBinder windowToken = mock(IBinder.class); + final WindowManager.LayoutParams layoutParams = + AuthContainerView.getLayoutParams(windowToken); + assertTrue((layoutParams.getFitInsetsTypes() & WindowInsets.Type.ime()) == 0); + } + private void initializeContainer(int authenticators) { AuthContainerView.Config config = new AuthContainerView.Config(); config.mContext = mContext; |
