Add api to disable BackgroundImageView animation.
Bug: 143568163
Test: manually
Change-Id: Ib1ab124e22c1781f57dfac9fa7739bce247c5a6b
diff --git a/car-apps-common/src/com/android/car/apps/common/BackgroundImageView.java b/car-apps-common/src/com/android/car/apps/common/BackgroundImageView.java
index ac2cbe1..043f41a 100644
--- a/car-apps-common/src/com/android/car/apps/common/BackgroundImageView.java
+++ b/car-apps-common/src/com/android/car/apps/common/BackgroundImageView.java
@@ -87,7 +87,15 @@
/** Sets the drawable that will be displayed blurred by this view. */
public void setBackgroundDrawable(@Nullable Drawable drawable) {
- updateBlur(drawable, true);
+ setBackgroundDrawable(drawable, true);
+ }
+
+ /**
+ * Sets the drawable that will be displayed blurred by this view specifying if animation is
+ * enabled.
+ */
+ public void setBackgroundDrawable(@Nullable Drawable drawable, boolean showAnimation) {
+ updateBlur(drawable, showAnimation);
}
private void updateBlur(@Nullable Drawable drawable, boolean showAnimation) {