• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 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;
18 
19 import android.os.UserHandle;
20 import android.car.user.UserCreationResult;
21 import android.car.user.UserLifecycleEventFilter;
22 import android.car.user.UserRemovalResult;
23 import android.car.user.UserIdentificationAssociationResponse;
24 import android.car.user.UserSwitchResult;
25 
26 import android.car.ICarResultReceiver;
27 import android.car.util.concurrent.AndroidFuture;
28 
29 /** @hide */
30 interface ICarUserService {
switchUser(int targetUserId, int timeoutMs, in AndroidFuture<UserSwitchResult> receiver)31     void switchUser(int targetUserId, int timeoutMs, in AndroidFuture<UserSwitchResult> receiver);
logoutUser(int timeoutMs, in AndroidFuture<UserSwitchResult> receiver)32     void logoutUser(int timeoutMs, in AndroidFuture<UserSwitchResult> receiver);
setUserSwitchUiCallback(in ICarResultReceiver callback)33     void setUserSwitchUiCallback(in ICarResultReceiver callback);
createUser(@ullable String name, String userType, int flags, int timeoutMs, in AndroidFuture<UserCreationResult> receiver)34     void createUser(@nullable String name, String userType, int flags, int timeoutMs,
35       in AndroidFuture<UserCreationResult> receiver);
updatePreCreatedUsers()36     void updatePreCreatedUsers();
removeUser(int userId, in AndroidFuture<UserRemovalResult> receiver)37     void removeUser(int userId, in AndroidFuture<UserRemovalResult> receiver);
setLifecycleListenerForApp(String pkgName, in UserLifecycleEventFilter filter, in ICarResultReceiver listener)38     void setLifecycleListenerForApp(String pkgName, in UserLifecycleEventFilter filter,
39       in ICarResultReceiver listener);
resetLifecycleListenerForApp(in ICarResultReceiver listener)40     void resetLifecycleListenerForApp(in ICarResultReceiver listener);
getUserIdentificationAssociation(in int[] types)41     UserIdentificationAssociationResponse getUserIdentificationAssociation(in int[] types);
setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, in AndroidFuture<UserIdentificationAssociationResponse> result)42     void setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values,
43       in AndroidFuture<UserIdentificationAssociationResponse> result);
isUserHalUserAssociationSupported()44     boolean isUserHalUserAssociationSupported();
45 }
46