Merge "Removing tracing for a fixed bug." into ub-launcher3-qt-r1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
59b5b3f2a2
@@ -515,9 +515,6 @@ public class TouchInteractionService extends Service implements
|
||||
}
|
||||
|
||||
private void onInputEvent(InputEvent ev) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.EVENTS_TO_OVERVIEW_MISSING_TAG, "onInputEvent " + ev);
|
||||
}
|
||||
if (!(ev instanceof MotionEvent)) {
|
||||
Log.e(TAG, "Unknown event " + ev);
|
||||
return;
|
||||
|
||||
-3
@@ -82,9 +82,6 @@ public class OverviewInputConsumer<T extends BaseDraggingActivity>
|
||||
|
||||
@Override
|
||||
public void onMotionEvent(MotionEvent ev) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.EVENTS_TO_OVERVIEW_MISSING_TAG, "onMotionEvent " + ev);
|
||||
}
|
||||
if (!mProxyTouch) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -429,11 +429,6 @@ public class LauncherStateManager {
|
||||
// Only change the stable states after the transitions have finished
|
||||
if (state != mCurrentStableState) {
|
||||
mLastStableState = state.getHistoryForState(mCurrentStableState);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG,
|
||||
"mCurrentStableState = " + state.getClass().getSimpleName() + " @ " +
|
||||
android.util.Log.getStackTraceString(new Throwable()));
|
||||
}
|
||||
mCurrentStableState = state;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,10 +168,6 @@ public class AllAppsTransitionController implements StateHandler, OnDeviceProfil
|
||||
@Override
|
||||
public void setStateWithAnimation(LauncherState toState,
|
||||
AnimatorSetBuilder builder, AnimationConfig config) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG,
|
||||
"setStateWithAnimation " + toState.getClass().getSimpleName());
|
||||
}
|
||||
float targetProgress = toState.getVerticalProgress(mLauncher);
|
||||
if (Float.compare(mProgress, targetProgress) == 0) {
|
||||
setAlphas(toState, config, builder);
|
||||
|
||||
@@ -53,9 +53,6 @@ public class AccessibilityManagerCompat {
|
||||
}
|
||||
|
||||
public static void sendStateEventToTest(Context context, int stateOrdinal) {
|
||||
if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
|
||||
android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG, "sendStateEventToTest");
|
||||
}
|
||||
final AccessibilityManager accessibilityManager = getAccessibilityManagerForTest(context);
|
||||
if (accessibilityManager == null) return;
|
||||
|
||||
|
||||
@@ -74,10 +74,8 @@ public final class TestProtocol {
|
||||
public static boolean sDebugTracing = false;
|
||||
public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing";
|
||||
public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing";
|
||||
public static final String NO_ALLAPPS_EVENT_TAG = "b/133867119";
|
||||
public static final String NO_DRAG_TAG = "b/133009122";
|
||||
public static final String NO_START_TAG = "b/132900132";
|
||||
public static final String NO_START_TASK_TAG = "b/133765434";
|
||||
public static final String NO_OVERVIEW_EVENT_TAG = "b/134532571";
|
||||
public static final String EVENTS_TO_OVERVIEW_MISSING_TAG = "b/133867119";
|
||||
}
|
||||
|
||||
@@ -118,9 +118,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
|
||||
@Override
|
||||
public final boolean onControllerInterceptTouchEvent(MotionEvent ev) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onControllerInterceptTouchEvent 1 " + ev);
|
||||
}
|
||||
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
mNoIntercept = !canInterceptTouch(ev);
|
||||
if (mNoIntercept) {
|
||||
@@ -150,9 +147,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onControllerInterceptTouchEvent 2 ");
|
||||
}
|
||||
onControllerTouchEvent(ev);
|
||||
return mDetector.isDraggingOrSettling();
|
||||
}
|
||||
@@ -240,9 +234,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
|
||||
@Override
|
||||
public void onDragStart(boolean start) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onDragStart 1 " + start);
|
||||
}
|
||||
mStartState = mLauncher.getStateManager().getState();
|
||||
if (mStartState == ALL_APPS) {
|
||||
mStartContainerType = LauncherLogProto.ContainerType.ALLAPPS;
|
||||
@@ -252,9 +243,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
mStartContainerType = LauncherLogProto.ContainerType.TASKSWITCHER;
|
||||
}
|
||||
if (mCurrentAnimation == null) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onDragStart 2");
|
||||
}
|
||||
mFromState = mStartState;
|
||||
mToState = null;
|
||||
cancelAnimationControllers();
|
||||
@@ -376,9 +364,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
|
||||
@Override
|
||||
public void onDragEnd(float velocity, boolean fling) {
|
||||
if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
|
||||
android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onDragEnd");
|
||||
}
|
||||
final int logAction = fling ? Touch.FLING : Touch.SWIPE;
|
||||
|
||||
boolean blockedFling = fling && mFlingBlockCheck.isBlocked();
|
||||
@@ -515,9 +500,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
}
|
||||
|
||||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||
if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
|
||||
android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onSwipeInteractionCompleted 1");
|
||||
}
|
||||
if (mAtomicComponentsController != null) {
|
||||
mAtomicComponentsController.getAnimationPlayer().end();
|
||||
mAtomicComponentsController = null;
|
||||
@@ -535,11 +517,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
logReachedState(logAction, targetState);
|
||||
}
|
||||
mLauncher.getStateManager().goToState(targetState, false /* animated */);
|
||||
|
||||
if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
|
||||
android.util.Log.e(
|
||||
TestProtocol.NO_ALLAPPS_EVENT_TAG, "onSwipeInteractionCompleted 2");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,9 +540,6 @@ public abstract class AbstractStateChangeTouchController
|
||||
}
|
||||
|
||||
private void cancelAnimationControllers() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "cancelAnimationControllers");
|
||||
}
|
||||
mCurrentAnimation = null;
|
||||
cancelAtomicComponentsController();
|
||||
mDetector.finishedScrolling();
|
||||
|
||||
@@ -158,9 +158,6 @@ public class SwipeDetector {
|
||||
// SETTLING -> (View settled) -> IDLE
|
||||
|
||||
private void setState(ScrollState newState) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "setState -- start: " + newState);
|
||||
}
|
||||
if (DBG) {
|
||||
Log.d(TAG, "setState:" + mState + "->" + newState);
|
||||
}
|
||||
@@ -168,9 +165,6 @@ public class SwipeDetector {
|
||||
if (newState == ScrollState.DRAGGING) {
|
||||
initializeDragging();
|
||||
if (mState == ScrollState.IDLE) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "setState -- 1: " + newState);
|
||||
}
|
||||
reportDragStart(false /* recatch */);
|
||||
} else if (mState == ScrollState.SETTLING) {
|
||||
reportDragStart(true /* recatch */);
|
||||
@@ -181,11 +175,6 @@ public class SwipeDetector {
|
||||
}
|
||||
|
||||
mState = newState;
|
||||
if (com.android.launcher3.testing.TestProtocol.sDebugTracing) {
|
||||
android.util.Log.e(TestProtocol.NO_ALLAPPS_EVENT_TAG,
|
||||
"setState: " + newState + " @ " + android.util.Log.getStackTraceString(
|
||||
new Throwable()));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDraggingOrSettling() {
|
||||
@@ -324,15 +313,9 @@ public class SwipeDetector {
|
||||
break;
|
||||
}
|
||||
mDisplacement = mDir.getDisplacement(ev, pointerIndex, mDownPos, mIsRtl);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onTouchEvent 1");
|
||||
}
|
||||
|
||||
// handle state and listener calls.
|
||||
if (mState != ScrollState.DRAGGING && shouldScrollStart(ev, pointerIndex)) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.NO_ALLAPPS_EVENT_TAG, "onTouchEvent 2");
|
||||
}
|
||||
setState(ScrollState.DRAGGING);
|
||||
}
|
||||
if (mState == ScrollState.DRAGGING) {
|
||||
|
||||
@@ -152,9 +152,6 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
}
|
||||
|
||||
private TouchController findControllerToHandleTouch(MotionEvent ev) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.EVENTS_TO_OVERVIEW_MISSING_TAG, "findControllerToHandleTouch " + ev);
|
||||
}
|
||||
if (shouldDisableGestures(ev)) return null;
|
||||
|
||||
AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(mActivity);
|
||||
@@ -315,9 +312,6 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
* Proxies the touch events to the gesture handlers
|
||||
*/
|
||||
public boolean proxyTouchEvent(MotionEvent ev) {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.EVENTS_TO_OVERVIEW_MISSING_TAG, "proxyTouchEvent " + ev);
|
||||
}
|
||||
boolean handled;
|
||||
if (mProxyTouchController != null) {
|
||||
handled = mProxyTouchController.onControllerTouchEvent(ev);
|
||||
|
||||
Reference in New Issue
Block a user