blob: 9d2758a6b9e273b301130f50a732b0e73d5ea311 [file] [log] [blame]
Wale Ogunwale26c0dfe2016-12-14 14:42:30 -08001/*
2 * Copyright (C) 2016 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 com.android.server.wm;
18
19/** Interface used by the creator of the controller to listen to changes with the container. */
20public interface AppWindowContainerListener extends WindowContainerListener {
21 /** Called when the windows associated app window container are drawn. */
Sudheer Shankac766db02017-06-12 10:37:29 -070022 void onWindowsDrawn(long timestamp);
Vishnu Nairc1d2ff62018-11-08 16:50:12 -080023 /** Called when the windows associated app window container are no longer drawn. */
24 default void onWindowsNotDrawn(long timestamp) {}
Wale Ogunwale26c0dfe2016-12-14 14:42:30 -080025 /** Called when the windows associated app window container are visible. */
26 void onWindowsVisible();
27 /** Called when the windows associated app window container are no longer visible. */
28 void onWindowsGone();
Jorim Jaggi3878ca32017-02-02 17:13:05 -080029
30 /**
31 * Called when the starting window for this container is drawn.
32 */
Sudheer Shankac766db02017-06-12 10:37:29 -070033 void onStartingWindowDrawn(long timestamp);
Jorim Jaggi3878ca32017-02-02 17:13:05 -080034
Wale Ogunwale26c0dfe2016-12-14 14:42:30 -080035 /**
36 * Called when the key dispatching to a window associated with the app window container
37 * timed-out.
Wale Ogunwale7402ddf2017-03-29 12:58:24 -070038 *
39 * @param reason The reason for the key dispatching time out.
40 * @param windowPid The pid of the window key dispatching timed out on.
41 * @return True if input dispatching should be aborted.
Wale Ogunwale26c0dfe2016-12-14 14:42:30 -080042 */
Wale Ogunwale7402ddf2017-03-29 12:58:24 -070043 boolean keyDispatchingTimedOut(String reason, int windowPid);
Wale Ogunwale26c0dfe2016-12-14 14:42:30 -080044}