mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Instrumenting swiping up to all apps for jank" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
06df8d7262
@@ -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