From b8e056a8e83c0fc8a60ed2d09025b82689f0fdf2 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Tue, 8 May 2012 19:04:29 -0700 Subject: Fix measurement for dialog windows that do not have fixed width Bug 6456773 Change-Id: I9d058f78c4b1c1759aaea2f215efee82a3489faa --- policy/src/com/android/internal/policy/impl/PhoneWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 4b914227c8f3..cc7050a76f50 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -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; } } } -- cgit v1.2.3-59-g8ed1b