Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 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 | |
Tracy Zhou | 8089ffa | 2019-07-30 17:30:43 -0700 | [diff] [blame] | 19 | import android.app.ActivityManager; |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 20 | import android.graphics.Rect; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 21 | import android.view.RemoteAnimationTarget; |
| 22 | import android.view.IRecentsAnimationController; |
| 23 | |
| 24 | /** |
| 25 | * Interface that is used to callback from window manager to the process that runs a recents |
| 26 | * animation to start or cancel it. |
| 27 | * |
| 28 | * {@hide} |
| 29 | */ |
| 30 | oneway interface IRecentsAnimationRunner { |
| 31 | |
| 32 | /** |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 33 | * Called when the system needs to cancel the current animation. This can be due to the |
| 34 | * wallpaper not drawing in time, or the handler not finishing the animation within a predefined |
| 35 | * amount of time. |
lumark | 5428446 | 2019-03-05 20:44:27 +0800 | [diff] [blame] | 36 | * |
Tracy Zhou | 8089ffa | 2019-07-30 17:30:43 -0700 | [diff] [blame] | 37 | * @param taskSnapshot If the snapshot is null, the animation will be cancelled and the leash |
| 38 | * will be inactive immediately. Otherwise, the contents of the task will be |
| 39 | * replaced with {@param taskSnapshot}, such that the runner's leash is |
| 40 | * still active. As soon as the runner doesn't need the leash anymore, it |
| 41 | * must call {@link IRecentsAnimationController#cleanupScreenshot). |
lumark | 5428446 | 2019-03-05 20:44:27 +0800 | [diff] [blame] | 42 | * |
| 43 | * @see {@link RecentsAnimationController#cleanupScreenshot} |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 44 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 45 | @UnsupportedAppUsage |
Tracy Zhou | 8089ffa | 2019-07-30 17:30:43 -0700 | [diff] [blame] | 46 | void onAnimationCanceled(in @nullable ActivityManager.TaskSnapshot taskSnapshot) = 1; |
Winson Chung | 584d652 | 2018-02-07 23:57:38 +0000 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Called when the system is ready for the handler to start animating all the visible tasks. |
| 50 | * |
| 51 | * @param homeContentInsets The current home app content insets |
| 52 | * @param minimizedHomeBounds Specifies the bounds of the minimized home app, will be |
| 53 | * {@code null} if the device is not currently in split screen |
| 54 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 55 | @UnsupportedAppUsage |
Winson Chung | 6802e2a | 2018-04-19 16:45:21 -0700 | [diff] [blame] | 56 | void onAnimationStart(in IRecentsAnimationController controller, |
Winson Chung | d585219 | 2019-09-06 17:20:28 -0700 | [diff] [blame^] | 57 | in RemoteAnimationTarget[] apps, in RemoteAnimationTarget[] wallpapers, |
| 58 | in Rect homeContentInsets, in Rect minimizedHomeBounds) = 2; |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 59 | } |