Fix hotseat width to span a number of columns
Fix: 227344807
Fix: 231283023
Test: manual
Change-Id: Iad0f38c2323be6d9752a8e509fc7e1164edbcf4e
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index a9db5ce..76106fc 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -173,17 +173,9 @@
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- int width;
- if (mActivity.getDeviceProfile().isQsbInline) {
- width = mActivity.getDeviceProfile().qsbWidth;
- } else {
- MarginLayoutParams qsbParams = (MarginLayoutParams) mQsb.getLayoutParams();
- width = getShortcutsAndWidgets().getMeasuredWidth()
- - qsbParams.getMarginStart()
- - qsbParams.getMarginEnd();
- }
+ int qsbWidth = mActivity.getDeviceProfile().qsbWidth;
- mQsb.measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
+ mQsb.measure(MeasureSpec.makeMeasureSpec(qsbWidth, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(mQsbHeight, MeasureSpec.EXACTLY));
}