1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.window;
18 
19 import android.view.RemoteAnimationTarget;
20 import android.window.IBackAnimationFinishedCallback;
21 
22 /**
23  * Interface that is used to callback from window manager to the process that runs a back gesture
24  * animation to start or cancel it.
25  *
26  * {@hide}
27  */
28 oneway interface IBackAnimationRunner {
29 
30     /**
31      * Called when the system needs to cancel the current animation. This can be due to the
32      * wallpaper not drawing in time, or the handler not finishing the animation within a predefined
33      * amount of time.
34      *
35      */
onAnimationCancelled()36     void onAnimationCancelled() = 1;
37 
38     /**
39      * Called when the system is ready for the handler to start animating all the visible tasks.
40      * @param apps The list of departing (type=MODE_CLOSING) and entering (type=MODE_OPENING)
41                    windows to animate,
42      * @param wallpapers The list of wallpapers to animate.
43      * @param nonApps The list of non-app windows such as Bubbles to animate.
44      * @param finishedCallback The callback to invoke when the animation is finished.
45      */
onAnimationStart( in RemoteAnimationTarget[] apps, in RemoteAnimationTarget[] wallpapers, in RemoteAnimationTarget[] nonApps, in IBackAnimationFinishedCallback finishedCallback)46     void onAnimationStart(
47             in RemoteAnimationTarget[] apps,
48             in RemoteAnimationTarget[] wallpapers,
49             in RemoteAnimationTarget[] nonApps,
50             in IBackAnimationFinishedCallback finishedCallback) = 2;
51 }