blob: 973a208bf485d01f82222585d1d3097484aadf46 [file] [log] [blame]
Evan Rosky69cace42019-09-20 16:28:13 -07001/*
2 * Copyright (C) 2019 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
Evan Rosky82207082019-10-08 17:28:29 -070019import android.content.res.Configuration;
20
Evan Rosky69cace42019-09-20 16:28:13 -070021/**
22 * Interface to listen for changes to display window-containers.
23 *
Evan Rosky82207082019-10-08 17:28:29 -070024 * This differs from DisplayManager's DisplayListener in a couple ways:
Evan Rosky69cace42019-09-20 16:28:13 -070025 * - onDisplayAdded is always called after the display is actually added to the WM hierarchy.
26 * This corresponds to the DisplayContent and not the raw Dislay from DisplayManager.
Evan Rosky82207082019-10-08 17:28:29 -070027 * - onDisplayConfigurationChanged is called for all configuration changes, not just changes
28 * to displayinfo (eg. windowing-mode).
Evan Rosky69cace42019-09-20 16:28:13 -070029 *
30 * @hide
31 */
32oneway interface IDisplayWindowListener {
33
34 /**
35 * Called when a display is added to the WM hierarchy.
36 */
37 void onDisplayAdded(int displayId);
38
39 /**
Evan Rosky82207082019-10-08 17:28:29 -070040 * Called when a display's window-container configuration has changed.
41 */
42 void onDisplayConfigurationChanged(int displayId, in Configuration newConfig);
43
44 /**
Evan Rosky69cace42019-09-20 16:28:13 -070045 * Called when a display is removed from the hierarchy.
46 */
47 void onDisplayRemoved(int displayId);
48
49}