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

Commit 07fcd3be authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "When controlling atomic components, bound to remaining progress" into...

Merge "When controlling atomic components, bound to remaining progress" into ub-launcher3-edmonton-polish
parents 1aaaac83 520ffec9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -283,7 +283,9 @@ public abstract class AbstractStateChangeTouchController
    protected void updateProgress(float fraction) {
        mCurrentAnimation.setPlayFraction(fraction);
        if (mAtomicComponentsController != null) {
            mAtomicComponentsController.setPlayFraction(fraction - mAtomicComponentsStartProgress);
            // Make sure we don't divide by 0, and have at least a small runway.
            float start = Math.min(mAtomicComponentsStartProgress, 0.9f);
            mAtomicComponentsController.setPlayFraction((fraction - start) / (1 - start));
        }
        maybeUpdateAtomicAnim(mFromState, mToState, fraction);
    }