diff options
| author | Sally <sallyyuen@google.com> | 2022-03-14 19:21:49 +0000 |
|---|---|---|
| committer | Sally <sallyyuen@google.com> | 2022-03-14 20:22:47 +0000 |
| commit | e85fe22d45d001088417df51ea3de5cd5168131b (patch) | |
| tree | 63b41239b895257078e52be1b8963099721e70da | |
| parent | e2f5e4acb48db852b6a603eee5e5dcac65965710 (diff) | |
Add @FloatRange to DurationScaleChangeListener.onChanged
Test: builds
Bug: 224543281
Change-Id: Idd10b488dc3baea0e1644e5b2a165866274100d6
| -rw-r--r-- | core/api/current.txt | 4 | ||||
| -rw-r--r-- | core/api/test-current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/animation/ValueAnimator.java | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 19ffd36eb47a..1fb847141444 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -3901,7 +3901,7 @@ package android.animation { method public Object getAnimatedValue(String); method public long getCurrentPlayTime(); method public long getDuration(); - method @FloatRange(from=0, to=1) public static float getDurationScale(); + method @FloatRange(from=0) public static float getDurationScale(); method public static long getFrameDelay(); method public int getRepeatCount(); method public int getRepeatMode(); @@ -3941,7 +3941,7 @@ package android.animation { } public static interface ValueAnimator.DurationScaleChangeListener { - method public void onChanged(float); + method public void onChanged(@FloatRange(from=0) float); } } diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 66f893d71ef9..db95a1feec91 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -96,7 +96,7 @@ package android.accessibilityservice { package android.animation { public class ValueAnimator extends android.animation.Animator { - method @MainThread public static void setDurationScale(@FloatRange(from=0, to=1) float); + method @MainThread public static void setDurationScale(@FloatRange(from=0) float); } } diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index bca6b6a0ddd0..6ab7ae6d0cee 100644 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -316,7 +316,7 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio @UnsupportedAppUsage @TestApi @MainThread - public static void setDurationScale(@FloatRange(from = 0, to = 1) float durationScale) { + public static void setDurationScale(@FloatRange(from = 0) float durationScale) { sDurationScale = durationScale; List<WeakReference<DurationScaleChangeListener>> listenerCopy; @@ -340,7 +340,7 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio * * @return the duration scale. */ - @FloatRange(from = 0, to = 1) + @FloatRange(from = 0) public static float getDurationScale() { return sDurationScale; } @@ -1798,8 +1798,8 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio public interface DurationScaleChangeListener { /** * Called when the duration scale changes. - * @param scale the duration scalel + * @param scale the duration scale */ - void onChanged(float scale); + void onChanged(@FloatRange(from = 0) float scale); } } |
