1 /* 2 * Copyright (C) 2017 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.content.ComponentName; 20 import android.content.pm.UserInfo; 21 22 import java.util.List; 23 24 /** 25 * Helper API for car service. Only for interaction between system server and car service. 26 */ 27 interface ICarServiceHelper { forceSuspend(int timeoutMs)28 int forceSuspend(int timeoutMs); 29 /** 30 * Check 31 * {@link com.android.server.wm.CarLaunchParamsModifier#setDisplayAllowlistForUser(int, int[]). 32 */ setDisplayAllowlistForUser(int userId, in int[] displayIds)33 void setDisplayAllowlistForUser(int userId, in int[] displayIds); 34 35 /** 36 * Check 37 * {@link com.android.server.wm.CarLaunchParamsModifier#setPassengerDisplays(int[])}. 38 */ setPassengerDisplays(in int[] displayIds)39 void setPassengerDisplays(in int[] displayIds); 40 41 /** 42 * Check 43 * {@link com.android.server.wm.CarLaunchParamsModifier#setSourcePreferredComponents( 44 * boolean, List<ComponentName>)}. 45 */ setSourcePreferredComponents( boolean enableSourcePreferred, in List<ComponentName> sourcePreferredComponents)46 void setSourcePreferredComponents( 47 boolean enableSourcePreferred, in List<ComponentName> sourcePreferredComponents); 48 49 /** 50 * Sets whether it's safe to run operations (like DevicePolicyManager.lockNow()). 51 */ setSafetyMode(boolean safe)52 void setSafetyMode(boolean safe); 53 54 /** 55 * Creates the given user, even when it's disallowed by DevicePolicyManager. 56 */ createUserEvenWhenDisallowed(String name, String userType, int flags)57 UserInfo createUserEvenWhenDisallowed(String name, String userType, int flags); 58 } 59