1 /* 2 * Copyright (C) 2020 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 com.android.car.internal; 18 19 import android.car.ICarResultReceiver; 20 import android.os.UserHandle; 21 import android.content.ComponentName; 22 23 24 /** 25 * API to communicate from CarServiceHelperService to car service. 26 */ 27 oneway interface ICarSystemServerClient { 28 /** 29 * Notify of user lifecycle events. 30 * 31 * @param eventType - type as defined by CarUserManager.UserLifecycleEventType 32 * @param fromUserId - user id of previous user when type is SWITCHING (or UserHandle.USER_NULL) 33 * @param toUserId - user id of new user. 34 */ onUserLifecycleEvent(int eventType, int fromUserId, int toUserId)35 void onUserLifecycleEvent(int eventType, int fromUserId, int toUserId); 36 37 /** 38 * Notify that the device must be factory reset, so CarService can ask user to confirm. 39 * 40 * @param callback used to trigger the factory reset. 41 */ onFactoryReset(ICarResultReceiver callback)42 void onFactoryReset(ICarResultReceiver callback); 43 44 /** 45 * Initial user is decided by HAL and information is saved in CarUserService. It is possible 46 * that car service may crash and this information will be lost. To avoid this situation, 47 * initial user information is saved in System Service using 48 * {@link ICarServiceHelper.sendInitialUser}. If car service reconnects after crash, then this 49 * call will set the initial user information in CarUserService. 50 */ setInitialUser(in UserHandle user)51 void setInitialUser(in UserHandle user); 52 notifyFocusChanged(int pid, int uid)53 void notifyFocusChanged(int pid, int uid); 54 } 55