Merge "Revert "Add debug logs to AbsSwipeUpHandler.calculateEndTarget"" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
85ec44bcf9
@@ -1116,9 +1116,6 @@ public abstract class AbsSwipeUpHandler<
|
||||
public void onGestureEnded(float endVelocityPxPerMs, PointF velocityPxPerMs) {
|
||||
float flingThreshold = mContext.getResources()
|
||||
.getDimension(R.dimen.quickstep_fling_threshold_speed);
|
||||
Log.d(TAG, "onGestureEnded: mGestureStarted=" + mGestureStarted
|
||||
+ ", mIsMotionPaused=" + mIsMotionPaused
|
||||
+ ", flingThresholdPassed=" + (Math.abs(endVelocityPxPerMs) > flingThreshold));
|
||||
boolean isFling = mGestureStarted && !mIsMotionPaused
|
||||
&& Math.abs(endVelocityPxPerMs) > flingThreshold;
|
||||
mStateCallback.setStateOnUiThread(STATE_GESTURE_COMPLETED);
|
||||
@@ -1267,12 +1264,12 @@ public abstract class AbsSwipeUpHandler<
|
||||
dpiFromPx(velocityPxPerMs.x),
|
||||
dpiFromPx(velocityPxPerMs.y),
|
||||
Math.toDegrees(Math.atan2(-velocityPxPerMs.y, velocityPxPerMs.x)));
|
||||
|
||||
if (mGestureState.isHandlingAtomicEvent()) {
|
||||
// Button mode, this is only used to go to recents.
|
||||
return RECENTS;
|
||||
}
|
||||
|
||||
Log.d(TAG, "calculateEndTarget: isCancel=" + isCancel + ", isFlingY=" + isFlingY);
|
||||
GestureEndTarget endTarget;
|
||||
if (isCancel) {
|
||||
endTarget = LAST_TASK;
|
||||
@@ -1282,7 +1279,6 @@ public abstract class AbsSwipeUpHandler<
|
||||
endTarget = calculateEndTargetForNonFling(velocityPxPerMs);
|
||||
}
|
||||
|
||||
Log.d(TAG, "calculateEndTarget: endTarget(1)=" + endTarget);
|
||||
if (mDeviceState.isOverviewDisabled() && endTarget == RECENTS) {
|
||||
return LAST_TASK;
|
||||
}
|
||||
@@ -1301,7 +1297,6 @@ public abstract class AbsSwipeUpHandler<
|
||||
return LAST_TASK;
|
||||
}
|
||||
}
|
||||
Log.d(TAG, "calculateEndTarget: endTarget(2)=" + endTarget);
|
||||
return endTarget;
|
||||
}
|
||||
|
||||
@@ -1310,12 +1305,9 @@ public abstract class AbsSwipeUpHandler<
|
||||
final boolean willGoToNewTask =
|
||||
isScrollingToNewTask() && Math.abs(velocity.x) > Math.abs(endVelocity);
|
||||
final boolean isSwipeUp = endVelocity < 0;
|
||||
Log.d(TAG, "calculateEndTargetForFlingY: willGoToNewTask=" + willGoToNewTask
|
||||
+ ", isSwipeUp=" + isSwipeUp);
|
||||
if (!isSwipeUp) {
|
||||
final boolean isCenteredOnNewTask = mRecentsView != null
|
||||
&& mRecentsView.getDestinationPage() != mRecentsView.getRunningTaskIndex();
|
||||
Log.d(TAG, "calculateEndTargetForFlingY: isCenteredOnNewTask=" + isCenteredOnNewTask);
|
||||
return willGoToNewTask || isCenteredOnNewTask ? NEW_TASK : LAST_TASK;
|
||||
}
|
||||
|
||||
@@ -1328,9 +1320,6 @@ public abstract class AbsSwipeUpHandler<
|
||||
// Fully gestural mode.
|
||||
final boolean isFlingX = Math.abs(velocity.x) > mContext.getResources()
|
||||
.getDimension(R.dimen.quickstep_fling_threshold_speed);
|
||||
Log.d(TAG, "calculateEndTargetForNonFling: isScrollingToNewTask=" + isScrollingToNewTask
|
||||
+ ", isFlingX=" + isFlingX
|
||||
+ ", mIsMotionPaused=" + mIsMotionPaused);
|
||||
if (isScrollingToNewTask && isFlingX) {
|
||||
// Flinging towards new task takes precedence over mIsMotionPaused (which only
|
||||
// checks y-velocity).
|
||||
@@ -1340,7 +1329,6 @@ public abstract class AbsSwipeUpHandler<
|
||||
} else if (isScrollingToNewTask) {
|
||||
return NEW_TASK;
|
||||
}
|
||||
Log.d(TAG, "calculateEndTargetForNonFling: mCanSlowSwipeGoHome=" + mCanSlowSwipeGoHome);
|
||||
return velocity.y < 0 && mCanSlowSwipeGoHome ? HOME : LAST_TASK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user