From 9a8209c016f936f689d7525c29694fd4c59dba5c Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Tue, 5 Nov 2019 15:59:58 -0800 Subject: [PATCH] Remove icon vertical padding from small dialog height calculation The vertical padding is only used to create space between the icon and the other elements in "medium" dialog mode. Fixes: 143979408 Test: BiometricPromptDemo Change-Id: I2598cce2fb6a5ab58b94035e9f2190e4915af136 --- .../com/android/systemui/biometrics/AuthBiometricView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java index f5f1fad71b147..84a592d686279 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java @@ -298,7 +298,10 @@ public abstract class AuthBiometricView extends LinearLayout { .getDimension(R.dimen.biometric_dialog_icon_padding); mIconView.setY(getHeight() - mIconView.getHeight() - iconPadding); - final int newHeight = mIconView.getHeight() + 2 * (int) iconPadding; + // Subtract the vertical padding from the new height since it's only used to create + // extra space between the other elements, and not part of the actual icon. + final int newHeight = mIconView.getHeight() + 2 * (int) iconPadding + - mIconView.getPaddingTop() - mIconView.getPaddingBottom(); mPanelController.updateForContentDimensions(mMediumWidth, newHeight, 0 /* animateDurationMs */);