summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fabian Kozynski <kozynski@google.com> 2019-08-09 11:17:46 -0700
committer android-build-merger <android-build-merger@google.com> 2019-08-09 11:17:46 -0700
commitab13543f7c974e13f4abed2f2b95fa8021b472a8 (patch)
tree4e181bf522b7be01533cd222cfe72366e9755d1d
parenteb9c76efab37750d3ec9dc731843ba1df7de5dcb (diff)
parentacc44b21a657459a062700eca953dacaf5941cef (diff)
Merge "Prevent QSPanel from remeasuring" into qt-qpr1-dev
am: acc44b21a6 Change-Id: I9275ec47c4f8dab6b749426468829e061c69d67e
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
index f0413cd6651b..be8a8fd26150 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
@@ -111,13 +111,25 @@ public class QSContainerImpl extends FrameLayout {
+ mQSPanel.getMeasuredHeight() + getPaddingBottom();
super.onMeasure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
-
// QSCustomizer will always be the height of the screen, but do this after
// other measuring to avoid changing the height of the QS.
mQSCustomizer.measure(widthMeasureSpec,
MeasureSpec.makeMeasureSpec(getDisplayHeight(), MeasureSpec.EXACTLY));
}
+
+ @Override
+ protected void measureChildWithMargins(View child, int parentWidthMeasureSpec, int widthUsed,
+ int parentHeightMeasureSpec, int heightUsed) {
+ // Do not measure QSPanel again when doing super.onMeasure.
+ // This prevents the pages in PagedTileLayout to be remeasured with a different (incorrect)
+ // size to the one used for determining the number of rows and then the number of pages.
+ if (child != mQSPanel) {
+ super.measureChildWithMargins(child, parentWidthMeasureSpec, widthUsed,
+ parentHeightMeasureSpec, heightUsed);
+ }
+ }
+
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);