From e5a5d52d7affafdf6b950add938e5eeeebdad5e8 Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Fri, 3 Mar 2023 16:18:35 +0100 Subject: [PATCH] Add onEndCallback to ContainerAnimationRunner This CL switches the order of the last two AnimationDelegate constructor arguments in order to be able to call it with three arguments (controller, callback, listener) from java files. Bug: 247121782 Test: Manual, i.e. tested that callback is invoked after launch animation Change-Id: Idbee86b5612296f5bfd7a5f3bdf503ee1ff98ad6 --- .../android/systemui/animation/ActivityLaunchAnimator.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt index 17a94b8639d02..296c2ae5cf998 100644 --- a/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt +++ b/packages/SystemUI/animation/src/com/android/systemui/animation/ActivityLaunchAnimator.kt @@ -419,7 +419,7 @@ class ActivityLaunchAnimator( internal val delegate: AnimationDelegate init { - delegate = AnimationDelegate(controller, callback, launchAnimator, listener) + delegate = AnimationDelegate(controller, callback, listener, launchAnimator) } @BinderThread @@ -446,10 +446,10 @@ class ActivityLaunchAnimator( constructor( private val controller: Controller, private val callback: Callback, - /** The animator to use to animate the window launch. */ - private val launchAnimator: LaunchAnimator = DEFAULT_LAUNCH_ANIMATOR, /** Listener for animation lifecycle events. */ - private val listener: Listener? = null + private val listener: Listener? = null, + /** The animator to use to animate the window launch. */ + private val launchAnimator: LaunchAnimator = DEFAULT_LAUNCH_ANIMATOR ) : RemoteAnimationDelegate { private val launchContainer = controller.launchContainer private val context = launchContainer.context