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

Commit 18c4a8cb authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Log when qs height is set to 0 but probably shouldn't" into...

Merge "Merge "Log when qs height is set to 0 but probably shouldn't" into tm-qpr-dev am: 3a098541 am: 594e36ae am: 586848f3"
parents 0002ccd8 b7ee7bfb
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -193,7 +193,12 @@ public class QuickSettingsController {
    private boolean mAnimatingHiddenFromCollapsed;
    private boolean mAnimatingHiddenFromCollapsed;
    private boolean mVisible;
    private boolean mVisible;
    private float mExpansionHeight;
    private float mExpansionHeight;
    /**
     * QS height when QS expansion fraction is 0 so when QS is collapsed. That state doesn't really
     * exist for split shade so currently this value is always 0 then.
     */
    private int mMinExpansionHeight;
    private int mMinExpansionHeight;
    /** QS height when QS expansion fraction is 1 so qs is fully expanded */
    private int mMaxExpansionHeight;
    private int mMaxExpansionHeight;
    /** Expansion fraction of the notification shade */
    /** Expansion fraction of the notification shade */
    private float mShadeExpandedFraction;
    private float mShadeExpandedFraction;
@@ -697,6 +702,7 @@ public class QuickSettingsController {


    /** update Qs height state */
    /** update Qs height state */
    public void setExpansionHeight(float height) {
    public void setExpansionHeight(float height) {
        checkCorrectSplitShadeState(height);
        int maxHeight = getMaxExpansionHeight();
        int maxHeight = getMaxExpansionHeight();
        height = Math.min(Math.max(
        height = Math.min(Math.max(
                height, getMinExpansionHeight()), maxHeight);
                height, getMinExpansionHeight()), maxHeight);
@@ -718,6 +724,14 @@ public class QuickSettingsController {
        }
        }
    }
    }


    /** TODO(b/269742565) Remove this logging */
    private void checkCorrectSplitShadeState(float height) {
        if (mSplitShadeEnabled && height == 0
                && mPanelViewControllerLazy.get().isShadeFullyOpen()) {
            Log.wtfStack(TAG, "qsExpansion set to 0 while split shade is expanding or open");
        }
    }

    /** */
    /** */
    public void setHeightOverrideToDesiredHeight() {
    public void setHeightOverrideToDesiredHeight() {
        if (isSizeChangeAnimationRunning() && isQsFragmentCreated()) {
        if (isSizeChangeAnimationRunning() && isQsFragmentCreated()) {