diff --git a/core/res/res/anim/task_fragment_close_enter.xml b/core/res/res/anim/task_fragment_close_enter.xml
new file mode 100644
index 0000000000000..c940552d53ad7
--- /dev/null
+++ b/core/res/res/anim/task_fragment_close_enter.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/res/res/anim/task_fragment_close_exit.xml b/core/res/res/anim/task_fragment_close_exit.xml
new file mode 100644
index 0000000000000..8998f764ff9b8
--- /dev/null
+++ b/core/res/res/anim/task_fragment_close_exit.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
diff --git a/core/res/res/anim/task_fragment_open_enter.xml b/core/res/res/anim/task_fragment_open_enter.xml
new file mode 100644
index 0000000000000..6bc47deb2de43
--- /dev/null
+++ b/core/res/res/anim/task_fragment_open_enter.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
diff --git a/core/res/res/anim/task_fragment_open_exit.xml b/core/res/res/anim/task_fragment_open_exit.xml
new file mode 100644
index 0000000000000..160eb84223dae
--- /dev/null
+++ b/core/res/res/anim/task_fragment_open_exit.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 6797eaffe1343..a23816e8174a8 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1692,6 +1692,10 @@
+
+
+
+
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java
index c0908a548501d..586ac1f212a17 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java
@@ -43,6 +43,7 @@ import com.android.internal.policy.AttributeCache;
import com.android.internal.policy.TransitionAnimation;
/** Animation spec for TaskFragment transition. */
+// TODO(b/206557124): provide an easier way to customize animation
class TaskFragmentAnimationSpec {
private static final String TAG = "TaskFragAnimationSpec";
@@ -179,9 +180,9 @@ class TaskFragmentAnimationSpec {
Animation loadOpenAnimation(@NonNull RemoteAnimationTarget target,
@NonNull Rect wholeAnimationBounds) {
final boolean isEnter = target.mode != MODE_CLOSING;
- final Animation animation = mTransitionAnimation.loadDefaultAnimationAttr(isEnter
- ? R.styleable.WindowAnimation_activityOpenEnterAnimation
- : R.styleable.WindowAnimation_activityOpenExitAnimation);
+ final Animation animation = mTransitionAnimation.loadDefaultAnimationRes(isEnter
+ ? com.android.internal.R.anim.task_fragment_open_enter
+ : com.android.internal.R.anim.task_fragment_open_exit);
animation.initialize(target.localBounds.width(), target.localBounds.height(),
wholeAnimationBounds.width(), wholeAnimationBounds.height());
animation.scaleCurrentDuration(mTransitionAnimationScaleSetting);
@@ -191,9 +192,9 @@ class TaskFragmentAnimationSpec {
Animation loadCloseAnimation(@NonNull RemoteAnimationTarget target,
@NonNull Rect wholeAnimationBounds) {
final boolean isEnter = target.mode != MODE_CLOSING;
- final Animation animation = mTransitionAnimation.loadDefaultAnimationAttr(isEnter
- ? R.styleable.WindowAnimation_activityCloseEnterAnimation
- : R.styleable.WindowAnimation_activityCloseExitAnimation);
+ final Animation animation = mTransitionAnimation.loadDefaultAnimationRes(isEnter
+ ? com.android.internal.R.anim.task_fragment_close_enter
+ : com.android.internal.R.anim.task_fragment_close_exit);
animation.initialize(target.localBounds.width(), target.localBounds.height(),
wholeAnimationBounds.width(), wholeAnimationBounds.height());
animation.scaleCurrentDuration(mTransitionAnimationScaleSetting);