1 /* 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 17 package com.android.server.wm; 18 19 /** Interface used by the creator of the controller to listen to changes with the container. */ 20 public interface AppWindowContainerListener extends WindowContainerListener { 21 /** Called when the windows associated app window container are drawn. */ onWindowsDrawn(long timestamp)22 void onWindowsDrawn(long timestamp); 23 /** Called when the windows associated app window container are visible. */ onWindowsVisible()24 void onWindowsVisible(); 25 /** Called when the windows associated app window container are no longer visible. */ onWindowsGone()26 void onWindowsGone(); 27 28 /** 29 * Called when the starting window for this container is drawn. 30 */ onStartingWindowDrawn(long timestamp)31 void onStartingWindowDrawn(long timestamp); 32 33 /** 34 * Called when the key dispatching to a window associated with the app window container 35 * timed-out. 36 * 37 * @param reason The reason for the key dispatching time out. 38 * @param windowPid The pid of the window key dispatching timed out on. 39 * @return True if input dispatching should be aborted. 40 */ keyDispatchingTimedOut(String reason, int windowPid)41 boolean keyDispatchingTimedOut(String reason, int windowPid); 42 } 43