From 29f4d11428ee58d9583765293618a93d13f84957 Mon Sep 17 00:00:00 2001 From: Vincent Wang Date: Tue, 3 May 2022 13:07:17 +0800 Subject: [PATCH] DO NOT MERGE: Fix Budget bakers wallet app's fingerprint icon doesn't line up with sensor This issue is caused by side effect of CL Ib95d090729b1561a70a853b17a4e17cdcbb71fbd. Description height should be used when its visibility is GONE. BUG: 230665942 Test: Check budget bakers wallet app's fingerprint icon Change-Id: Id8d3e4a203ca012ab42ca8f984e8a09df1a77c85 --- .../systemui/biometrics/UdfpsDialogMeasureAdapter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java index 2f097924817e9..8de7213520695 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapter.java @@ -154,7 +154,9 @@ public class UdfpsDialogMeasureAdapter { //re-calculate the height of description View description = mView.findViewById(R.id.description); - totalHeight += measureDescription(description, displayHeight, width, totalHeight); + if (description != null && description.getVisibility() != View.GONE) { + totalHeight += measureDescription(description, displayHeight, width, totalHeight); + } return new AuthDialog.LayoutParams(width, totalHeight); }