1 /* 2 * Copyright (C) 2022 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.car.carlauncher; 18 19 /** 20 * A callback interface for the host activity that uses {@link CarTaskView} and its derivatives. 21 */ 22 interface CarTaskViewCallbacks { 23 /** 24 * Called when the underlying {@link CarTaskView} instance is created. 25 * 26 * @param taskView the new newly created {@link CarTaskView} instance. 27 */ onTaskViewCreated(CarTaskView taskView)28 void onTaskViewCreated(CarTaskView taskView); 29 30 /** 31 * Called when the underlying {@link CarTaskView} is ready. A {@link CarTaskView} can be 32 * considered ready when it has completed all the set up that is required. 33 * This callback is only triggered once. 34 * 35 * For {@link LaunchRootCarTaskView}, this is called once the launch root task has been 36 * fully set up. 37 * For {@link SemiControlledCarTaskView} & {@link ControlledCarTaskView} this is called when 38 * the surface is created. 39 */ onTaskViewReady()40 void onTaskViewReady(); 41 } 42 43 44