Merge "Fix animation canceling crash bug (short swipe during split select)" into udc-dev am: 7158d2d0e2

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22146539

Change-Id: Ie1a029935d313dd87ad663db298c04aa815f7d46
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jeremy Sim
2023-05-11 22:55:23 +00:00
committed by Automerger Merge Worker
@@ -229,8 +229,10 @@ public class StateManager<STATE_TYPE extends BaseState<STATE_TYPE>> {
listener.onAnimationEnd(null);
}
return;
} else if (!mConfig.userControlled && animated && mConfig.targetState == state) {
// We are running the same animation as requested
} else if ((!mConfig.userControlled && animated && mConfig.targetState == state)
|| mState.shouldPreserveDataStateOnReapply()) {
// We are running the same animation as requested, and/or target state should not be
// reset -- allow the current animation to complete instead of canceling it.
if (listener != null) {
mConfig.currentAnimation.addListener(listener);
}