summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kevin Chyn <kchyn@google.com> 2019-11-05 15:59:58 -0800
committer Kevin Chyn <kchyn@google.com> 2019-11-05 15:59:58 -0800
commit9a8209c016f936f689d7525c29694fd4c59dba5c (patch)
treef3ad885dddec0f7c9a83ff1e8db8eaf01b16fe2e
parente181b8d9a03a6d362f453791a4445ec34d363c02 (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java
index f5f1fad71b14..84a592d68627 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 */);