Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30172b1e authored by Michał Brzeziński's avatar Michał Brzeziński Committed by Automerger Merge Worker
Browse files

Merge "Making sure QS are not closed when split shade is open" into tm-qpr-dev...

Merge "Making sure QS are not closed when split shade is open" into tm-qpr-dev am: 99db8bd9 am: b1a6d3e6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21465169



Change-Id: I379e3421eb60abd3e5eb3a6de751a3f8ef960bc1
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b60649f9 b1a6d3e6
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -1778,7 +1778,7 @@ public final class NotificationPanelViewController implements Dumpable {
        if (animate && !isFullyCollapsed()) {
            animateCloseQs(true);
        } else {
            mQsController.closeQs();
            closeQsIfPossible();
        }
        mNotificationStackScrollLayoutController.setOverScrollAmount(0f, true /* onTop */, animate,
                !animate /* cancelAnimators */);
@@ -4030,10 +4030,18 @@ public final class NotificationPanelViewController implements Dumpable {
        return mExpandingFromHeadsUp;
    }

    /** TODO: remove need for this delegate (b/254870148) */
    public void closeQs() {
    /**
     * We don't always want to close QS when requested as shade might be in a different state
     * already e.g. when going from collapse to expand very quickly. In that case StatusBar
     * window might send signal to collapse QS but we might be already expanding and in split
     * shade QS are always expanded
     */
    private void closeQsIfPossible() {
        boolean openOrOpening = isShadeFullyOpen() || isExpanding();
        if (!(mSplitShadeEnabled && openOrOpening)) {
            mQsController.closeQs();
        }
    }

    /** TODO: remove need for this delegate (b/254870148) */
    public void setQsScrimEnabled(boolean qsScrimEnabled) {
+8 −1
Original line number Diff line number Diff line
@@ -663,8 +663,15 @@ public class QuickSettingsController {
        mDozing = dozing;
    }

    /** set QS state to closed */
    /**
     * This method closes QS but in split shade it should be used only in special cases: to make
     * sure QS closes when shade is closed as well. Otherwise it will result in QS disappearing
     * from split shade
     */
    public void closeQs() {
        if (mSplitShadeEnabled) {
            mShadeLog.d("Closing QS while in split shade");
        }
        cancelExpansionAnimation();
        setExpansionHeight(getMinExpansionHeight());
        // qsExpandImmediate is a safety latch in case we're calling closeQS while we're in the
+0 −2
Original line number Diff line number Diff line
@@ -270,8 +270,6 @@ public final class ShadeControllerImpl implements ShadeController {
        // Ensure the panel is fully collapsed (just in case; bug 6765842, 7260868)
        mNotificationPanelViewController.collapsePanel(false, false, 1.0f);

        mNotificationPanelViewController.closeQs();

        mExpandedVisible = false;
        notifyVisibilityChanged(false);