From fd12ca338fce62a33bb977924656b7b920e9da64 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Wed, 16 Feb 2022 13:37:36 -0500 Subject: [PATCH] Gate footer actions visibility by QS visibility With the change of the footer actions outside of QS panel, the visible logic needs to account for this. Test: log visibility of both footer actions and qs Bug: 219883571 Change-Id: I30a6c66be088384d325945d0d45f2b7028ceb35c --- .../SystemUI/src/com/android/systemui/qs/QSFragment.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java index 17f85eedbbc19..3c7933f0d218d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java @@ -381,14 +381,17 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca : View.INVISIBLE); mHeader.setExpanded((keyguardShowing && !mHeaderAnimating && !mShowCollapsedOnKeyguard) || (expanded && !mStackScrollerOverscrolling), mQuickQSPanelController); - boolean footerVisible = !mQsDisabled && (expanded || !keyguardShowing || mHeaderAnimating + boolean qsPanelVisible = !mQsDisabled && expandVisually; + boolean footerVisible = qsPanelVisible && (expanded || !keyguardShowing || mHeaderAnimating || mShowCollapsedOnKeyguard); mFooter.setVisibility(footerVisible ? View.VISIBLE : View.INVISIBLE); mQSFooterActionController.setVisible(footerVisible); mFooter.setExpanded((keyguardShowing && !mHeaderAnimating && !mShowCollapsedOnKeyguard) || (expanded && !mStackScrollerOverscrolling)); - mQSPanelController.setVisibility( - !mQsDisabled && expandVisually ? View.VISIBLE : View.INVISIBLE); + mQSPanelController.setVisibility(qsPanelVisible ? View.VISIBLE : View.INVISIBLE); + if (DEBUG) { + Log.d(TAG, "Footer: " + footerVisible + ", QS Panel: " + qsPanelVisible); + } } private boolean isKeyguardState() {