| 1 |
/* |
| 2 |
* Copyright (C) 2018 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.view; |
| 18 |
|
| 19 |
import android.app.ActivityManager; |
| 20 |
import android.graphics.Rect; |
| 21 |
import android.view.RemoteAnimationTarget; |
| 22 |
import android.view.IRecentsAnimationController; |
| 23 |
import android.window.TaskSnapshot; |
| 24 |
|
| 25 |
/** |
| 26 |
* Interface that is used to callback from window manager to the process that runs a recents |
| 27 |
* animation to start or cancel it. |
| 28 |
* |
| 29 |
* {@hide} |
| 30 |
*/ |
| 31 |
oneway interface IRecentsAnimationRunner { |
| 32 |
|
| 33 |
/** |
| 34 |
* Called when the system needs to cancel the current animation. This can be due to the |
| 35 |
* wallpaper not drawing in time, or the handler not finishing the animation within a predefined |
| 36 |
* amount of time. |
| 37 |
* |
| 38 |
* @param taskIds Indicates tasks with cancelling snapshot. |
| 39 |
* @param taskSnapshots If the snapshots is null, the animation will be cancelled and the leash |
| 40 |
* will be inactive immediately. Otherwise, the contents of the tasks will |
| 41 |
* be replaced with {@param taskSnapshots}, such that the runner's leash is |
| 42 |
* still active. As soon as the runner doesn't need the leash anymore, it |
| 43 |
* must call {@link IRecentsAnimationController#cleanupScreenshot). |
| 44 |
* |
| 45 |
* @see {@link RecentsAnimationController#cleanupScreenshot} |
| 46 |
*/ |
| 47 |
void onAnimationCanceled(in @nullable int[] taskIds, |
| 48 |
in @nullable TaskSnapshot[] taskSnapshots) = 1; |
| 49 |
|
| 50 |
/** |
| 51 |
* Called when the system is ready for the handler to start animating all the visible tasks. |
| 52 |
* |
| 53 |
* @param homeContentInsets The current home app content insets |
| 54 |
* @param minimizedHomeBounds Specifies the bounds of the minimized home app, will be |
| 55 |
* {@code null} if the device is not currently in split screen |
| 56 |
*/ |
| 57 |
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) |
| 58 |
void onAnimationStart(in IRecentsAnimationController controller, |
| 59 |
in RemoteAnimationTarget[] apps, in RemoteAnimationTarget[] wallpapers, |
| 60 |
in Rect homeContentInsets, in Rect minimizedHomeBounds) = 2; |
| 61 |
|
| 62 |
/** |
| 63 |
* Called when the task of an activity that has been started while the recents animation |
| 64 |
* was running becomes ready for control. |
| 65 |
*/ |
| 66 |
void onTasksAppeared(in RemoteAnimationTarget[] app) = 3; |
| 67 |
} |