Merge "Remove config specific size for HeaderTileLayout" into qt-dev
diff --git a/packages/SystemUI/res/values-sw900dp-land/dimen.xml b/packages/SystemUI/res/values-sw900dp-land/dimen.xml
index ac7e6b8..1e0600e 100644
--- a/packages/SystemUI/res/values-sw900dp-land/dimen.xml
+++ b/packages/SystemUI/res/values-sw900dp-land/dimen.xml
@@ -19,8 +19,5 @@
     <!-- Standard notification width + gravity for tablet large screen device -->
     <dimen name="notification_panel_width">544dp</dimen>
 
-    <!-- Maximum width of quick quick settings panel. -->
-    <dimen name="qs_quick_layout_width">478dp</dimen>
-
 </resources>
 
diff --git a/packages/SystemUI/res/values-w550dp-land/dimens.xml b/packages/SystemUI/res/values-w550dp-land/dimens.xml
index 2c66454..017ca69 100644
--- a/packages/SystemUI/res/values-w550dp-land/dimens.xml
+++ b/packages/SystemUI/res/values-w550dp-land/dimens.xml
@@ -19,6 +19,4 @@
     <!-- Standard notification width + gravity -->
     <dimen name="notification_panel_width">544dp</dimen>
 
-    <!-- Maximum width of quick quick settings panel. -->
-    <dimen name="qs_quick_layout_width">478dp</dimen>
 </resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 5e84549..df6bc20 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -433,8 +433,6 @@
     <dimen name="qs_tile_margin_top">18dp</dimen>
     <dimen name="qs_tile_background_size">44dp</dimen>
     <dimen name="qs_quick_tile_size">48dp</dimen>
-    <!-- Maximum width of quick quick settings panel. Defaults to MATCH_PARENT-->
-    <dimen name="qs_quick_layout_width">-1px</dimen>
     <dimen name="qs_quick_tile_padding">12dp</dimen>
     <dimen name="qs_header_gear_translation">16dp</dimen>
     <dimen name="qs_header_tile_margin_horizontal">4dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
index 940edbd..73f6fc5 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickQSPanel.java
@@ -195,6 +195,10 @@
             super(context);
             setClipChildren(false);
             setClipToPadding(false);
+            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+                    LayoutParams.MATCH_PARENT);
+            lp.gravity = Gravity.CENTER_HORIZONTAL;
+            setLayoutParams(lp);
         }
 
         @Override
@@ -208,13 +212,6 @@
             updateResources();
         }
 
-        private void updateLayoutParams() {
-            int width = getResources().getDimensionPixelSize(R.dimen.qs_quick_layout_width);
-            LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(width, LayoutParams.MATCH_PARENT);
-            lp.gravity = Gravity.CENTER_HORIZONTAL;
-            setLayoutParams(lp);
-        }
-
         private LayoutParams generateTileLayoutParams() {
             LayoutParams lp = new LayoutParams(mCellWidth, mCellHeight);
             return lp;
@@ -246,8 +243,6 @@
             mCellWidth = mContext.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size);
             mCellHeight = mCellWidth;
 
-            updateLayoutParams();
-
             return false;
         }