summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Powell <adamp@google.com> 2012-05-08 19:04:29 -0700
committer Adam Powell <adamp@google.com> 2012-05-08 19:04:29 -0700
commitb8e056a8e83c0fc8a60ed2d09025b82689f0fdf2 (patch)
tree7008ff41ea5ac25a6a0b692be375b2a0feff537a
parent137407087b069b3418e49b260f64e48e7a6a3144 (diff)
Fix measurement for dialog windows that do not have fixed width
Bug 6456773 Change-Id: I9d058f78c4b1c1759aaea2f215efee82a3489faa
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java2
1 files changed, 1 insertions, 1 deletions
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;
}
}
}