mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Fix a couple issues with swiping up from home
- Don't update the animation to go from 0 to 1; instead, update the interpolator to clamp to the remaining progress (b/79773309) - Fix NPE that can happen in a race between the atomic animation ending and the non-atomic animation canceling/ending Change-Id: I313251dc5cbd7b931b043fc3e840bb4ab368a790
This commit is contained in:
@@ -209,11 +209,13 @@ public abstract class AbstractStateChangeTouchController
|
||||
@Override
|
||||
public void onAnimationSuccess(Animator animation) {
|
||||
cancelAtomicComponentsController();
|
||||
mAtomicComponentsStartProgress = mCurrentAnimation.getProgressFraction();
|
||||
long duration = (long) (getShiftRange() * 2);
|
||||
mAtomicComponentsController = AnimatorPlaybackController.wrap(
|
||||
createAtomicAnimForState(mFromState, mToState, duration), duration);
|
||||
mAtomicComponentsController.dispatchOnStart();
|
||||
if (mCurrentAnimation != null) {
|
||||
mAtomicComponentsStartProgress = mCurrentAnimation.getProgressFraction();
|
||||
long duration = (long) (getShiftRange() * 2);
|
||||
mAtomicComponentsController = AnimatorPlaybackController.wrap(
|
||||
createAtomicAnimForState(mFromState, mToState, duration), duration);
|
||||
mAtomicComponentsController.dispatchOnStart();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user