• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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.car.app;
18 
19 import android.annotation.NonNull;
20 import android.car.annotation.ApiRequirements;
21 
22 /**
23  * A callback interface for {@link ControlledRemoteCarTaskView}.
24  *
25  * @hide
26  */
27 public interface RemoteCarRootTaskViewCallback
28         extends RemoteCarTaskViewCallback<RemoteCarRootTaskView> {
29     /**
30      * Called when the underlying {@link RemoteCarTaskView} instance is created.
31      *
32      * @param taskView the new newly created {@link RemoteCarTaskView} instance.
33      */
34     @ApiRequirements(minCarVersion = ApiRequirements.CarVersion.UPSIDE_DOWN_CAKE_1,
35             minPlatformVersion = ApiRequirements.PlatformVersion.UPSIDE_DOWN_CAKE_1)
36     @Override
onTaskViewCreated(@onNull RemoteCarRootTaskView taskView)37     default void onTaskViewCreated(@NonNull RemoteCarRootTaskView taskView) {}
38 
39     /**
40      * Called when the underlying {@link RemoteCarTaskView} is ready. A {@link RemoteCarTaskView}
41      * is considered ready when it has completed all the set up that is required.
42      * This callback is only triggered once.
43      */
44     @ApiRequirements(minCarVersion = ApiRequirements.CarVersion.UPSIDE_DOWN_CAKE_1,
45             minPlatformVersion = ApiRequirements.PlatformVersion.UPSIDE_DOWN_CAKE_1)
46     @Override
onTaskViewInitialized()47     default void onTaskViewInitialized() {}
48 
49     /**
50      * Called when the underlying {@link RemoteCarTaskView} is released.
51      * This callback is only triggered once.
52      */
53     @ApiRequirements(minCarVersion = ApiRequirements.CarVersion.UPSIDE_DOWN_CAKE_1,
54             minPlatformVersion = ApiRequirements.PlatformVersion.UPSIDE_DOWN_CAKE_1)
55     @Override
onTaskViewReleased()56     default void onTaskViewReleased() {}
57 }
58