Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23b4cb20 authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

Add return animation functionality to TransitionAnimator.

Bug: 323863002
Flag: ACONFIG com.android.systemui.shared.return_animation_framework_library DISABLED
Test: Manually tested existing use cases with the flag on and off (same
behavior), added unit test

Change-Id: I391c6ae784871e17262649d0f17343ac87b6a6d4
parent 2947c318
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -233,6 +233,9 @@ android_library {
    resource_dirs: [
        "tests/res",
    ],
    asset_dirs: [
        "tests/goldens",
    ],
    static_libs: [
        "SystemUI-res",
        "WifiTrackerLib",
@@ -334,6 +337,8 @@ android_library {
        "androidx.test.ext.junit",
        "androidx.test.ext.truth",
        "kotlin-test",
        "platform-screenshot-diff-core",
        "PlatformMotionTesting",
        "SystemUICustomizationTestUtils",
        "androidx.compose.runtime_runtime",
    ],
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ android_library {
        "SystemUIShaderLib",
        "WindowManager-Shell-shared",
        "animationlib",
        "com_android_systemui_shared_flags_lib",
    ],

    manifest: "AndroidManifest.xml",
+1 −1
Original line number Diff line number Diff line
@@ -790,7 +790,7 @@ class ActivityTransitionAnimator(
                    controller,
                    endState,
                    windowBackgroundColor,
                    fadeOutWindowBackgroundLayer = !controller.isBelowAnimatingWindow,
                    fadeWindowBackgroundLayer = !controller.isBelowAnimatingWindow,
                    drawHole = !controller.isBelowAnimatingWindow,
                )
        }
+6 −0
Original line number Diff line number Diff line
@@ -917,6 +917,12 @@ private class AnimatedDialog(
                        endController.transitionContainer = value
                    }

                // We tell TransitionController that this is always a launch, and handle the launch
                // vs return logic internally.
                // TODO(b/323863002): maybe move the launch vs return logic out of this class and
                //     delegate it to TransitionController?
                override val isLaunching: Boolean = true

                override fun createAnimatorState(): TransitionAnimator.State {
                    return startController.createAnimatorState()
                }
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ constructor(
    private var interactionJankMonitor: InteractionJankMonitor =
        InteractionJankMonitor.getInstance(),
) : ActivityTransitionAnimator.Controller {
    override val isLaunching: Boolean = true

    /** The container to which we will add the ghost view and expanding background. */
    override var transitionContainer = ghostedView.rootView as ViewGroup
Loading