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 | |
| 19 | import android.app.ActivityManager; |
| 20 | import android.view.IRemoteAnimationFinishedCallback; |
| 21 | import android.graphics.GraphicBuffer; |
| 22 | |
| 23 | /** |
| 24 | * Passed to the {@link IRecentsAnimationRunner} in order for the runner to control to let the |
| 25 | * runner control certain aspects of the recents animation, and to notify window manager when the |
| 26 | * animation has completed. |
| 27 | * |
| 28 | * {@hide} |
| 29 | */ |
| 30 | interface IRecentsAnimationController { |
| 31 | |
| 32 | /** |
| 33 | * Takes a screenshot of the task associated with the given {@param taskId}. Only valid for the |
| 34 | * current set of task ids provided to the handler. |
| 35 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 36 | @UnsupportedAppUsage |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 37 | ActivityManager.TaskSnapshot screenshotTask(int taskId); |
| 38 | |
| 39 | /** |
| 40 | * Notifies to the system that the animation into Recents should end, and all leashes associated |
| 41 | * with remote animation targets should be relinquished. If {@param moveHomeToTop} is true, then |
| 42 | * the home activity should be moved to the top. Otherwise, the home activity is hidden and the |
| 43 | * user is returned to the app. |
| 44 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 45 | @UnsupportedAppUsage |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 46 | void finish(boolean moveHomeToTop); |
| 47 | |
| 48 | /** |
| 49 | * Called by the handler to indicate that the recents animation input consumer should be |
| 50 | * enabled. This is currently used to work around an issue where registering an input consumer |
| 51 | * mid-animation causes the existing motion event chain to be canceled. Instead, the caller |
| 52 | * may register the recents animation input consumer prior to starting the recents animation |
| 53 | * and then enable it mid-animation to start receiving touch events. |
| 54 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 55 | @UnsupportedAppUsage |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 56 | void setInputConsumerEnabled(boolean enabled); |
Jorim Jaggi | 50bf59c | 2018-03-09 17:29:48 +0100 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * Informs the system whether the animation targets passed into |
| 60 | * IRecentsAnimationRunner.onAnimationStart are currently behind the system bars. If they are, |
| 61 | * they can control the SystemUI flags, otherwise the SystemUI flags from home activity will be |
| 62 | * taken. |
| 63 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 64 | @UnsupportedAppUsage |
Jorim Jaggi | 50bf59c | 2018-03-09 17:29:48 +0100 | [diff] [blame] | 65 | void setAnimationTargetsBehindSystemBars(boolean behindSystemBars); |
Winson Chung | f557c3b | 2018-03-16 10:55:20 -0700 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * Informs the system that the primary split-screen stack should be minimized. |
| 69 | */ |
| 70 | void setSplitScreenMinimized(boolean minimized); |
Winson Chung | a840c32 | 2018-04-20 15:58:18 -0700 | [diff] [blame] | 71 | |
| 72 | /** |
| 73 | * Hides the current input method if one is showing. |
| 74 | */ |
| 75 | void hideCurrentInputMethod(); |
Winson Chung | e2d7217 | 2018-01-25 17:46:20 +0000 | [diff] [blame] | 76 | } |