Loading packages/SystemUI/aconfig/systemui.aconfig +8 −1 Original line number Diff line number Diff line Loading @@ -2103,3 +2103,10 @@ flag { purpose: PURPOSE_BUGFIX } } flag { name: "move_transition_animation_layer" namespace: "systemui" description: "Enables moving the launching window on top of the origin window in the Animation library." bug: "390422470" } packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +23 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import com.android.app.animation.Interpolators import com.android.internal.annotations.VisibleForTesting import com.android.internal.policy.ScreenDecorationsUtils import com.android.systemui.Flags.activityTransitionUseLargestWindow import com.android.systemui.Flags.moveTransitionAnimationLayer import com.android.systemui.Flags.translucentOccludingActivityFix import com.android.systemui.animation.TransitionAnimator.Companion.assertLongLivedReturnAnimations import com.android.systemui.animation.TransitionAnimator.Companion.assertReturnAnimations Loading Loading @@ -1514,6 +1515,20 @@ constructor( ) } if (moveTransitionAnimationLayer()) { // Ensure that the launching window is rendered above the view's window, // so it is not obstructed. // TODO(b/397180418): re-use the start transaction once the // RemoteAnimation wrapper is cleaned up. SurfaceControl.Transaction().use { it.reparent( window.leash, controller.transitionContainer.viewRootImpl.surfaceControl, ) it.apply() } } if (startTransaction != null) { // Calling applyStateToWindow() here avoids skipping a frame when taking // over an animation. Loading Loading @@ -1566,12 +1581,18 @@ constructor( } else { null } val fadeWindowBackgroundLayer = if (moveTransitionAnimationLayer()) { false } else { !controller.isBelowAnimatingWindow } animation = transitionAnimator.startAnimation( controller, endState, windowBackgroundColor, fadeWindowBackgroundLayer = !controller.isBelowAnimatingWindow, fadeWindowBackgroundLayer = fadeWindowBackgroundLayer, drawHole = !controller.isBelowAnimatingWindow, startVelocity = velocityPxPerS, startFrameTime = windowState?.timestamp ?: -1, Loading Loading @@ -1685,7 +1706,7 @@ constructor( // fade in progressively. Otherwise, it should be fully opaque and will be progressively // revealed as the window background color layer above the window fades out. val alpha = if (controller.isBelowAnimatingWindow) { if (moveTransitionAnimationLayer() || controller.isBelowAnimatingWindow) { if (controller.isLaunching) { interpolators.contentAfterFadeInInterpolator.getInterpolation( windowProgress Loading packages/SystemUI/animation/src/com/android/systemui/animation/TransitionAnimator.kt +7 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.app.animation.Interpolators.LINEAR import com.android.internal.annotations.VisibleForTesting import com.android.internal.dynamicanimation.animation.SpringAnimation import com.android.internal.dynamicanimation.animation.SpringForce import com.android.systemui.Flags.moveTransitionAnimationLayer import com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary import com.android.systemui.shared.Flags.returnAnimationFrameworkLongLived import java.util.concurrent.Executor Loading Loading @@ -509,6 +510,8 @@ class TransitionAnimator( * punching a hole in the [transition container][Controller.transitionContainer]) iff [drawHole] * is true. * * TODO(b/397646693): remove drawHole altogether. * * If [startVelocity] (expressed in pixels per second) is not null, a multi-spring animation * using it for the initial momentum will be used instead of the default interpolators. In this * case, [startFrameTime] (if non-negative) represents the frame time at which the springs Loading Loading @@ -1183,6 +1186,10 @@ class TransitionAnimator( if (drawHole) { drawable.setXfermode(SRC_MODE) } } else if (moveTransitionAnimationLayer() && fadeOutProgress >= 1 && drawHole) { // If [drawHole] is true, draw it once the opening content is done fading in. drawable.alpha = 0x00 drawable.setXfermode(SRC_MODE) } else { drawable.alpha = 0xFF } Loading packages/SystemUI/tests/goldens/backgroundAnimationTimeSeries_withFade_whenLaunching_withAnimator.json→packages/SystemUI/tests/goldens/animations/withFade_withHole_whenLaunching_withAnimator_backgroundAnimationTimeSeries.json +0 −0 File moved. View file packages/SystemUI/tests/goldens/backgroundAnimationTimeSeries_withFade_whenReturning_withAnimator.json→packages/SystemUI/tests/goldens/animations/withFade_withHole_whenLaunching_withAnimator_backgroundAnimationTimeSeries_drawHoleAfterFadeout.json +0 −0 File moved. View file Loading
packages/SystemUI/aconfig/systemui.aconfig +8 −1 Original line number Diff line number Diff line Loading @@ -2103,3 +2103,10 @@ flag { purpose: PURPOSE_BUGFIX } } flag { name: "move_transition_animation_layer" namespace: "systemui" description: "Enables moving the launching window on top of the origin window in the Animation library." bug: "390422470" }
packages/SystemUI/animation/src/com/android/systemui/animation/ActivityTransitionAnimator.kt +23 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ import com.android.app.animation.Interpolators import com.android.internal.annotations.VisibleForTesting import com.android.internal.policy.ScreenDecorationsUtils import com.android.systemui.Flags.activityTransitionUseLargestWindow import com.android.systemui.Flags.moveTransitionAnimationLayer import com.android.systemui.Flags.translucentOccludingActivityFix import com.android.systemui.animation.TransitionAnimator.Companion.assertLongLivedReturnAnimations import com.android.systemui.animation.TransitionAnimator.Companion.assertReturnAnimations Loading Loading @@ -1514,6 +1515,20 @@ constructor( ) } if (moveTransitionAnimationLayer()) { // Ensure that the launching window is rendered above the view's window, // so it is not obstructed. // TODO(b/397180418): re-use the start transaction once the // RemoteAnimation wrapper is cleaned up. SurfaceControl.Transaction().use { it.reparent( window.leash, controller.transitionContainer.viewRootImpl.surfaceControl, ) it.apply() } } if (startTransaction != null) { // Calling applyStateToWindow() here avoids skipping a frame when taking // over an animation. Loading Loading @@ -1566,12 +1581,18 @@ constructor( } else { null } val fadeWindowBackgroundLayer = if (moveTransitionAnimationLayer()) { false } else { !controller.isBelowAnimatingWindow } animation = transitionAnimator.startAnimation( controller, endState, windowBackgroundColor, fadeWindowBackgroundLayer = !controller.isBelowAnimatingWindow, fadeWindowBackgroundLayer = fadeWindowBackgroundLayer, drawHole = !controller.isBelowAnimatingWindow, startVelocity = velocityPxPerS, startFrameTime = windowState?.timestamp ?: -1, Loading Loading @@ -1685,7 +1706,7 @@ constructor( // fade in progressively. Otherwise, it should be fully opaque and will be progressively // revealed as the window background color layer above the window fades out. val alpha = if (controller.isBelowAnimatingWindow) { if (moveTransitionAnimationLayer() || controller.isBelowAnimatingWindow) { if (controller.isLaunching) { interpolators.contentAfterFadeInInterpolator.getInterpolation( windowProgress Loading
packages/SystemUI/animation/src/com/android/systemui/animation/TransitionAnimator.kt +7 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import com.android.app.animation.Interpolators.LINEAR import com.android.internal.annotations.VisibleForTesting import com.android.internal.dynamicanimation.animation.SpringAnimation import com.android.internal.dynamicanimation.animation.SpringForce import com.android.systemui.Flags.moveTransitionAnimationLayer import com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary import com.android.systemui.shared.Flags.returnAnimationFrameworkLongLived import java.util.concurrent.Executor Loading Loading @@ -509,6 +510,8 @@ class TransitionAnimator( * punching a hole in the [transition container][Controller.transitionContainer]) iff [drawHole] * is true. * * TODO(b/397646693): remove drawHole altogether. * * If [startVelocity] (expressed in pixels per second) is not null, a multi-spring animation * using it for the initial momentum will be used instead of the default interpolators. In this * case, [startFrameTime] (if non-negative) represents the frame time at which the springs Loading Loading @@ -1183,6 +1186,10 @@ class TransitionAnimator( if (drawHole) { drawable.setXfermode(SRC_MODE) } } else if (moveTransitionAnimationLayer() && fadeOutProgress >= 1 && drawHole) { // If [drawHole] is true, draw it once the opening content is done fading in. drawable.alpha = 0x00 drawable.setXfermode(SRC_MODE) } else { drawable.alpha = 0xFF } Loading
packages/SystemUI/tests/goldens/backgroundAnimationTimeSeries_withFade_whenLaunching_withAnimator.json→packages/SystemUI/tests/goldens/animations/withFade_withHole_whenLaunching_withAnimator_backgroundAnimationTimeSeries.json +0 −0 File moved. View file
packages/SystemUI/tests/goldens/backgroundAnimationTimeSeries_withFade_whenReturning_withAnimator.json→packages/SystemUI/tests/goldens/animations/withFade_withHole_whenLaunching_withAnimator_backgroundAnimationTimeSeries_drawHoleAfterFadeout.json +0 −0 File moved. View file