From a88372cc66967a89d892363597d1cb21b8afa6ea Mon Sep 17 00:00:00 2001 From: Vincent Wang Date: Wed, 5 Oct 2022 08:12:00 +0000 Subject: [PATCH] Fix 3rd-party app Biometric Prompt has no response after rotation There were two AuthContainerView instances during rotating. The old one should be removed via WindowManger.removeView(). However it may be not removed so quickly, so the old one has the chance to receive onWindowFocusChanged(false) and notify BiometricService to cancel. So replace removeView() with removeViewInmediate(). Bug: b/250830611 Test: 1. Enroll at least 1 finger 2. Download WeBull from PlayStore 3. Register an account for WeBull 4. Enable biometric authentication in WeBull 5. Lauch WeBull & wait for BP showing 6. Rotate device & check the result Change-Id: I03548f0051254cd9df8d4733dfe24d4650b7ab39 --- .../src/com/android/systemui/biometrics/AuthContainerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java index 8f5cbb76222fc..f5dc8c26ff405 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthContainerView.java @@ -849,7 +849,7 @@ public class AuthContainerView extends LinearLayout } mContainerState = STATE_GONE; if (isAttachedToWindow()) { - mWindowManager.removeView(this); + mWindowManager.removeViewImmediate(this); } }