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

Commit 77e88f61 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Log when qs height is set to 0 but probably shouldn't

These logs will be deleted in ~2 months, they're temporary to help debug when b/219589379 happens again

Bug: 219589379
Bug: 269742565
Test: just adding logs
Change-Id: I8c6b384fe35ed4cde1e9d381edab96f09c36f203
parent e8b79073
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -194,7 +194,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;
@@ -693,6 +698,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);
@@ -714,6 +720,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()) {