summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-09-29 01:06:38 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-09-29 01:06:38 +0000
commit92ae3818ad012d2fb055dd537b08b3f5a8416d2a (patch)
tree873025ebfa3a1e6c19982886cde528ad894b123e /core/java
parent9d511d25ff4c0e192e1ac843176c436b4eb5d70c (diff)
parentbe0bdf6178e8084b928f8bd98ce3e0a1a53dd3d9 (diff)
Snap for 7775214 from be0bdf6178e8084b928f8bd98ce3e0a1a53dd3d9 to sc-qpr1-release
Change-Id: I6a8178dea3ff77e7b87738f092fe807e420f76ff
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/animation/Animation.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java
index b296d6f6a052..b1d618eff40a 100644
--- a/core/java/android/view/animation/Animation.java
+++ b/core/java/android/view/animation/Animation.java
@@ -19,7 +19,6 @@ package android.view.animation;
import android.annotation.AnimRes;
import android.annotation.ColorInt;
import android.annotation.InterpolatorRes;
-import android.app.ActivityThread;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
@@ -259,6 +258,8 @@ public abstract class Animation implements Cloneable {
setZAdjustment(a.getInt(com.android.internal.R.styleable.Animation_zAdjustment, ZORDER_NORMAL));
+ setBackgroundColor(a.getInt(com.android.internal.R.styleable.Animation_background, 0));
+
setDetachWallpaper(
a.getBoolean(com.android.internal.R.styleable.Animation_detachWallpaper, false));
setShowWallpaper(
@@ -270,15 +271,6 @@ public abstract class Animation implements Cloneable {
a.recycle();
- Context uiContext = ActivityThread.currentActivityThread().getSystemUiContext();
- TypedArray uiStyledAttrs = uiContext
- .obtainStyledAttributes(attrs, com.android.internal.R.styleable.Animation);
-
- setBackgroundColor(
- uiStyledAttrs.getColor(com.android.internal.R.styleable.Animation_background, 0));
-
- uiStyledAttrs.recycle();
-
if (resID > 0) {
setInterpolator(context, resID);
}
@@ -640,15 +632,16 @@ public abstract class Animation implements Cloneable {
}
/**
- * Set background behind an animation.
+ * Set background behind animation.
*
- * @param bg The background color. If 0, no background.
+ * @param bg The background color. If 0, no background. Currently must
+ * be black, with any desired alpha level.
*
* @deprecated None of window animations are running with background color.
*/
@Deprecated
public void setBackgroundColor(@ColorInt int bg) {
- mBackgroundColor = bg;
+ // The background color is not needed any more, do nothing.
}
/**
@@ -810,7 +803,7 @@ public abstract class Animation implements Cloneable {
@Deprecated
@ColorInt
public int getBackgroundColor() {
- return mBackgroundColor;
+ return 0;
}
/**