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

Commit 32f7dab2 authored by Alan Viverette's avatar Alan Viverette
Browse files

Cancel animation and jump to current state if not animating picker

Bug: 28629631
Change-Id: I0e1b3c2f2c774e027f2df8c9ab75c7a89bd2ddb7
parent b42afe9b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -658,6 +658,13 @@ public class RadialTimePickerView extends View {

        if (animate) {
            animatePicker(hours, ANIM_DURATION_NORMAL);
        } else {
            // If we have a pending or running animator, cancel it.
            if (mHoursToMinutesAnimator != null && mHoursToMinutesAnimator.isStarted()) {
                mHoursToMinutesAnimator.cancel();
                mHoursToMinutesAnimator = null;
            }
            mHoursToMinutes = hours ? 0.0f : 1.0f;
        }

        initData();