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