Fix dialogs to occupy more space.
diff --git a/core/java/com/android/internal/widget/WeightedLinearLayout.java b/core/java/com/android/internal/widget/WeightedLinearLayout.java
index b90204e..3d09f08 100644
--- a/core/java/com/android/internal/widget/WeightedLinearLayout.java
+++ b/core/java/com/android/internal/widget/WeightedLinearLayout.java
@@ -52,7 +52,8 @@
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
-        final boolean isPortrait = metrics.widthPixels < metrics.heightPixels;
+        final int screenWidth = metrics.widthPixels;
+        final boolean isPortrait = screenWidth < metrics.heightPixels;
 
         final int widthMode = getMode(widthMeasureSpec);
 
@@ -62,14 +63,13 @@
         int height = getMeasuredHeight();
         boolean measure = false;
 
-        final int widthSize = getSize(widthMeasureSpec);
         widthMeasureSpec = MeasureSpec.makeMeasureSpec(width, EXACTLY);
         heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, EXACTLY);
 
         final float widthWeight = isPortrait ? mMinorWeight : mMajorWeight;
         if (widthMode == AT_MOST && widthWeight > 0.0f) {
-            if (width < (widthSize * widthWeight)) {
-                widthMeasureSpec = MeasureSpec.makeMeasureSpec((int) (widthSize * widthWeight),
+            if (width < (screenWidth * widthWeight)) {
+                widthMeasureSpec = MeasureSpec.makeMeasureSpec((int) (screenWidth * widthWeight),
                         EXACTLY);
                 measure = true;
             }
diff --git a/core/res/res/layout/alert_dialog.xml b/core/res/res/layout/alert_dialog.xml
index 231e11c..7ae68f9 100644
--- a/core/res/res/layout/alert_dialog.xml
+++ b/core/res/res/layout/alert_dialog.xml
@@ -28,8 +28,8 @@
     android:paddingBottom="3dip"
     android:paddingLeft="3dip"
     android:paddingRight="1dip"
-    android:majorWeight="0.5"
-    android:minorWeight="0.8">
+    android:majorWeight="0.65"
+    android:minorWeight="0.9">
 
     <LinearLayout android:id="@+id/topPanel"
         android:layout_width="match_parent"