Fix ActivityTransitionTests
We miss to set background color when there's an override
AnimationOptions.
Test: atest ActivityTransitionTests
Bug: 295805497
Flag: EXEMPT bugfix
Change-Id: I12de76554dc43c55fc81087843f1c0b255d7c41e
diff --git a/core/java/android/window/TransitionInfo.java b/core/java/android/window/TransitionInfo.java
index 8a79754..318e406 100644
--- a/core/java/android/window/TransitionInfo.java
+++ b/core/java/android/window/TransitionInfo.java
@@ -1113,7 +1113,7 @@
private final Rect mTransitionBounds = new Rect();
private HardwareBuffer mThumbnail;
private int mAnimations;
- // TODO(b/295805497): Extract it from AnimationOptions
+ // TODO(b/295805497): Extract mBackgroundColor from AnimationOptions
private @ColorInt int mBackgroundColor;
// Customize activity transition animation
private CustomActivityTransition mCustomActivityOpenTransition;
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index 218334e..14332f2 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -1893,6 +1893,8 @@
for (int i = changes.size() - 1; i >= 0; --i) {
if (mTargets.get(i).mContainer.asActivityRecord() != null) {
changes.get(i).setAnimationOptions(mOverrideOptions);
+ // TODO(b/295805497): Extract mBackgroundColor from AnimationOptions.
+ changes.get(i).setBackgroundColor(mOverrideOptions.getBackgroundColor());
}
}
}