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

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

Fix measurement for dialog windows that do not have fixed width

Bug 6456773

Change-Id: I9d058f78c4b1c1759aaea2f215efee82a3489faa
parent 13740708
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2098,7 +2098,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            if (widthMode == AT_MOST) {
                final TypedValue tvw = isPortrait ? mFixedWidthMinor : mFixedWidthMajor;
                if (tvw != null && tvw.type != TypedValue.TYPE_NULL) {
                    fixedWidth = true;
                    final int w;
                    if (tvw.type == TypedValue.TYPE_DIMENSION) {
                        w = (int) tvw.getDimension(metrics);
@@ -2112,6 +2111,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                        final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
                        widthMeasureSpec = MeasureSpec.makeMeasureSpec(
                                Math.min(w, widthSize), EXACTLY);
                        fixedWidth = true;
                    }
                }
            }