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
@@ -246,24 +246,24 @@ public abstract class AbstractStateChangeTouchController extends AnimatorListene
|
||||
}
|
||||
|
||||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||
if (targetState != mFromState) {
|
||||
// Transition complete. log the action
|
||||
mLauncher.getUserEventDispatcher().logStateChangeAction(logAction,
|
||||
getDirectionForLog(),
|
||||
mStartContainerType,
|
||||
mFromState.containerType,
|
||||
mToState.containerType,
|
||||
mLauncher.getWorkspace().getCurrentPage());
|
||||
}
|
||||
clearState();
|
||||
boolean shouldGoToTargetState = true;
|
||||
if (mPendingAnimation != null) {
|
||||
boolean reachedTarget = mToState == targetState;
|
||||
mPendingAnimation.finish(reachedTarget);
|
||||
mPendingAnimation.finish(reachedTarget, logAction);
|
||||
mPendingAnimation = null;
|
||||
shouldGoToTargetState = !reachedTarget;
|
||||
}
|
||||
if (shouldGoToTargetState) {
|
||||
if (targetState != mFromState) {
|
||||
// Transition complete. log the action
|
||||
mLauncher.getUserEventDispatcher().logStateChangeAction(logAction,
|
||||
getDirectionForLog(),
|
||||
mStartContainerType,
|
||||
mFromState.containerType,
|
||||
mToState.containerType,
|
||||
mLauncher.getWorkspace().getCurrentPage());
|
||||
}
|
||||
mLauncher.getStateManager().goToState(targetState, false /* animated */);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user