1#
2# Copyright (C) 2014 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
17PRODUCT_IS_ATV := true
18
19PRODUCT_PACKAGES := \
20    TvProvider \
21    TvSettings \
22    SettingsIntelligence \
23    tv_input.default
24
25ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
26PRODUCT_PACKAGES += Traceur
27endif
28
29PRODUCT_COPY_FILES := \
30    device/google/atv/permissions/tv_core_hardware.xml:system/etc/permissions/tv_core_hardware.xml
31
32DEVICE_PACKAGE_OVERLAYS := \
33    device/google/atv/overlay
34
35# From build/target/product/core_base.mk
36PRODUCT_PACKAGES += \
37    UserDictionaryProvider \
38    libkeystore \
39
40# From build/target/product/core.mk
41PRODUCT_PACKAGES += \
42    BasicDreams \
43    CalendarProvider \
44    CaptivePortalLogin \
45    CertInstaller \
46    ExternalStorageProvider \
47    FusedLocation \
48    InputDevices \
49    KeyChain \
50    PacProcessor \
51    PrintSpooler \
52    ProxyHandler \
53    SharedStorageBackup \
54    VpnDialogs \
55    com.android.media.tv.remoteprovider \
56    PackageInstaller
57
58# From build/target/product/generic_no_telephony.mk
59PRODUCT_PACKAGES += \
60    Bluetooth \
61    SystemUI \
62    librs_jni \
63    audio.primary.default \
64    clatd \
65    local_time.default \
66    screenrecord
67
68# PRODUCT_SUPPORTS_CAMERA: Whether the product supports cameras at all
69# (built-in or external USB camera). When 'false', we drop cameraserver, which
70# saves ~3 MiB of RAM. When 'true', additional settings are required for
71# external webcams to work, see "External USB Cameras" documentation.
72#
73# Defaults to true to mimic legacy behaviour.
74PRODUCT_SUPPORTS_CAMERA ?= true
75ifeq ($(PRODUCT_SUPPORTS_CAMERA),true)
76    PRODUCT_PACKAGES += cameraserver
77else
78    # When cameraserver is not included, we need to configure Camera API to not
79    # connect to it.
80    PRODUCT_PROPERTY_OVERRIDES += config.disable_cameraservice=true
81endif
82
83PRODUCT_COPY_FILES += \
84    frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
85
86# Enable frame-exact AV sync
87PRODUCT_PROPERTY_OVERRIDES += \
88    persist.sys.media.avsync=true
89
90
91# SDK builds needs to build layoutlib-legacy that depends on debug info
92ifneq ($(PRODUCT_IS_ATV_SDK),true)
93    # Strip the local variable table and the local variable type table to reduce
94    # the size of the system image. This has no bearing on stack traces, but will
95    # leave less information available via JDWP.
96    # From //build/make/target/product/go_defaults_common.mk
97    PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
98
99    # Do not generate libartd.
100    # From //build/make/target/product/go_defaults_common.mk
101    PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
102endif
103
104
105# Do not include the Live Channels app if USE_OEM_TV_APP flag is set.
106# The feature com.google.android.tv.installed is used to tell whether a device
107# has the pre-installed Live Channels app. This is necessary for the Play Store
108# to identify the compatible devices that can install later updates of the app.
109ifneq ($(USE_OEM_TV_APP),true)
110    ifneq ($(PRODUCT_IS_ATV_SDK),true)
111        PRODUCT_PACKAGES += TV
112    else
113        PRODUCT_PACKAGES += LiveTv
114    endif # if PRODUCT_IS_ATV_SDK
115
116    PRODUCT_COPY_FILES += \
117        device/google/atv/permissions/com.google.android.tv.installed.xml:system/etc/permissions/com.google.android.tv.installed.xml
118endif
119
120# To enable access to /dev/dvb*
121BOARD_SEPOLICY_DIRS += device/google/atv/sepolicy
122
123
124# Copy .kl file for generic voice remotes
125PRODUCT_COPY_FILES += \
126    device/google/atv/Generic.kl:system/usr/keylayout/Generic.kl
127
128$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioTv.mk)
129$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
130$(call inherit-product-if-exists, external/google-fonts/dancing-script/fonts.mk)
131$(call inherit-product-if-exists, external/google-fonts/carrois-gothic-sc/fonts.mk)
132$(call inherit-product-if-exists, external/google-fonts/coming-soon/fonts.mk)
133$(call inherit-product-if-exists, external/google-fonts/cutive-mono/fonts.mk)
134$(call inherit-product-if-exists, external/noto-fonts/fonts.mk)
135$(call inherit-product-if-exists, external/roboto-fonts/fonts.mk)
136$(call inherit-product-if-exists, external/hyphenation-patterns/patterns.mk)
137$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
138$(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
139$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)
140