Merge "Fixing allSet page not closed if recentsAnimation takes time to start" into sc-v2-dev

This commit is contained in:
TreeHugger Robot 2021-11-09 01:35:48 +00:00 committed by Android (Google) Code Review
commit ef18f8c5a2
2 changed files with 5 additions and 4 deletions

View File

@ -153,10 +153,8 @@ public class ProgressDelegateInputConsumer implements InputConsumer,
ObjectAnimator anim = mProgress.animateToValue(endValue); ObjectAnimator anim = mProgress.animateToValue(endValue);
anim.setDuration(duration).setInterpolator(scrollInterpolatorForVelocity(velocity)); anim.setDuration(duration).setInterpolator(scrollInterpolatorForVelocity(velocity));
if (mRecentsAnimationController != null) { anim.addListener(AnimatorListeners.forSuccessCallback(
anim.addListener(AnimatorListeners.forSuccessCallback( () -> mStateCallback.setState(STATE_FLING_FINISHED)));
() -> mStateCallback.setState(STATE_FLING_FINISHED)));
}
anim.start(); anim.start();
} }

View File

@ -136,6 +136,9 @@ public class AllSetActivity extends Activity {
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
clearBinderOverride(); clearBinderOverride();
if (mSwipeProgress.value >= 1) {
finishAndRemoveTask();
}
} }
private void clearBinderOverride() { private void clearBinderOverride() {