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

Commit c717d110 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix keyguard measurement bugs" into jb-mr1-lockscreen-dev

parents de974f6f eeb62550
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 {