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

Commit 74f9647a authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Keep the permissions dialog width consistent" into mnc-dev

parents 203f9b81 df01cfe5
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ public class ManualLayoutFrame extends FrameLayout {


    private int mDesiredHeight;
    private int mDesiredHeight;
    private int mHeight;
    private int mHeight;
    private int mWidth;


    private View mOffsetView;
    private View mOffsetView;


@@ -45,11 +46,16 @@ public class ManualLayoutFrame extends FrameLayout {


    @Override
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        if (mWidth != 0) {
            // Keep the width constant to avoid weirdness.
            widthMeasureSpec = MeasureSpec.makeMeasureSpec(mWidth, MeasureSpec.EXACTLY);
        }
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        mDesiredHeight = getMeasuredHeight();
        mDesiredHeight = getMeasuredHeight();
        if (mHeight == 0 && mDesiredHeight != 0) {
        if (mHeight == 0 && mDesiredHeight != 0) {
            // Record the first non-zero height, this will be the height henceforth.
            // Record the first non-zero width and height, this will be the height henceforth.
            mHeight = mDesiredHeight;
            mHeight = mDesiredHeight;
            mWidth = getMeasuredWidth();
        }
        }
        if (mHeight != 0) {
        if (mHeight != 0) {
            // Always report the same height
            // Always report the same height