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.content.pm.UserInfo; 20 import android.car.user.UserCreationResult; 21 import android.car.user.UserRemovalResult; 22 import android.car.user.UserIdentificationAssociationResponse; 23 import android.car.user.UserSwitchResult; 24 import com.android.internal.infra.AndroidFuture; 25 import com.android.internal.os.IResultReceiver; 26 27 /** @hide */ 28 interface ICarUserService { createDriver(@ullable String name, boolean admin)29 AndroidFuture<UserCreationResult> createDriver(@nullable String name, boolean admin); createPassenger(@ullable String name, int driverId)30 UserInfo createPassenger(@nullable String name, int driverId); switchDriver(int driverId, in AndroidFuture<UserSwitchResult> receiver)31 void switchDriver(int driverId, in AndroidFuture<UserSwitchResult> receiver); switchUser(int tagerUserId, int timeoutMs, in AndroidFuture<UserSwitchResult> receiver)32 void switchUser(int tagerUserId, int timeoutMs, in AndroidFuture<UserSwitchResult> receiver); setUserSwitchUiCallback(in IResultReceiver callback)33 void setUserSwitchUiCallback(in IResultReceiver 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); removeUser(int userId)36 UserRemovalResult removeUser(int userId); getAllDrivers()37 List<UserInfo> getAllDrivers(); getPassengers(int driverId)38 List<UserInfo> getPassengers(int driverId); startPassenger(int passengerId, int zoneId)39 boolean startPassenger(int passengerId, int zoneId); stopPassenger(int passengerId)40 boolean stopPassenger(int passengerId); setLifecycleListenerForUid(in IResultReceiver listener)41 void setLifecycleListenerForUid(in IResultReceiver listener); resetLifecycleListenerForUid()42 void resetLifecycleListenerForUid(); getInitialUserInfo(int requestType, int timeoutMs, in IResultReceiver receiver)43 void getInitialUserInfo(int requestType, int timeoutMs, in IResultReceiver receiver); getUserIdentificationAssociation(in int[] types)44 UserIdentificationAssociationResponse getUserIdentificationAssociation(in int[] types); setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, in AndroidFuture<UserIdentificationAssociationResponse> result)45 void setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, 46 in AndroidFuture<UserIdentificationAssociationResponse> result); isUserHalUserAssociationSupported()47 boolean isUserHalUserAssociationSupported(); 48 } 49