Merge "Cancel animation and jump to current state if not animating picker" into nyc-dev

am: d8c38b892b

* commit 'd8c38b892b86cc9cb94633b6f9d74126e2d53c60':
  Cancel animation and jump to current state if not animating picker

Change-Id: I20684e1e974e1d5f8f6987ca9eac17d3da470763
This commit is contained in:
Alan Viverette
2016-05-09 14:14:33 +00:00
committed by android-build-merger

View File

@@ -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();