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.UserCreationRequest; 21 import android.car.user.UserCreationResult; 22 import android.car.user.UserIdentificationAssociationResponse; 23 import android.car.user.UserLifecycleEventFilter; 24 import android.car.user.UserRemovalResult; 25 import android.car.user.UserStartRequest; 26 import android.car.user.UserStartResponse; 27 import android.car.user.UserStopRequest; 28 import android.car.user.UserStopResponse; 29 import android.car.user.UserSwitchResult; 30 import android.car.ICarResultReceiver; 31 import android.car.util.concurrent.AndroidFuture; 32 33 import com.android.car.internal.ResultCallbackImpl; 34 35 /** @hide */ 36 interface ICarUserService { switchUser(int targetUserId, int timeoutMs, in ResultCallbackImpl<UserSwitchResult> callback, boolean ignoreUxRestriction)37 void switchUser(int targetUserId, int timeoutMs, 38 in ResultCallbackImpl<UserSwitchResult> callback, boolean ignoreUxRestriction); logoutUser(int timeoutMs, in ResultCallbackImpl<UserSwitchResult> callback)39 void logoutUser(int timeoutMs, in ResultCallbackImpl<UserSwitchResult> callback); setUserSwitchUiCallback(in ICarResultReceiver callback)40 void setUserSwitchUiCallback(in ICarResultReceiver callback); createUser(in UserCreationRequest userCreationRequest, int timeoutMs, in ResultCallbackImpl<UserCreationResult> callback)41 void createUser(in UserCreationRequest userCreationRequest, int timeoutMs, 42 in ResultCallbackImpl<UserCreationResult> callback); startUser(in UserStartRequest request, in ResultCallbackImpl<UserStartResponse> callback)43 void startUser(in UserStartRequest request, in ResultCallbackImpl<UserStartResponse> callback); stopUser(in UserStopRequest request, in ResultCallbackImpl<UserStopResponse> callback)44 void stopUser(in UserStopRequest request, in ResultCallbackImpl<UserStopResponse> callback); removeUser(int userId, in ResultCallbackImpl<UserRemovalResult> callback)45 void removeUser(int userId, in ResultCallbackImpl<UserRemovalResult> callback); setLifecycleListenerForApp(String pkgName, in UserLifecycleEventFilter filter, in ICarResultReceiver listener)46 void setLifecycleListenerForApp(String pkgName, in UserLifecycleEventFilter filter, 47 in ICarResultReceiver listener); resetLifecycleListenerForApp(in ICarResultReceiver listener)48 void resetLifecycleListenerForApp(in ICarResultReceiver listener); getUserIdentificationAssociation(in int[] types)49 UserIdentificationAssociationResponse getUserIdentificationAssociation(in int[] types); setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, in AndroidFuture<UserIdentificationAssociationResponse> result)50 void setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, 51 in AndroidFuture<UserIdentificationAssociationResponse> result); isUserHalUserAssociationSupported()52 boolean isUserHalUserAssociationSupported(); 53 } 54