Skip to content

Commit b8e056a

Browse files
committed
Fix measurement for dialog windows that do not have fixed width
Bug 6456773 Change-Id: I9d058f78c4b1c1759aaea2f215efee82a3489faa
1 parent 1374070 commit b8e056a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,6 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
20982098
if (widthMode == AT_MOST) {
20992099
final TypedValue tvw = isPortrait ? mFixedWidthMinor : mFixedWidthMajor;
21002100
if (tvw != null && tvw.type != TypedValue.TYPE_NULL) {
2101-
fixedWidth = true;
21022101
final int w;
21032102
if (tvw.type == TypedValue.TYPE_DIMENSION) {
21042103
w = (int) tvw.getDimension(metrics);
@@ -2112,6 +2111,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
21122111
final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
21132112
widthMeasureSpec = MeasureSpec.makeMeasureSpec(
21142113
Math.min(w, widthSize), EXACTLY);
2114+
fixedWidth = true;
21152115
}
21162116
}
21172117
}

0 commit comments

Comments
 (0)