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

Commit f070ae0e authored by Lyn's avatar Lyn
Browse files

Remove debug boolean from StackScrollAlgorithm

The debug boolean is only checked from log and logView which are
only used locally for debugging. Having to flip debug to true is
an unnecessary extra step before writing debug logs. Remove this
boolean and prefix log and logView with "debug" for clarity.

Fixes: 330376903
Test: SystemUITests
Change-Id: Id8de2d444806fefd04c74b90d220fc29224bb6c2
parent 318f3b84
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -53,9 +53,7 @@ public class StackScrollAlgorithm {
    public static final float START_FRACTION = 0.5f;

    private static final String TAG = "StackScrollAlgorithm";
    private static final Boolean DEBUG = false;
    private static final SourceType STACK_SCROLL_ALGO = SourceType.from("StackScrollAlgorithm");

    private final ViewGroup mHostView;
    private float mPaddingBetweenElements;
    private float mGapHeight;
@@ -247,13 +245,11 @@ public class StackScrollAlgorithm {
                >= ambientState.getMaxHeadsUpTranslation();
    }

    public static void log(String s) {
        if (DEBUG) {
    public static void debugLog(String s) {
        android.util.Log.i(TAG, s);
    }
    }

    public static void logView(View view, String s) {
    public static void debugLogView(View view, String s) {
        String viewString = "";
        if (view instanceof ExpandableNotificationRow row) {
            if (row.getEntry() == null) {
@@ -274,7 +270,7 @@ public class StackScrollAlgorithm {
        } else {
            viewString = view.toString();
        }
        log(viewString + " " + s);
        debugLog(viewString + " " + s);
    }

    private void resetChildViewStates() {