From a690ccffd46c2e123f680e54be9a3350e601d5e0 Mon Sep 17 00:00:00 2001 From: Amin Shaikh Date: Tue, 20 Feb 2018 10:22:40 -0500 Subject: [PATCH] Allow QS to be any height. Do not restrict the height of QS so that the security footer can be fully displayed. Previously with scrolling support, it was necessary to restrict the height of the QS panel so that it did not run off screen. Bug: 73055149 Bug: 73349811 Test: visual Change-Id: I341930ad4816391923d50b34b5e598d04fc5281a --- .../com/android/systemui/qs/QSContainerImpl.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java index 6ccb81772db9c..7da109de69512 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java @@ -76,22 +76,11 @@ public class QSContainerImpl extends FrameLayout { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - getDisplay().getRealSize(mSizePoint); - // Since we control our own bottom, be whatever size we want. // Otherwise the QSPanel ends up with 0 height when the window is only the // size of the status bar. - Configuration config = getResources().getConfiguration(); - boolean navBelow = config.smallestScreenWidthDp >= 600 - || config.orientation != Configuration.ORIENTATION_LANDSCAPE; - MarginLayoutParams params = (MarginLayoutParams) mQSPanel.getLayoutParams(); - int maxQs = mSizePoint.y - params.topMargin - params.bottomMargin - getPaddingBottom() - - getResources().getDimensionPixelSize(R.dimen.qs_notif_collapsed_space); - if (navBelow) { - maxQs -= getResources().getDimensionPixelSize(R.dimen.navigation_bar_height); - } - mQSPanel.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(maxQs, MeasureSpec.AT_MOST)); - + mQSPanel.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec( + MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.UNSPECIFIED)); int width = mQSPanel.getMeasuredWidth(); LayoutParams layoutParams = (LayoutParams) mQSPanel.getLayoutParams(); int height = layoutParams.topMargin + layoutParams.bottomMargin @@ -101,6 +90,7 @@ public class QSContainerImpl extends FrameLayout { // QSCustomizer will always be the height of the screen, but do this after // other measuring to avoid changing the height of the QS. + getDisplay().getRealSize(mSizePoint); mQSCustomizer.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(mSizePoint.y, MeasureSpec.EXACTLY)); }