• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 android.car.remoteaccess;
18 
19 import android.car.remoteaccess.ICarRemoteAccessCallback;
20 
21 /** @hide */
22 interface ICarRemoteAccessService {
23     /**
24      * Adds the remote task client represented as {@link ICarRemoteAccessCallback} to listen to
25      * remote access related events.
26      */
addCarRemoteTaskClient(in ICarRemoteAccessCallback callback)27     void addCarRemoteTaskClient(in ICarRemoteAccessCallback callback);
28 
29     /**
30      * Removes the remote task client represented as {@link ICarRemoteAccessCallback} from
31      * CarRemoteAccessService.
32      */
removeCarRemoteTaskClient(in ICarRemoteAccessCallback callback)33     void removeCarRemoteTaskClient(in ICarRemoteAccessCallback callback);
34 
35     /**
36      * Tells CarRemoteAccessService that the remote task is completed.
37      *
38      * @param clientId ID of the remote task client.
39      */
reportRemoteTaskDone(in String clientId, in String taskId)40     void reportRemoteTaskDone(in String clientId, in String taskId);
41 
42     /**
43      * Sets the power state after all the remote tasks are completed.
44      *
45      * @param nextPowerState The next power state.
46      * @param runGarageMode Whether to run GarageMode.
47      */
setPowerStatePostTaskExecution(int nextPowerState, boolean runGarageMode)48     void setPowerStatePostTaskExecution(int nextPowerState, boolean runGarageMode);
49 
50     /**
51      * Tells CarRemoteAccessService that the remote task client is ready for shutdown.
52      *
53      * <p>After the allowed delay(= 5s), CarRemoteAccessService moves on to shutdown the system
54      * even without this confirmation.
55      *
56      * @param clientId ID of the remote task client.
57      */
confirmReadyForShutdown(in String clientId)58     void confirmReadyForShutdown(in String clientId);
59 }
60