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

Commit 8c1bffb2 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Remove unused debug logs" into udc-dev

parents 0c856a0c fff7cef9
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.testing.shared.TestProtocol;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
import com.android.quickstep.SystemUiProxy;
@@ -1022,10 +1021,6 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
     *                unstashed.
     */
    public void updateStateForFlag(int flag, boolean enabled) {
        if (flag == FLAG_IN_APP && TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.TASKBAR_IN_APP_STATE, String.format(
                    "setting flag FLAG_IN_APP to: %b", enabled), new Exception());
        }
        if (enabled) {
            mState |= flag;
        } else {
@@ -1250,16 +1245,6 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
                    && animationType != TRANSITION_DEFAULT;

            if (mIsStashed != isStashed || transitionTypeChanged) {
                if (TestProtocol.sDebugTracing) {
                    Log.d(TestProtocol.TASKBAR_IN_APP_STATE, String.format(
                            "setState: mIsStashed=%b, isStashed=%b, "
                                    + "mAnimationType=%d, animationType=%d, duration=%d",
                            mIsStashed,
                            isStashed,
                            mLastStartedTransitionType,
                            animationType,
                            duration));
                }
                mIsStashed = isStashed;
                mLastStartedTransitionType = animationType;

+2 −8
Original line number Diff line number Diff line
package com.android.quickstep;

import static com.android.launcher3.testing.shared.TestProtocol.NPE_TRANSIENT_TASKBAR;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;

import android.app.Activity;
@@ -8,7 +7,6 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;

@@ -184,14 +182,10 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
            TouchInteractionService.TISBinder tisBinder, boolean enable) {
        TaskbarActivityContext context = tisBinder.getTaskbarManager().getCurrentActivityContext();
        if (context == null) {
            if (TestProtocol.sDebugTracing) {
                Log.d(NPE_TRANSIENT_TASKBAR, "enableBlockingTimeout: enable=" + enable,
                        new Exception());
            return;
        }
        } else {
        context.enableBlockingTimeoutDuringTests(enable);
    }
    }

    private void enableTransientTaskbar(boolean enable) {
        DisplayController.INSTANCE.get(mContext).enableTransientTaskbarForTests(enable);
+0 −22
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ import android.animation.TimeInterpolator;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
@@ -31,13 +30,10 @@ import android.view.ViewDebug;
import android.view.ViewPropertyAnimator;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;

import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragController.DragListener;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.testing.shared.TestProtocol;

/*
 * The top bar containing various drop targets: Delete/App Info/Uninstall.
@@ -299,9 +295,6 @@ public class DropTargetBar extends FrameLayout
    }

    public void animateToVisibility(boolean isVisible) {
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NO_DROP_TARGET, "8");
        }
        if (mVisible != isVisible) {
            mVisible = isVisible;

@@ -328,9 +321,6 @@ public class DropTargetBar extends FrameLayout
     */
    @Override
    public void onDragStart(DropTarget.DragObject dragObject, DragOptions options) {
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NO_DROP_TARGET, "7");
        }
        animateToVisibility(true);
    }

@@ -354,16 +344,4 @@ public class DropTargetBar extends FrameLayout
    public ButtonDropTarget[] getDropTargets() {
        return getVisibility() == View.VISIBLE ? mDropTargets : new ButtonDropTarget[0];
    }

    @Override
    protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
        super.onVisibilityChanged(changedView, visibility);
        if (TestProtocol.sDebugTracing) {
            if (visibility == VISIBLE) {
                Log.d(TestProtocol.NO_DROP_TARGET, "9");
            } else {
                Log.d(TestProtocol.NO_DROP_TARGET, "Hiding drop target", new Exception());
            }
        }
    }
}
+2 −23
Original line number Diff line number Diff line
@@ -1836,9 +1836,6 @@ public class Launcher extends StatefulActivity<LauncherState>
    }

    private void setWorkspaceLoading(boolean value) {
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.FLAKY_BINDING, "running: setWorkspaceLoading=" + value);
        }
        mWorkspaceLoading = value;
    }

@@ -2211,10 +2208,6 @@ public class Launcher extends StatefulActivity<LauncherState>

        IntSet result = new IntSet();
        if (visibleIds.isEmpty()) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (1): "
                        + result);
            }
            return result;
        }
        for (int id : orderedScreenIds.toArray()) {
@@ -2235,10 +2228,6 @@ public class Launcher extends StatefulActivity<LauncherState>
            // pages being hidden in single panel.
            result.add(pairId);
        }
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NULL_INT_SET, "getPagesToBindSynchronously (2): "
                    + result);
        }
        return result;
    }

@@ -2260,14 +2249,11 @@ public class Launcher extends StatefulActivity<LauncherState>

    /**
     * Refreshes the shortcuts shown on the workspace.
     *
     * <p>
     * Implementation of the method from LauncherModel.Callbacks.
     */
    public void startBinding() {
        Object traceToken = TraceHelper.INSTANCE.beginSection("startBinding");
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.FLAKY_BINDING, "running: startBinding");
        }
        // Floating panels (except the full widget sheet) are associated with individual icons. If
        // we are starting a fresh bind, close all such panels as all the icons are about
        // to go away.
@@ -2452,10 +2438,6 @@ public class Launcher extends StatefulActivity<LauncherState>
                        throw (new RuntimeException(desc));
                    } else {
                        getModelWriter().deleteItemFromDatabase(item, desc);
                        if (TestProtocol.sDebugTracing) {
                            Log.d(TestProtocol.MISSING_PROMISE_ICON,
                                    TAG + "bindItems failed for item=" + item);
                        }
                        continue;
                    }
                }
@@ -2741,14 +2723,11 @@ public class Launcher extends StatefulActivity<LauncherState>

    /**
     * Callback saying that there aren't any more items to bind.
     *
     * <p>
     * Implementation of the method from LauncherModel.Callbacks.
     */
    public void finishBindingItems(IntSet pagesBoundFirst) {
        Object traceToken = TraceHelper.INSTANCE.beginSection("finishBindingItems");
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.FLAKY_BINDING, "running: finishBindingItems");
        }
        mWorkspace.restoreInstanceStateForRemainingPages();

        setWorkspaceLoading(false);
+0 −6
Original line number Diff line number Diff line
@@ -383,12 +383,6 @@ public class LauncherModel extends LauncherApps.Callback implements InstallSessi
    public void addCallbacks(@NonNull final Callbacks callbacks) {
        Preconditions.assertUIThread();
        synchronized (mCallbacksList) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.NULL_INT_SET, "addCallbacks pointer: "
                        + callbacks
                        + ", name: "
                        + callbacks.getClass().getName(), new Exception());
            }
            mCallbacksList.add(callbacks);
        }
    }
Loading