1#
2# Copyright (C) 2016 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# Base platform for car builds
18# car packages should be added to car.mk instead of here
19
20ifeq ($(DISABLE_CAR_PRODUCT_CONFIG_OVERLAY),)
21PRODUCT_PACKAGE_OVERLAYS += packages/services/Car/car_product/overlay
22endif
23
24ifeq ($(DISABLE_CAR_PRODUCT_VISUAL_OVERLAY),)
25PRODUCT_PACKAGE_OVERLAYS += packages/services/Car/car_product/overlay-visual
26endif
27
28PRODUCT_COPY_FILES += \
29    packages/services/Car/car_product/build/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \
30
31PRODUCT_PACKAGES += \
32    com.android.wifi \
33    Home \
34    BasicDreams \
35    CaptivePortalLogin \
36    CertInstaller \
37    DocumentsUI \
38    DownloadProviderUi \
39    FusedLocation \
40    InputDevices \
41    KeyChain \
42    Keyguard \
43    LatinIME \
44    Launcher2 \
45    PacProcessor \
46    PrintSpooler \
47    ProxyHandler \
48    Settings \
49    SharedStorageBackup \
50    VpnDialogs \
51    MmsService \
52    ExternalStorageProvider \
53    atrace \
54    libandroidfw \
55    libaudioutils \
56    libmdnssd \
57    libnfc_ndef \
58    libpowermanager \
59    libvariablespeed \
60    A2dpSinkService \
61    PackageInstaller \
62    carbugreportd \
63    vehicle_binding_util \
64
65# ENABLE_CAMERA_SERVICE must be set as true from the product's makefile if it wants to support
66# Android Camera service.
67ifneq ($(ENABLE_CAMERA_SERVICE), true)
68PRODUCT_PROPERTY_OVERRIDES += config.disable_cameraservice=true
69endif
70
71# EVS service
72include packages/services/Car/cpp/evs/manager/evsmanager.mk
73
74ifeq ($(ENABLE_EVS_SAMPLE), true)
75# ENABLE_EVS_SAMPLE should set be true or their vendor specific equivalents should be included in
76# the device.mk with the corresponding selinux policies
77LOCAL_EVS_PROPERTIES ?= persist.automotive.evs.mode=0
78PRODUCT_PRODUCT_PROPERTIES += $(LOCAL_EVS_PROPERTIES)
79PRODUCT_PACKAGES += evs_app \
80                    android.hardware.automotive.evs@1.1-sample \
81                    android.frameworks.automotive.display@1.0-service
82include packages/services/Car/cpp/evs/apps/sepolicy/evsapp.mk
83include packages/services/Car/cpp/evs/sampleDriver/sepolicy/evsdriver.mk
84endif
85ifeq ($(ENABLE_CAREVSSERVICE_SAMPLE), true)
86PRODUCT_PACKAGES += CarEvsCameraPreviewApp
87endif
88ifeq ($(ENABLE_REAR_VIEW_CAMERA_SAMPLE), true)
89PRODUCT_PACKAGES += SampleRearViewCamera
90PRODUCT_PACKAGE_OVERLAYS += packages/services/Car/tests/SampleRearViewCamera/overlay
91endif
92
93# Device running Android is a car
94PRODUCT_COPY_FILES += \
95    frameworks/native/data/etc/android.hardware.type.automotive.xml:system/etc/permissions/android.hardware.type.automotive.xml
96
97# Default permission grant exceptions
98PRODUCT_COPY_FILES += \
99    packages/services/Car/car_product/build/preinstalled-packages-product-car-base.xml:system/etc/sysconfig/preinstalled-packages-product-car-base.xml
100
101$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)
102
103# Default dex optimization configurations
104PRODUCT_PROPERTY_OVERRIDES += \
105     pm.dexopt.disable_bg_dexopt=true
106
107# Required init rc files for car
108PRODUCT_COPY_FILES += \
109    packages/services/Car/car_product/init/init.bootstat.rc:system/etc/init/init.bootstat.car.rc \
110    packages/services/Car/car_product/init/init.car.rc:system/etc/init/init.car.rc
111
112# Device policy management support
113PRODUCT_COPY_FILES += \
114    frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
115
116# Enable car watchdog
117include packages/services/Car/cpp/watchdog/product/carwatchdog.mk
118
119# Enable car power policy
120include packages/services/Car/cpp/powerpolicy/product/carpowerpolicy.mk
121