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.graphics.Rect; 20 import android.view.RemoteAnimationTarget; 21 import android.view.IRecentsAnimationController; 22 23 /** 24 * Interface that is used to callback from window manager to the process that runs a recents 25 * animation to start or cancel it. 26 * 27 * {@hide} 28 */ 29 oneway interface IRecentsAnimationRunner { 30 31 /** 32 * Called when the system needs to cancel the current animation. This can be due to the 33 * wallpaper not drawing in time, or the handler not finishing the animation within a predefined 34 * amount of time. 35 * 36 * @param deferredWithScreenshot If set to {@code true}, the contents of the task will be 37 * replaced with a screenshot, such that the runner's leash is 38 * still active. As soon as the runner doesn't need the leash 39 * anymore, it must call 40 * {@link IRecentsAnimationController#cleanupScreenshot). 41 * 42 * @see {@link RecentsAnimationController#cleanupScreenshot} 43 */ 44 @UnsupportedAppUsage onAnimationCanceled(boolean deferredWithScreenshot)45 void onAnimationCanceled(boolean deferredWithScreenshot) = 1; 46 47 /** 48 * Called when the system is ready for the handler to start animating all the visible tasks. 49 * 50 * @param homeContentInsets The current home app content insets 51 * @param minimizedHomeBounds Specifies the bounds of the minimized home app, will be 52 * {@code null} if the device is not currently in split screen 53 */ 54 @UnsupportedAppUsage onAnimationStart(in IRecentsAnimationController controller, in RemoteAnimationTarget[] apps, in Rect homeContentInsets, in Rect minimizedHomeBounds)55 void onAnimationStart(in IRecentsAnimationController controller, 56 in RemoteAnimationTarget[] apps, in Rect homeContentInsets, 57 in Rect minimizedHomeBounds) = 2; 58 } 59