• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package com.android.car;
18 
19 import android.content.Intent;
20 
21 import com.android.internal.os.BinderInternal;
22 
23 /** Proxy service for CarServciceImpl */
24 public class CarService extends ServiceProxy {
25 
26     // Binder threads are set to 31. system_server is also using 31.
27     // check sMaxBinderThreads in SystemServer.java
28     private  static final int MAX_BINDER_THREADS = 31;
29 
CarService()30     public CarService() {
31         super(UpdatablePackageDependency.CAR_SERVICE_IMPL_CLASS);
32         // Increase the number of binder threads in car service
33         BinderInternal.setMaxThreads(MAX_BINDER_THREADS);
34     }
35 
36     @Override
onStartCommand(Intent intent, int flags, int startId)37     public int onStartCommand(Intent intent, int flags, int startId) {
38         // keep it alive.
39         return START_STICKY;
40     }
41 }
42