1 /* 2 * Copyright (C) 2021 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 package com.android.internal.car; 17 18 import android.annotation.NonNull; 19 import android.annotation.Nullable; 20 import android.annotation.SystemApi; 21 import android.os.Bundle; 22 import android.os.UserHandle; 23 24 import com.android.server.wm.CarActivityInterceptorUpdatable; 25 import com.android.server.wm.CarDisplayCompatScaleProviderUpdatable; 26 import com.android.server.wm.CarLaunchParamsModifierUpdatable; 27 28 import java.io.PrintWriter; 29 import java.util.function.BiConsumer; 30 31 /** 32 * Contains calls from CarServiceHelperService (which is a built-in class) to 33 * CarServiceHelperServiceUpdatableImpl (which is a updatable class as part of car-module). 34 * 35 * @hide 36 */ 37 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) 38 public interface CarServiceHelperServiceUpdatable { 39 onUserRemoved(@onNull UserHandle userHandle)40 void onUserRemoved(@NonNull UserHandle userHandle); 41 onStart()42 void onStart(); 43 dump(@onNull PrintWriter pw, @Nullable String[] args)44 void dump(@NonNull PrintWriter pw, @Nullable String[] args); 45 sendUserLifecycleEvent(int eventType, @Nullable UserHandle userFrom, @NonNull UserHandle userTo)46 void sendUserLifecycleEvent(int eventType, @Nullable UserHandle userFrom, 47 @NonNull UserHandle userTo); 48 onFactoryReset(@onNull BiConsumer<Integer, Bundle> processFactoryReset)49 void onFactoryReset(@NonNull BiConsumer<Integer, Bundle> processFactoryReset); 50 getCarLaunchParamsModifierUpdatable()51 CarLaunchParamsModifierUpdatable getCarLaunchParamsModifierUpdatable(); 52 getCarActivityInterceptorUpdatable()53 CarActivityInterceptorUpdatable getCarActivityInterceptorUpdatable(); 54 55 /** 56 * @return updatable implemtantion of CarDisplayCompatScaleProvider 57 */ getCarDisplayCompatScaleProviderUpdatable()58 CarDisplayCompatScaleProviderUpdatable getCarDisplayCompatScaleProviderUpdatable(); 59 60 /** 61 * Notifies CarService that a Window focus is changed. 62 */ notifyFocusChanged(int pid, int uid)63 void notifyFocusChanged(int pid, int uid); 64 } 65