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

Commit f57c62c0 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Remove tracing for fixed bugs" into ub-launcher3-qt-dev

parents c7fefa61 8649cf29
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -111,14 +111,6 @@ public class TestInformationProvider extends ContentProvider {
                    response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) distance);
                    break;
                }

                case TestProtocol.REQUEST_ENABLE_DRAG_LOGGING:
                    TestProtocol.sDebugTracing = true;
                    break;

                case TestProtocol.REQUEST_DISABLE_DRAG_LOGGING:
                    TestProtocol.sDebugTracing = false;
                    break;
            }
            return response;
        }
+0 −18
Original line number Diff line number Diff line
@@ -33,20 +33,12 @@ public class CheckLongPressHelper {

    class CheckForLongPress implements Runnable {
        public void run() {
            if (com.android.launcher3.TestProtocol.sDebugTracing) {
                android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG,
                        "CheckForLongPress1");
            }
            if ((mView.getParent() != null) && mView.hasWindowFocus()
                    && !mHasPerformedLongPress) {
                boolean handled;
                if (mListener != null) {
                    handled = mListener.onLongClick(mView);
                } else {
                    if (com.android.launcher3.TestProtocol.sDebugTracing) {
                        android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG,
                                "CheckForLongPress2");
                    }
                    handled = mView.performLongClick();
                }
                if (handled) {
@@ -81,21 +73,11 @@ public class CheckLongPressHelper {
        }
        mView.postDelayed(mPendingCheckForLongPress,
                (long) (ViewConfiguration.getLongPressTimeout() * mLongPressTimeoutFactor));
        if (com.android.launcher3.TestProtocol.sDebugTracing) {
            android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG,
                    "postCheckForLongPress: " + ViewConfiguration.getLongPressTimeout() + " "
                            + mLongPressTimeoutFactor);
        }
    }

    public void cancelLongPress() {
        mHasPerformedLongPress = false;
        if (mPendingCheckForLongPress != null) {
            if (com.android.launcher3.TestProtocol.sDebugTracing) {
                android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG,
                        "cancelLongPress @ " + android.util.Log.getStackTraceString(
                                new Throwable()));
            }
            mView.removeCallbacks(mPendingCheckForLongPress);
            mPendingCheckForLongPress = null;
        }
+0 −7
Original line number Diff line number Diff line
@@ -213,7 +213,6 @@ public class LauncherModel extends BroadcastReceiver
        synchronized (mLock) {
            Preconditions.assertUIThread();
            mCallbacks = new WeakReference<>(callbacks);
            android.util.Log.d("b/131170582", "mCallbacks = " + mCallbacks);
        }
    }

@@ -331,7 +330,6 @@ public class LauncherModel extends BroadcastReceiver
            // Stop any existing loaders first, so they don't set mModelLoaded to true later
            stopLoader();
            mModelLoaded = false;
            android.util.Log.d("b/131170582", "1 mModelLoaded = " + mModelLoaded);
        }

        // Start the loader if launcher is already running, otherwise the loader will run,
@@ -392,7 +390,6 @@ public class LauncherModel extends BroadcastReceiver
        synchronized (mLock) {
            LoaderTask oldTask = mLoaderTask;
            mLoaderTask = null;
            android.util.Log.d("b/131170582", "1 mLoaderTask = " + mLoaderTask);
            if (oldTask != null) {
                oldTask.stopLocked();
            }
@@ -403,7 +400,6 @@ public class LauncherModel extends BroadcastReceiver
        synchronized (mLock) {
            stopLoader();
            mLoaderTask = new LoaderTask(mApp, mBgAllAppsList, sBgDataModel, results);
            android.util.Log.d("b/131170582", "2 mLoaderTask = " + mLoaderTask);
            runOnWorkerThread(mLoaderTask);
        }
    }
@@ -448,7 +444,6 @@ public class LauncherModel extends BroadcastReceiver
                mTask = task;
                mIsLoaderTaskRunning = true;
                mModelLoaded = false;
                android.util.Log.d("b/131170582", "2 mModelLoaded = " + mModelLoaded);
            }
        }

@@ -456,7 +451,6 @@ public class LauncherModel extends BroadcastReceiver
            synchronized (mLock) {
                // Everything loaded bind the data.
                mModelLoaded = true;
                android.util.Log.d("b/131170582", "3 mModelLoaded = " + mModelLoaded);
            }
        }

@@ -466,7 +460,6 @@ public class LauncherModel extends BroadcastReceiver
                // If we are still the last one to be scheduled, remove ourselves.
                if (mLoaderTask == mTask) {
                    mLoaderTask = null;
                    android.util.Log.d("b/131170582", "3 mLoaderTask = " + mLoaderTask);
                }
                mIsLoaderTaskRunning = false;
            }
+0 −10
Original line number Diff line number Diff line
@@ -186,14 +186,4 @@ public class LauncherRootView extends InsettableFrameLayout {

        void onWindowVisibilityChanged(int visibility);
    }

    @Override
    public void requestLayout() {
        super.requestLayout();
        if (com.android.launcher3.TestProtocol.sDebugTracing) {
            android.util.Log.d(com.android.launcher3.TestProtocol.NO_DRAG_TAG,
                    "requestLayout @ " + android.util.Log.getStackTraceString(
                            new Throwable()));
        }
    }
}
 No newline at end of file
+0 −5
Original line number Diff line number Diff line
@@ -63,9 +63,4 @@ public final class TestProtocol {
            "all-apps-to-overview-swipe-height";
    public static final String REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT =
            "home-to-all-apps-swipe-height";

    public static boolean sDebugTracing = false;
    public static final String NO_DRAG_TAG = "b/129434166";
    public static final String REQUEST_ENABLE_DRAG_LOGGING = "enable-drag-logging";
    public static final String REQUEST_DISABLE_DRAG_LOGGING = "disable-drag-logging";
}
Loading