diff options
| author | 2024-11-22 12:52:20 +0000 | |
|---|---|---|
| committer | 2024-11-22 12:52:20 +0000 | |
| commit | a4723845561b8395cd16c7441646c56a9e66430e (patch) | |
| tree | 5cfa83d9013a461501d80e8c88add60e66cbdbef | |
| parent | 892bbff37201c46cc0cd77a99a3d1c350edeaa97 (diff) | |
Only enforce return animations when going to Launcher.
This was discussed with UX, and we came to the conclusion that
cross-task animation should use the default as it ensures a better
visual cue that the closing window is going to the background.
Bug: 323863002
Flag: com.android.systemui.shared.return_animation_framework_library
Flag: com.android.systemui.shared.return_animation_framework_long_lived
Test: manual
Change-Id: Idaa649a3eacfb0d045e4163b02312cbcffcd91d7
| -rw-r--r-- | packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt index f1cbba7272b0..38f09988e7a7 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt @@ -702,6 +702,8 @@ constructor( object : Controller by controller { override val isLaunching: Boolean = false } + // Cross-task close transitions should not use this animation, so we only register it for + // when the opening window is Launcher. val returnFilter = TransitionFilter().apply { mRequirements = @@ -710,7 +712,11 @@ constructor( mActivityType = WindowConfiguration.ACTIVITY_TYPE_STANDARD mModes = intArrayOf(TRANSIT_CLOSE, TRANSIT_TO_BACK) mTopActivity = component - } + }, + TransitionFilter.Requirement().apply { + mActivityType = WindowConfiguration.ACTIVITY_TYPE_HOME + mModes = intArrayOf(TRANSIT_OPEN, TRANSIT_TO_FRONT) + }, ) } val returnRemoteTransition = |