Debian Codegraph @

core/java/android/window/IDisplayAreaOrganizerController.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.content.pm.ParceledListSlice;
20 import android.window.DisplayAreaAppearedInfo;
21 import android.window.IDisplayAreaOrganizer;
22 import android.window.WindowContainerToken;
23
24 /** @hide */
25 interface IDisplayAreaOrganizerController {
26
27 /**
28 * Registers a DisplayAreaOrganizer to manage display areas for a given feature. A feature can
29 * not be registered by multiple organizers at the same time.
30 *
31 * @return a list of display areas that should be managed by the organizer.
32 * @throws IllegalStateException if the feature has already been registered.
33 */
34 ParceledListSlice<DisplayAreaAppearedInfo> registerOrganizer(in IDisplayAreaOrganizer organizer,
35 int displayAreaFeature);
36
37 /**
38 * Unregisters a previously registered display area organizer.
39 */
40 void unregisterOrganizer(in IDisplayAreaOrganizer organizer);
41
42 /**
43 * Creates a persistent {@link com.android.server.wm.TaskDisplayArea}.
44 *
45 * The new created TDA is organized by the organizer, and will be deleted on calling
46 * {@link #deleteTaskDisplayArea(WindowContainerToken)} or {@link #unregisterOrganizer()}.
47 *
48 * @param displayId the display to create the new TDA in.
49 * @param parentFeatureId the parent to create the new TDA in. If it is a
50 * {@link com.android.server.wm.RootDisplayArea}, the new TDA will be
51 * placed as the topmost TDA. If it is another TDA, the new TDA will be
52 * placed as the topmost child.
53 * Caller can use {@link #FEATURE_ROOT} as the root of the logical
54 * display, or {@link #FEATURE_DEFAULT_TASK_CONTAINER} as the default
55 * TDA.
56 * @param name the name for the new task display area.
57 * @return the new created task display area.
58 * @throws IllegalArgumentException if failed to create a new task display area.
59 */
60 DisplayAreaAppearedInfo createTaskDisplayArea(in IDisplayAreaOrganizer organizer, int displayId,
61 int parentFeatureId, in String name);
62
63 /**
64 * Deletes a persistent task display area. It can only be one that created by an organizer.
65 *
66 * @throws IllegalArgumentException if failed to delete the task display area.
67 */
68 void deleteTaskDisplayArea(in WindowContainerToken taskDisplayArea);
69 }