Allow infinite-repeat zero-duration animators to continue repeating

A recent change to ValueAnimator caused infinitely repeating animators with
duration 0 to be ended immediately. BatterySaver mode can cause animators
to have 0 duration, which means that apps depending on animator update events
no longer receive those events due to this behavior change.

The fix is to restore the previous behavior of allowing repeating animators
to continue, regardless of duration.

Issue #19113776 Fix infinite-repeating, zero-duration animator behavior

Change-Id: I4d1c7afb6d06ca45ef41db73c160f6a6d5754e24
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index 8b70ae6..9709555 100644
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -1273,8 +1273,7 @@
                 }
             }
             if (fraction >= 1f) {
-                if (mCurrentIteration < mRepeatCount ||
-                        (mRepeatCount == INFINITE && mDuration != 0)) {
+                if (mCurrentIteration < mRepeatCount || mRepeatCount == INFINITE) {
                     // Time to repeat
                     if (mListeners != null) {
                         int numListeners = mListeners.size();