summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/ViewAncestor.java3
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/view/ViewAncestor.java b/core/java/android/view/ViewAncestor.java
index afbedafa6eac..40e99a1788c2 100644
--- a/core/java/android/view/ViewAncestor.java
+++ b/core/java/android/view/ViewAncestor.java
@@ -1000,8 +1000,7 @@ public final class ViewAncestor extends Handler implements ViewParent,
+ "x" + desiredWindowHeight + "...");
boolean goodMeasure = false;
- if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT
- || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
+ if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT) {
// On large screens, we don't want to allow dialogs to just
// stretch to fill the entire width of the screen to display
// one line of text. First try doing the layout at a smaller
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 75f466a35fdd..baa4ec398354 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -498,6 +498,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
return;
}
+ int width = WRAP_CONTENT;
if (st.decorView == null || st.refreshDecorView) {
if (st.decorView == null) {
// Initialize the panel decor, this will populate st.decorView
@@ -523,6 +524,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
// If the contents is fill parent for the width, set the
// corresponding background
backgroundResId = st.fullBackground;
+ width = MATCH_PARENT;
} else {
// Otherwise, set the normal panel background
backgroundResId = st.background;
@@ -546,7 +548,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
st.isHandled = false;
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
- WRAP_CONTENT, WRAP_CONTENT,
+ width, WRAP_CONTENT,
st.x, st.y, WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG,
WindowManager.LayoutParams.FLAG_DITHER
| WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM