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

Commit 3a098541 authored by Michał Brzeziński's avatar Michał Brzeziński Committed by Android (Google) Code Review
Browse files

Merge "Log when qs height is set to 0 but probably shouldn't" into tm-qpr-dev

parents 6e0e72c8 77e88f61
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -193,7 +193,12 @@ public class QuickSettingsController {
    private boolean mAnimatingHiddenFromCollapsed;
    private boolean mVisible;
    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;
    /** QS height when QS expansion fraction is 1 so qs is fully expanded */
    private int mMaxExpansionHeight;
    /** Expansion fraction of the notification shade */
    private float mShadeExpandedFraction;
@@ -697,6 +702,7 @@ public class QuickSettingsController {

    /** update Qs height state */
    public void setExpansionHeight(float height) {
        checkCorrectSplitShadeState(height);
        int maxHeight = getMaxExpansionHeight();
        height = Math.min(Math.max(
                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() {
        if (isSizeChangeAnimationRunning() && isQsFragmentCreated()) {