mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Instrumenting swiping up to all apps for jank
Bug: 178656784 Test: manual Change-Id: I2332f0f358dc7312dc7ad0b88bc51db5bfa8be6c
This commit is contained in:
@@ -124,7 +124,7 @@ public abstract class AbstractStateChangeTouchController
|
||||
protected abstract boolean canInterceptTouch(MotionEvent ev);
|
||||
|
||||
@Override
|
||||
public final boolean onControllerInterceptTouchEvent(MotionEvent ev) {
|
||||
public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
|
||||
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
mNoIntercept = !canInterceptTouch(ev);
|
||||
if (mNoIntercept) {
|
||||
@@ -193,6 +193,8 @@ public abstract class AbstractStateChangeTouchController
|
||||
: reachedToState ? mToState : mFromState;
|
||||
LauncherState newToState = getTargetState(newFromState, isDragTowardPositive);
|
||||
|
||||
onReinitToState(newToState);
|
||||
|
||||
if (newFromState == mFromState && newToState == mToState || (newFromState == newToState)) {
|
||||
return false;
|
||||
}
|
||||
@@ -231,6 +233,12 @@ public abstract class AbstractStateChangeTouchController
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void onReinitToState(LauncherState newToState) {
|
||||
}
|
||||
|
||||
protected void onReachedFinalState(LauncherState newToState) {
|
||||
}
|
||||
|
||||
protected boolean goingBetweenNormalAndOverview(LauncherState fromState,
|
||||
LauncherState toState) {
|
||||
return (fromState == NORMAL || fromState == OVERVIEW)
|
||||
@@ -527,6 +535,7 @@ public abstract class AbstractStateChangeTouchController
|
||||
mAtomicComponentsController.getAnimationPlayer().end();
|
||||
mAtomicComponentsController = null;
|
||||
}
|
||||
onReachedFinalState(mToState);
|
||||
clearState();
|
||||
boolean shouldGoToTargetState = mGoingBetweenStates || (mToState != targetState);
|
||||
if (shouldGoToTargetState) {
|
||||
|
||||
Reference in New Issue
Block a user