From 5f283da81cc8a0a0d15d33b5790e09693ea1aa6f Mon Sep 17 00:00:00 2001 From: Chandru S Date: Mon, 5 Jun 2023 16:34:15 -0700 Subject: [PATCH] Update local value of sensorBounds whenever it changes Fixes: 283404990 Test: verified manually, 1. enroll UDFPS, enable auto-rotate. 2. Lock the device 3. Trigger secure camera 4. Open locked gallery to trigger UDFPS overlay in portrait orientation 5. Rotate phone to landscape orientation 6. Camera app rotates in the background 7. UDFPS icon should be visible after the rotation and show up in correct position Change-Id: Iae7f419622dd1c06937b5420255a935eef555891 --- .../systemui/biometrics/UdfpsKeyguardViewLegacy.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java index a2840fc1dc8c8..056d692a36414 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java @@ -102,6 +102,13 @@ public class UdfpsKeyguardViewLegacy extends UdfpsAnimationView { return mFingerprintDrawable; } + @Override + void onSensorRectUpdated(RectF bounds) { + super.onSensorRectUpdated(bounds); + bounds.round(this.mSensorBounds); + postInvalidate(); + } + @Override void onDisplayConfiguring() { }