Fix UDFPS overlay being offset in landscape mode

Bug: 173562921
Test: show BiometricPrompt and rotate the device
Change-Id: Ie22f49a6d030a188a8b84b87b8e6079f4d25d1f7
This commit is contained in:
Ilya Matyukhin
2020-11-18 10:09:39 -08:00
parent 961f737505
commit 9d0c6ff753

View File

@@ -187,12 +187,13 @@ class UdfpsController implements DozeReceiver {
// TODO(b/152419866): Use the UDFPS window type when it becomes available.
WindowManager.LayoutParams.TYPE_BOOT_PROGRESS,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
PixelFormat.TRANSLUCENT);
mCoreLayoutParams.setTitle(TAG);
mCoreLayoutParams.setFitInsetsTypes(0);
mCoreLayoutParams.layoutInDisplayCutoutMode =
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
mView = (UdfpsView) inflater.inflate(R.layout.udfps_view, null, false);
mView.setSensorProperties(mSensorProps);