blob: 94b9bc099d564f5a0b3a0ef5abf99105fc47cc1e [file] [log] [blame]
Winson Chunge2d72172018-01-25 17:46:20 +00001/*
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
17package android.view;
18
19import android.app.ActivityManager;
20import android.view.IRemoteAnimationFinishedCallback;
21import 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 */
30interface 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 */
36 ActivityManager.TaskSnapshot screenshotTask(int taskId);
37
38 /**
39 * Notifies to the system that the animation into Recents should end, and all leashes associated
40 * with remote animation targets should be relinquished. If {@param moveHomeToTop} is true, then
41 * the home activity should be moved to the top. Otherwise, the home activity is hidden and the
42 * user is returned to the app.
43 */
44 void finish(boolean moveHomeToTop);
45
46 /**
47 * Called by the handler to indicate that the recents animation input consumer should be
48 * enabled. This is currently used to work around an issue where registering an input consumer
49 * mid-animation causes the existing motion event chain to be canceled. Instead, the caller
50 * may register the recents animation input consumer prior to starting the recents animation
51 * and then enable it mid-animation to start receiving touch events.
52 */
53 void setInputConsumerEnabled(boolean enabled);
Jorim Jaggi50bf59c2018-03-09 17:29:48 +010054
55 /**
56 * Informs the system whether the animation targets passed into
57 * IRecentsAnimationRunner.onAnimationStart are currently behind the system bars. If they are,
58 * they can control the SystemUI flags, otherwise the SystemUI flags from home activity will be
59 * taken.
60 */
61 void setAnimationTargetsBehindSystemBars(boolean behindSystemBars);
Winson Chungf557c3b2018-03-16 10:55:20 -070062
63 /**
64 * Informs the system that the primary split-screen stack should be minimized.
65 */
66 void setSplitScreenMinimized(boolean minimized);
Winson Chunga840c322018-04-20 15:58:18 -070067
68 /**
69 * Hides the current input method if one is showing.
70 */
71 void hideCurrentInputMethod();
Winson Chunge2d72172018-01-25 17:46:20 +000072}