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

Commit eeb62550 authored by Adam Powell's avatar Adam Powell
Browse files

Fix keyguard measurement bugs

Bug 7493748
Bug 7493764

Change-Id: I2182ec4347eefc80198e675684bc5d195f947763
parent 0fc1b5ec
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -219,10 +219,10 @@ public class KeyguardSecurityViewFlipper extends ViewFlipper implements Keyguard

            child.measure(childWidthSpec, childHeightSpec);

            width = Math.max(width, Math.min(child.getMeasuredWidth(), widthSize));
            height = Math.max(height, Math.min(child.getMeasuredHeight(), heightSize));
            width = Math.max(width, Math.min(child.getMeasuredWidth(), widthSize - wPadding));
            height = Math.max(height, Math.min(child.getMeasuredHeight(), heightSize - hPadding));
        }
        setMeasuredDimension(width, height);
        setMeasuredDimension(width + wPadding, height + hPadding);
    }

    private int makeChildMeasureSpec(int maxSize, int childDimen) {
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ public class MultiPaneChallengeLayout extends ViewGroup implements ChallengeLayo
            adjustedWidth = (int) (paddedWidth * lp.centerWithinArea + 0.5f);
            adjustedHeight = height;
        } else if (fixedLayoutVertical) {
            final int paddedHeight = height - padding.top - padding.bottom;
            final int paddedHeight = height - getPaddingTop() - getPaddingBottom();
            adjustedWidth = width;
            adjustedHeight = (int) (paddedHeight * lp.centerWithinArea + 0.5f);
        } else {