Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58ed708c authored by Hans Boehm's avatar Hans Boehm
Browse files

Cancel in-progress computations before saving state

Bug: 26177070

We weren't cancelling in-progress computations, which caused the
resulting events to arrive after the state was already saved.

Change-Id: If694ca6e01d53fc2c8ee451e917b7a0f8510f51d
parent 8243f224
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -314,6 +314,7 @@ public class Calculator extends Activity

    @Override
    protected void onSaveInstanceState(@NonNull Bundle outState) {
        mEvaluator.cancelAll(true);
        // If there's an animation in progress, cancel it first to ensure our state is up-to-date.
        if (mCurrentAnimator != null) {
            mCurrentAnimator.cancel();