Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a8209c0 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

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
parent e181b8d9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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 */);