• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.os.UserHandle;
21 
22 import java.util.List;
23 
24 /**
25  * Helper API for car service. Only for interaction between system server and car service.
26  * @hide
27  */
28 interface ICarServiceHelper {
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) = 0;
34 
35     /**
36      * Check
37      * {@link com.android.server.wm.CarLaunchParamsModifier#setPassengerDisplays(int[])}.
38      */
setPassengerDisplays(in int[] displayIds)39     void setPassengerDisplays(in int[] displayIds) = 1;
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) = 2;
48 
49     /**
50      * Sets whether it's safe to run operations (like DevicePolicyManager.lockNow()).
51      */
setSafetyMode(boolean safe)52     void setSafetyMode(boolean safe) = 3;
53 
54     /**
55      * Creates the given user, even when it's disallowed by DevicePolicyManager.
56      */
createUserEvenWhenDisallowed(String name, String userType, int flags)57     UserHandle createUserEvenWhenDisallowed(String name, String userType, int flags) = 4;
58 
59     /**
60      * Designates the given {@code activity} to be launched in {@code TaskDisplayArea} of
61      * {@code featureId} in the display of {@code displayId}.
62      */
setPersistentActivity(in ComponentName activity, int displayId, int featureId)63     int setPersistentActivity(in ComponentName activity, int displayId, int featureId) = 5;
64 
65     /**
66      * Saves initial user information in System Server. If car service crashes, Car service helepr
67      * service would send back this information.
68      */
69     void sendInitialUser(in UserHandle user) = 6;
70 }
71