diff options
| author | 2019-02-06 19:33:36 +0000 | |
|---|---|---|
| committer | 2019-02-06 19:33:36 +0000 | |
| commit | 6167cf18a69251b570362036d9de263c563abd8a (patch) | |
| tree | c58242c1f0f866dcc42c5ca2cc2192e51d139edc | |
| parent | 5e02147465d1f839fcd4728ed84ce44622a7bd2a (diff) | |
| parent | 61fe23a1bce9245e3a085550197e80ddc3228d1f (diff) | |
Merge "Restrict reflection access to ValueAnimator's sDurationScale"
| -rw-r--r-- | core/java/android/animation/ValueAnimator.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index a0464dfac1f4..ebb03e765a47 100644 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -20,6 +20,7 @@ import android.annotation.CallSuper; import android.annotation.IntDef; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; +import android.os.Build; import android.os.Looper; import android.os.Trace; import android.util.AndroidRuntimeException; @@ -76,7 +77,13 @@ public class ValueAnimator extends Animator implements AnimationHandler.Animatio /** * Internal constants */ - @UnsupportedAppUsage + + /** + * System-wide animation scale. + * + * <p>To check whether animations are enabled system-wise use {@link #areAnimatorsEnabled()}. + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) private static float sDurationScale = 1.0f; /** |