1 package com.android.systemui.animation 2 3 import android.annotation.UiThread 4 import android.view.IRemoteAnimationFinishedCallback 5 import android.view.RemoteAnimationTarget 6 import android.view.WindowManager 7 8 /** 9 * A component capable of running remote animations. 10 * 11 * Expands the IRemoteAnimationRunner API by allowing for different types of more specialized 12 * callbacks. 13 */ 14 interface RemoteAnimationDelegate<in T : IRemoteAnimationFinishedCallback> { 15 /** 16 * Called on the UI thread when the animation targets are received. Sets up and kicks off the 17 * animation. 18 */ 19 @UiThread onAnimationStartnull20 fun onAnimationStart( 21 @WindowManager.TransitionOldType transit: Int, 22 apps: Array<out RemoteAnimationTarget>?, 23 wallpapers: Array<out RemoteAnimationTarget>?, 24 nonApps: Array<out RemoteAnimationTarget>?, 25 callback: T? 26 ) 27 28 /** Called on the UI thread when a signal is received to cancel the animation. */ 29 @UiThread fun onAnimationCancelled() 30 } 31