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

Commit 35226124 authored by Winson Chung's avatar Winson Chung
Browse files

Removing some unused logs

Fixes: 185820525
Fixes: 177316094
Fixes: 158017601
Fixes: 180915942
Change-Id: I8ce5bde08e1728d3209762c5f061245386408825
parent bcf85de8
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -78,18 +78,9 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
            return true;
        }
        if (AbstractFloatingView.getTopOpenView(mLauncher) != null) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
                        "Didn't intercept touch due to top view: "
                                + AbstractFloatingView.getTopOpenView(mLauncher));
            }
            return false;
        }
        if ((ev.getEdgeFlags() & EDGE_NAV_BAR) == 0) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
                        "Didn't intercept touch because event wasn't from nav bar");
            }
            return false;
        }
        if (!mIsTransposed && mLauncher.isInState(OVERVIEW)) {
@@ -101,10 +92,6 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
    @Override
    public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
        boolean intercept = super.onControllerInterceptTouchEvent(ev);
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW,
                    "2 button touch controller intercept touch? " + intercept);
        }
        return intercept;
    }

@@ -123,10 +110,6 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
    @Override
    protected void onReinitToState(LauncherState newToState) {
        super.onReinitToState(newToState);

        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "onReinitToState: " + newToState);
        }
    }

    @Override
@@ -175,9 +158,6 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont
    @Override
    protected void onSwipeInteractionCompleted(LauncherState targetState) {
        super.onSwipeInteractionCompleted(targetState);
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "Reached state: " + targetState);
        }
        if (!mIsTransposed) {
            mContinuousTouchCount++;
        }
+5 −26
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import android.view.Surface;

import com.android.launcher3.R;
import com.android.launcher3.ResourceUtils;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.DisplayController.Info;

import java.io.PrintWriter;
@@ -92,7 +91,7 @@ class OrientationTouchTransformer {
    };

    private static final String TAG = "OrientationTouchTransformer";
    private static final boolean DEBUG = true;
    private static final boolean DEBUG = false;

    private static final int QUICKSTEP_ROTATION_UNINITIALIZED = -1;

@@ -161,11 +160,9 @@ class OrientationTouchTransformer {
        resetSwipeRegions(info);
    }

    void setNavigationMode(SysUINavigationMode.Mode newMode, Info info,
            Resources newRes) {
    void setNavigationMode(SysUINavigationMode.Mode newMode, Info info, Resources newRes) {
        if (DEBUG) {
            Log.d(TestProtocol.NO_SWIPE_TO_HOME, "setNavigationMode new: " + newMode
                    + " oldMode: " + mMode + " " + this);
            Log.d(TAG, "setNavigationMode new: " + newMode + " oldMode: " + mMode + " " + this);
        }
        if (mMode == newMode) {
            return;
@@ -258,18 +255,10 @@ class OrientationTouchTransformer {

        mCurrentDisplay = new CurrentDisplay(region.currentSize, region.rotation);
        OrientationRectF regionToKeep = mSwipeTouchRegions.get(mCurrentDisplay);
        if (DEBUG) {
            Log.d(TestProtocol.NO_SWIPE_TO_HOME, "cached region: " + regionToKeep
                    + " mCurrentDisplay: " + mCurrentDisplay + " " + this);
        }
        if (regionToKeep == null) {
            regionToKeep = createRegionForDisplay(region);
        }
        mSwipeTouchRegions.clear();
        if (DEBUG) {
            Log.d(TestProtocol.NO_SWIPE_TO_HOME, "adding region: " + regionToKeep
                    + " mCurrentDisplay: " + mCurrentDisplay + " " + this);
        }
        mSwipeTouchRegions.put(mCurrentDisplay, regionToKeep);
        updateAssistantRegions(regionToKeep);
    }
@@ -301,10 +290,6 @@ class OrientationTouchTransformer {
            mAssistantLeftRegion.setEmpty();
            mAssistantRightRegion.setEmpty();
            int navbarSize = getNavbarSize(ResourceUtils.NAVBAR_LANDSCAPE_LEFT_RIGHT_SIZE);
            if (DEBUG) {
                Log.d(TestProtocol.NO_SWIPE_TO_HOME, "else case mode: " + mMode
                        + " getNavbarSize: " + navbarSize + " rotation: " + rotation + " " + this);
            }
            switch (rotation) {
                case Surface.ROTATION_90:
                    orientationRectF.left = orientationRectF.right
@@ -355,8 +340,8 @@ class OrientationTouchTransformer {
    }

    boolean touchInValidSwipeRegions(float x, float y) {
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NO_SWIPE_TO_HOME, "touchInValidSwipeRegions " + x + "," + y + " in "
        if (DEBUG) {
            Log.d(TAG, "touchInValidSwipeRegions " + x + "," + y + " in "
                    + mLastRectTouched + " this: " + this);
        }
        if (mLastRectTouched != null) {
@@ -399,16 +384,10 @@ class OrientationTouchTransformer {
                }

                for (OrientationRectF rect : mSwipeTouchRegions.values()) {
                    if (TestProtocol.sDebugTracing) {
                        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "transform:DOWN, rect=" + rect);
                    }
                    if (rect == null) {
                        continue;
                    }
                    if (rect.applyTransform(event, false)) {
                        if (TestProtocol.sDebugTracing) {
                            Log.d(TestProtocol.NO_SWIPE_TO_HOME, "setting mLastRectTouched");
                        }
                        mLastRectTouched = rect;
                        mActiveTouchRotation = rect.mRotation;
                        if (mEnableMultipleRegions
+0 −16
Original line number Diff line number Diff line
@@ -93,10 +93,6 @@ public class RecentTasksList extends TaskStackChangeListener {
     * @return The change id of the current task list
     */
    public synchronized int getTasks(boolean loadKeysOnly, Consumer<ArrayList<Task>> callback) {
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: keysOnly=" + loadKeysOnly
                    + " callback=" + callback);
        }
        final int requestLoadId = mChangeId;
        if (mResultsUi.isValidForRequest(requestLoadId, loadKeysOnly)) {
            // The list is up to date, send the callback on the next frame,
@@ -105,9 +101,6 @@ public class RecentTasksList extends TaskStackChangeListener {
                // Copy synchronously as the changeId might change by next frame
                ArrayList<Task> result = copyOf(mResultsUi);
                mMainThreadExecutor.post(() -> {
                    if (TestProtocol.sDebugTracing) {
                        Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: no new tasks");
                    }
                    callback.accept(result);
                });
            }
@@ -118,24 +111,15 @@ public class RecentTasksList extends TaskStackChangeListener {
        // Kick off task loading in the background
        mLoadingTasksInBackground = true;
        UI_HELPER_EXECUTOR.execute(() -> {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: loading in bg start");
            }
            if (!mResultsBg.isValidForRequest(requestLoadId, loadKeysOnly)) {
                mResultsBg = loadTasksInBackground(Integer.MAX_VALUE, requestLoadId, loadKeysOnly);
            }
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: loading in bg end");
            }
            TaskLoadResult loadResult = mResultsBg;
            mMainThreadExecutor.execute(() -> {
                mLoadingTasksInBackground = false;
                mResultsUi = loadResult;
                if (callback != null) {
                    ArrayList<Task> result = copyOf(mResultsUi);
                    if (TestProtocol.sDebugTracing) {
                        Log.d(TestProtocol.GET_RECENTS_FAILED, "getTasks: callback w/ bg results");
                    }
                    callback.accept(result);
                }
            });
+0 −1
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ public class RecentsAnimationDeviceState implements
     * Cleans up all the registered listeners and receivers.
     */
    public void destroy() {
        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "destroying RADS", new Throwable());
        for (Runnable r : mOnDestroyActions) {
            r.run();
        }
+0 −9
Original line number Diff line number Diff line
@@ -133,8 +133,6 @@ public class RotationTouchHelper implements

    private RotationTouchHelper(Context context) {
        mContext = context;
        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RotationTouchHelper ctor init? " + mNeedsInit
                + " " + this);
        if (mNeedsInit) {
            init();
        }
@@ -142,11 +140,8 @@ public class RotationTouchHelper implements

    public void init() {
        if (!mNeedsInit) {
            Log.d(TestProtocol.NO_SWIPE_TO_HOME, "Did not need init? " + " " + this);
            return;
        }
        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "RotationTouchHelper init() " + this,
                new Throwable());
        mDisplayController = DisplayController.INSTANCE.get(mContext);
        Resources resources = mContext.getResources();
        mSysUiNavMode = SysUINavigationMode.INSTANCE.get(mContext);
@@ -157,8 +152,6 @@ public class RotationTouchHelper implements

        // Register for navigation mode changes
        SysUINavigationMode.Mode newMode = mSysUiNavMode.addModeChangeListener(this);
        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "AddedModeChangeListener: " + this +
                " currentMode: " + newMode);
        onNavigationModeChanged(newMode);
        runOnDestroy(() -> mSysUiNavMode.removeModeChangeListener(this));

@@ -204,7 +197,6 @@ public class RotationTouchHelper implements
     * Cleans up all the registered listeners and receivers.
     */
    public void destroy() {
        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "destroying " + this);
        for (Runnable r : mOnDestroyActions) {
            r.run();
        }
@@ -253,7 +245,6 @@ public class RotationTouchHelper implements

    @Override
    public void onNavigationModeChanged(SysUINavigationMode.Mode newMode) {
        Log.d(TestProtocol.NO_SWIPE_TO_HOME, "nav mode changed: " + newMode);
        mDisplayController.removeChangeListener(this);
        mDisplayController.addChangeListener(this);
        onDisplayInfoChanged(mContext, mDisplayController.getInfo(), CHANGE_ALL);
Loading