Merge "Cache display height in QSContainerImpl." into pi-dev
am: 26f00b9d87
Change-Id: Ic48b82aca4c26d8471a80c9e495b4e404b8dba15
This commit is contained in:
@@ -88,6 +88,7 @@ public class QSContainerImpl extends FrameLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateResources();
|
updateResources();
|
||||||
|
mSizePoint.set(0, 0); // Will be retrieved on next measure pass.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -123,9 +124,8 @@ public class QSContainerImpl extends FrameLayout {
|
|||||||
|
|
||||||
// QSCustomizer will always be the height of the screen, but do this after
|
// QSCustomizer will always be the height of the screen, but do this after
|
||||||
// other measuring to avoid changing the height of the QS.
|
// other measuring to avoid changing the height of the QS.
|
||||||
getDisplay().getRealSize(mSizePoint);
|
|
||||||
mQSCustomizer.measure(widthMeasureSpec,
|
mQSCustomizer.measure(widthMeasureSpec,
|
||||||
MeasureSpec.makeMeasureSpec(mSizePoint.y, MeasureSpec.EXACTLY));
|
MeasureSpec.makeMeasureSpec(getDisplayHeight(), MeasureSpec.EXACTLY));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -197,4 +197,11 @@ public class QSContainerImpl extends FrameLayout {
|
|||||||
lp.rightMargin = mSideMargins;
|
lp.rightMargin = mSideMargins;
|
||||||
lp.leftMargin = mSideMargins;
|
lp.leftMargin = mSideMargins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getDisplayHeight() {
|
||||||
|
if (mSizePoint.y == 0) {
|
||||||
|
getDisplay().getRealSize(mSizePoint);
|
||||||
|
}
|
||||||
|
return mSizePoint.y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user