blob: 5d5956e4dca4d9200e416c9adcaf09b9851796e2 [file] [log] [blame]
Evan Rosky0037e5f2019-11-05 10:26:24 -08001/**
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
17package android.app;
18
19import android.app.ActivityManager;
20import android.view.ITaskOrganizer;
21import android.view.IWindowContainer;
22import android.view.WindowContainerTransaction;
23
24/** @hide */
25interface ITaskOrganizerController {
26
27 /**
28 * Register a TaskOrganizer to manage tasks as they enter the given windowing mode.
29 * If there was already a TaskOrganizer for this windowing mode it will be evicted
30 * and receive taskVanished callbacks in the process.
31 */
32 void registerTaskOrganizer(ITaskOrganizer organizer, int windowingMode);
33
Robert Carre10ee3d2019-11-11 15:03:15 -080034 /**
35 * Apply multiple WindowContainer operations at once.
36 * @param organizer If non-null this transaction will use the synchronization
37 * scheme described in BLASTSyncEngine.java. The SurfaceControl transaction
38 * containing the effects of this WindowContainer transaction will be passed
39 * to the organizers Transaction ready callback. If null the transaction
40 * will apply with non particular synchronization constraints (other than
41 * it will all apply at once).
42 * @return If organizer was non-null returns an ID for the sync operation which will
43 * later be passed to transactionReady. This lets TaskOrganizer implementations
44 * differentiate overlapping sync operations.
45 */
46 int applyContainerTransaction(in WindowContainerTransaction t, ITaskOrganizer organizer);
Evan Rosky0037e5f2019-11-05 10:26:24 -080047
48 /** Creates a persistent root task in WM for a particular windowing-mode. */
49 ActivityManager.RunningTaskInfo createRootTask(int displayId, int windowingMode);
50
51 /** Deletes a persistent root task in WM */
52 boolean deleteRootTask(IWindowContainer task);
53
Evan Roskya8fde152020-01-07 19:09:13 -080054 /** Gets direct child tasks (ordered from top-to-bottom) */
55 List<ActivityManager.RunningTaskInfo> getChildTasks(in IWindowContainer parent);
56
Evan Rosky0037e5f2019-11-05 10:26:24 -080057 /** Get the root task which contains the current ime target */
58 IWindowContainer getImeTarget(int display);
59
60 /**
61 * Set's the root task to launch new tasks into on a display. {@code null} means no launch root
62 * and thus new tasks just end up directly on the display.
63 */
64 void setLaunchRoot(int displayId, in IWindowContainer root);
65}