Skip to content

Commit

Permalink
Clear state animation when cancelling swipe to all apps
Browse files Browse the repository at this point in the history
  • Loading branch information
amirzaidi committed Jul 9, 2019
1 parent 4091091 commit af98521
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.LauncherStateManager.AnimationComponents;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.touch.AbstractStateChangeTouchController;
import com.android.launcher3.touch.SwipeDetector;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
Expand Down Expand Up @@ -67,7 +68,8 @@ protected float initCurrentAnimation(@AnimationComponents int animComponents) {
float range = getShiftRange();
long maxAccuracy = (long) (2 * range);
mCurrentAnimation = mLauncher.getStateManager()
.createAnimationToNewWorkspace(mToState, maxAccuracy, animComponents);
.createAnimationToNewWorkspace(mToState, new AnimatorSetBuilder(), maxAccuracy,
this::clearState, animComponents);
float startVerticalShift = mFromState.getVerticalProgress(mLauncher) * range;
float endVerticalShift = mToState.getVerticalProgress(mLauncher) * range;
float totalShift = endVerticalShift - startVerticalShift;
Expand Down

0 comments on commit af98521

Please sign in to comment.