Add @UnsupportedAppUsage annotations
For packages:
android.animation
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I6702ce1fb26452971e5eee8da15d5816dd75bb12
Merged-In: If0667154031b254fd632e1332fb65e9b08955755
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index 143a0fb..85eb652 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -51,13 +51,6 @@
Landroid/accounts/IAccountManagerResponse$Stub;->asInterface(Landroid/os/IBinder;)Landroid/accounts/IAccountManagerResponse;
Landroid/accounts/IAccountManagerResponse;->onError(ILjava/lang/String;)V
Landroid/accounts/IAccountManagerResponse;->onResult(Landroid/os/Bundle;)V
-Landroid/animation/Animator;->reverse()V
-Landroid/animation/ArgbEvaluator;->getInstance()Landroid/animation/ArgbEvaluator;
-Landroid/animation/LayoutTransition;->cancel()V
-Landroid/animation/LayoutTransition;->cancel(I)V
-Landroid/animation/ValueAnimator;->animateValue(F)V
-Landroid/animation/ValueAnimator;->mDuration:J
-Landroid/animation/ValueAnimator;->sDurationScale:F
Landroid/app/ActionBar;->collapseActionView()Z
Landroid/app/ActionBar;->DISPLAY_TITLE_MULTIPLE_LINES:I
Landroid/app/ActionBar;->setShowHideAnimationEnabled(Z)V
diff --git a/core/java/android/animation/Animator.java b/core/java/android/animation/Animator.java
index 4ebcc44..17d54d2 100644
--- a/core/java/android/animation/Animator.java
+++ b/core/java/android/animation/Animator.java
@@ -17,6 +17,7 @@
package android.animation;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.content.pm.ActivityInfo.Config;
import android.content.res.ConstantState;
@@ -460,6 +461,7 @@
/**
* @hide
*/
+ @UnsupportedAppUsage
public void reverse() {
throw new IllegalStateException("Reverse is not supported");
}
diff --git a/core/java/android/animation/ArgbEvaluator.java b/core/java/android/animation/ArgbEvaluator.java
index a96bee6..5b69d18 100644
--- a/core/java/android/animation/ArgbEvaluator.java
+++ b/core/java/android/animation/ArgbEvaluator.java
@@ -16,6 +16,8 @@
package android.animation;
+import android.annotation.UnsupportedAppUsage;
+
/**
* This evaluator can be used to perform type interpolation between integer
* values that represent ARGB colors.
@@ -31,6 +33,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public static ArgbEvaluator getInstance() {
return sInstance;
}
diff --git a/core/java/android/animation/LayoutTransition.java b/core/java/android/animation/LayoutTransition.java
index 5a23fdd..5b3813d 100644
--- a/core/java/android/animation/LayoutTransition.java
+++ b/core/java/android/animation/LayoutTransition.java
@@ -16,6 +16,7 @@
package android.animation;
+import android.annotation.UnsupportedAppUsage;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
@@ -1070,6 +1071,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void cancel() {
if (currentChangingAnimations.size() > 0) {
LinkedHashMap<View, Animator> currentAnimCopy =
@@ -1105,6 +1107,7 @@
*
* @hide
*/
+ @UnsupportedAppUsage
public void cancel(int transitionType) {
switch (transitionType) {
case CHANGE_APPEARING:
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java
index ee89ca8..3af7b95 100644
--- a/core/java/android/animation/ValueAnimator.java
+++ b/core/java/android/animation/ValueAnimator.java
@@ -19,6 +19,7 @@
import android.annotation.CallSuper;
import android.annotation.IntDef;
import android.annotation.TestApi;
+import android.annotation.UnsupportedAppUsage;
import android.os.Looper;
import android.os.Trace;
import android.util.AndroidRuntimeException;
@@ -75,6 +76,7 @@
/**
* Internal constants
*/
+ @UnsupportedAppUsage
private static float sDurationScale = 1.0f;
/**
@@ -200,6 +202,7 @@
//
// How long the animation should last in ms
+ @UnsupportedAppUsage
private long mDuration = 300;
// The amount of time in ms to delay starting the animation after start() is called. Note
@@ -1509,6 +1512,7 @@
* @param fraction The elapsed fraction of the animation.
*/
@CallSuper
+ @UnsupportedAppUsage
void animateValue(float fraction) {
fraction = mInterpolator.getInterpolation(fraction);
mCurrentFraction = fraction;