Log dismissing or launching recent tasks
We now pass the log action (e.g. SWIPE or FLING) to the pending animation, so that the end listener can log appropriately. This is used when swiping down or up on a task, for example. Bug: 73783784 Change-Id: I5c2eee24e8b23cf4af68d503d3435a6d8088dd8a
This commit is contained in:
1 parent
b3ad0edc14
commit
9bd862e588
8 files changed
+81
-45
No files matched your search
@@ -30,11 +30,10 @@ import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.anim.AnimatorPlaybackController;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.touch.SwipeDetector;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
|
||||
import com.android.launcher3.util.PendingAnimation;
|
||||
import com.android.launcher3.util.TouchController;
|
||||
import com.android.launcher3.views.BaseDragLayer;
|
||||
import com.android.launcher3.util.PendingAnimation;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
import com.android.quickstep.views.TaskView;
|
||||
|
||||
@@ -152,7 +151,7 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||
mCurrentAnimation.setPlayFraction(0);
|
||||
}
|
||||
if (mPendingAnimation != null) {
|
||||
mPendingAnimation.finish(false);
|
||||
mPendingAnimation.finish(false, Touch.SWIPE);
|
||||
mPendingAnimation = null;
|
||||
}
|
||||
|
||||
@@ -249,15 +248,9 @@ public abstract class TaskViewTouchController<T extends BaseDraggingActivity>
|
||||
|
||||
private void onCurrentAnimationEnd(boolean wasSuccess, int logAction) {
|
||||
if (mPendingAnimation != null) {
|
||||
mPendingAnimation.finish(wasSuccess);
|
||||
mPendingAnimation.finish(wasSuccess, logAction);
|
||||
mPendingAnimation = null;
|
||||
}
|
||||
if (wasSuccess) {
|
||||
if (!mCurrentAnimationIsGoingUp) {
|
||||
mActivity.getUserEventDispatcher().logTaskLaunch(logAction,
|
||||
Direction.DOWN, mTaskBeingDragged.getTask().getTopComponent());
|
||||
}
|
||||
}
|
||||
mDetector.finishedScrolling();
|
||||
mTaskBeingDragged = null;
|
||||
mCurrentAnimation = null;
|
||||
|
||||
Reference in new issue
Block a user