Debian Codegraph @

core/java/android/window/ITaskOrganizerController.aidl

raw
1 /**
2 * Copyright (c) 2020, 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.window;
18
19 import android.app.ActivityManager;
20 import android.content.pm.ParceledListSlice;
21 import android.window.ITaskOrganizer;
22 import android.window.TaskAppearedInfo;
23 import android.window.WindowContainerToken;
24 import android.window.WindowContainerTransaction;
25
26 /** @hide */
27 interface ITaskOrganizerController {
28
29 /**
30 * Register a TaskOrganizer to manage all the tasks with supported windowing modes.
31 *
32 * @return a list of the tasks that should be managed by the organizer, not including tasks
33 * created via {@link #createRootTask}.
34 */
35 ParceledListSlice<TaskAppearedInfo> registerTaskOrganizer(ITaskOrganizer organizer);
36
37 /**
38 * Unregisters a previously registered task organizer.
39 */
40 void unregisterTaskOrganizer(ITaskOrganizer organizer);
41
42 /** Creates a persistent root task in WM for a particular windowing-mode. */
43 void createRootTask(int displayId, int windowingMode, IBinder launchCookie);
44
45 /** Deletes a persistent root task in WM */
46 boolean deleteRootTask(in WindowContainerToken task);
47
48 /** Gets direct child tasks (ordered from top-to-bottom) */
49 List<ActivityManager.RunningTaskInfo> getChildTasks(in WindowContainerToken parent,
50 in int[] activityTypes);
51
52 /** Gets all root tasks on a display (ordered from top-to-bottom) */
53 List<ActivityManager.RunningTaskInfo> getRootTasks(int displayId, in int[] activityTypes);
54
55 /** Get the {@link WindowContainerToken} of the task which contains the current ime target */
56 WindowContainerToken getImeTarget(int display);
57
58 /**
59 * Requests that the given task organizer is notified when back is pressed on the root activity
60 * of one of its controlled tasks.
61 */
62 void setInterceptBackPressedOnTaskRoot(in WindowContainerToken task,
63 boolean interceptBackPressed);
64
65 /**
66 * Restarts the top activity in the given task by killing its process if it is visible.
67 */
68 void restartTaskTopActivityProcessIfVisible(in WindowContainerToken task);
69
70 /** Updates a state of camera compat control for stretched issues in the viewfinder. */
71 void updateCameraCompatControlState(in WindowContainerToken task, int state);
72
73 /**
74 * Controls whether ignore orientation request logic in {@link
75 * com.android.server.wm.DisplayArea} is disabled at runtime.
76 *
77 * @param isDisabled when {@code true}, the system always ignores the value of {@link
78 * com.android.server.wm.DisplayArea#getIgnoreOrientationRequest} and app
79 * requested orientation is respected.
80 */
81 void setIsIgnoreOrientationRequestDisabled(boolean isDisabled);
82 }