diff options
| author | 2020-06-12 19:22:01 -0400 | |
|---|---|---|
| committer | 2020-06-15 11:55:40 -0400 | |
| commit | 59a62fc264f249167607ca2475f35ed019b0fa25 (patch) | |
| tree | 7147c54ceb3452243b21ef11d3015398a5023835 | |
| parent | c744ad246ef8f8dd0dd9aa268bf99573da6c8ea8 (diff) | |
Properly collapse QQS header when QQS is disabled
In landscape, we need to fully hide the QQS when the user starts to do
an inline reply, otherwise nothing fits on the screen. This CL adds back
in some of the old Q behavior wherein we set the height of the header to
essentially zero when the QQS has been disabled (in this case, by the
inline reply logic).
Fixes: 157150870
Test: manual
Change-Id: Ib14603eb2e67bf4bf3b624b677a74754d4e54f41
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java index 311eda2f4ad8..b5afe771926c 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java @@ -15,6 +15,7 @@ package com.android.systemui.qs; import static android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS; +import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT; @@ -41,6 +42,7 @@ import android.util.Pair; import android.view.ContextThemeWrapper; import android.view.DisplayCutout; import android.view.View; +import android.view.ViewGroup; import android.view.WindowInsets; import android.widget.ImageView; import android.widget.RelativeLayout; @@ -347,6 +349,15 @@ public class QuickStatusBarHeader extends RelativeLayout implements com.android.internal.R.dimen.quick_qs_offset_height); mSystemIconsView.setLayoutParams(mSystemIconsView.getLayoutParams()); + ViewGroup.LayoutParams lp = getLayoutParams(); + if (mQsDisabled) { + lp.height = resources.getDimensionPixelSize( + com.android.internal.R.dimen.quick_qs_offset_height); + } else { + lp.height = WRAP_CONTENT; + } + setLayoutParams(lp); + updateStatusIconAlphaAnimator(); updateHeaderTextContainerAlphaAnimator(); } |