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# Restrict the visibility of Android.bp files to improve build analysis time
18$(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk)
19
20TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_PANTHER_VERSION)
21# Keeps flexibility for kasan and ufs builds
22TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_PANTHER_DIR)
23TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_PANTHER_DIR)/kernel-headers
24
25$(call inherit-product-if-exists, vendor/google_devices/pantah/prebuilts/device-vendor-panther.mk)
26$(call inherit-product-if-exists, vendor/google_devices/gs201/prebuilts/device-vendor.mk)
27$(call inherit-product-if-exists, vendor/google_devices/gs201/proprietary/device-vendor.mk)
28$(call inherit-product-if-exists, vendor/google_devices/pantah/proprietary/panther/device-vendor-panther.mk)
29$(call inherit-product-if-exists, vendor/google_devices/panther/proprietary/device-vendor.mk)
30$(call inherit-product-if-exists, vendor/google_devices/pantah/proprietary/WallpapersPanther.mk)
31
32DEVICE_PACKAGE_OVERLAYS += device/google/pantah/panther/overlay
33
34include device/google/pantah/audio/panther/audio-tables.mk
35include device/google/gs201/device-shipping-common.mk
36include hardware/google/pixel/vibrator/cs40l26/device.mk
37include device/google/gs-common/bcmbt/bluetooth.mk
38include device/google/gs-common/touch/focaltech/focaltech.mk
39
40# go/lyric-soong-variables
41$(call soong_config_set,lyric,camera_hardware,panther)
42$(call soong_config_set,lyric,tuning_product,panther)
43$(call soong_config_set,google3a_config,target_device,panther)
44
45# Init files
46PRODUCT_COPY_FILES += \
47	device/google/pantah/conf/init.pantah.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.pantah.rc \
48	device/google/pantah/conf/init.panther.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.panther.rc
49
50# Recovery files
51PRODUCT_COPY_FILES += \
52        device/google/pantah/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.panther.rc
53
54# insmod files
55PRODUCT_COPY_FILES += \
56	device/google/pantah/init.insmod.panther.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.panther.cfg
57
58# MIPI Coex Configs
59PRODUCT_COPY_FILES += \
60    device/google/pantah/panther/radio/panther_display_primary_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/display_primary_mipi_coex_table.csv \
61    device/google/pantah/panther/radio/panther_camera_front_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/camera_front_mipi_coex_table.csv \
62    device/google/pantah/panther/radio/panther_camera_rear_wide_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/camera_rear_wide_mipi_coex_table.csv \
63    device/google/pantah/panther/radio/panther_camera_front_dbr_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/camera_front_dbr_coex_table.csv
64
65# Camera
66PRODUCT_COPY_FILES += \
67	device/google/pantah/media_profiles_panther.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
68
69# Media Performance Class 13
70PRODUCT_PROPERTY_OVERRIDES += ro.odm.build.media_performance_class=33
71
72# Display Config
73PRODUCT_COPY_FILES += \
74        device/google/pantah/panther/display_colordata_dev_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_dev_cal0.pb \
75        device/google/pantah/panther/display_golden_sdc-s6e3fc3-p10_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_golden_sdc-s6e3fc3-p10_cal0.pb
76
77# Display LBE
78PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1
79
80#config of primary display frames to reach LHBM peak brightness
81PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.primarydisplay.lhbm.frames_to_reach_peak_brightness=2
82
83# NFC
84PRODUCT_COPY_FILES += \
85	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
86	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
87	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
88	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
89	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
90	device/google/pantah/nfc/libnfc-hal-st-proto1.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st-proto1.conf \
91	device/google/pantah/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
92    device/google/pantah/nfc/libnfc-nci-panther.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
93
94PRODUCT_PACKAGES += \
95	$(RELEASE_PACKAGE_NFC_STACK) \
96	Tag \
97	android.hardware.nfc-service.st \
98	NfcOverlayPanther
99
100# SecureElement
101PRODUCT_PACKAGES += \
102	android.hardware.secure_element@1.2-service-gto \
103	android.hardware.secure_element@1.2-service-gto-ese2
104
105PRODUCT_COPY_FILES += \
106	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
107	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
108	device/google/pantah/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf \
109	device/google/pantah/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf
110
111DEVICE_MANIFEST_FILE += \
112	device/google/pantah/nfc/manifest_se.xml
113
114# Thermal Config
115PRODUCT_COPY_FILES += \
116	device/google/pantah/thermal_info_config_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
117	device/google/pantah/thermal_info_config_charge_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json \
118	device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json
119
120# Power HAL config
121PRODUCT_COPY_FILES += \
122	device/google/pantah/powerhint-panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
123PRODUCT_COPY_FILES += \
124	device/google/pantah/powerhint-panther-a0.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint-a0.json
125
126# Spatial Audio
127PRODUCT_PACKAGES += \
128	libspatialaudio
129
130# Bluetooth HAL
131PRODUCT_COPY_FILES += \
132	device/google/pantah/bluetooth/bt_vendor_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
133PRODUCT_PROPERTY_OVERRIDES += \
134    ro.bluetooth.a2dp_offload.supported=true \
135    persist.bluetooth.a2dp_offload.disabled=false \
136    persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-opus
137
138# Enable Bluetooth AutoOn feature
139PRODUCT_PRODUCT_PROPERTIES += \
140    bluetooth.server.automatic_turn_on=true
141
142# Bluetooth hci_inject test tool
143PRODUCT_PACKAGES_DEBUG += \
144    hci_inject
145
146# Bluetooth OPUS codec
147PRODUCT_PRODUCT_PROPERTIES += \
148    persist.bluetooth.opus.enabled=true
149
150# Bluetooth Tx power caps
151PRODUCT_COPY_FILES += \
152    device/google/pantah/bluetooth/bluetooth_power_limits_panther.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \
153    device/google/pantah/bluetooth/bluetooth_power_limits_panther_G03Z5_JP.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_G03Z5_JP.csv \
154    device/google/pantah/bluetooth/bluetooth_power_limits_panther_GVU6C_CA.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_GVU6C_CA.csv \
155    device/google/pantah/bluetooth/bluetooth_power_limits_panther_GQML3_EU.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_GQML3_EU.csv \
156    device/google/pantah/bluetooth/bluetooth_power_limits_panther_GVU6C_EU.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_GVU6C_EU.csv \
157    device/google/pantah/bluetooth/bluetooth_power_limits_panther_GQML3_US.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_GQML3_US.csv \
158    device/google/pantah/bluetooth/bluetooth_power_limits_panther_GVU6C_US.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_GVU6C_US.csv
159
160# Bluetooth SAR test tool
161PRODUCT_PACKAGES_DEBUG += \
162    sar_test
163# default BDADDR for EVB only
164PRODUCT_PROPERTY_OVERRIDES += \
165	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
166
167# Bluetooth LE Audio
168PRODUCT_PRODUCT_PROPERTIES += \
169    ro.bluetooth.leaudio_offload.supported=true \
170    persist.bluetooth.leaudio_offload.disabled=false \
171    ro.bluetooth.leaudio_switcher.supported=true \
172    bluetooth.profile.bap.unicast.client.enabled?=true \
173    bluetooth.profile.csip.set_coordinator.enabled?=true \
174    bluetooth.profile.hap.client.enabled?=true \
175    bluetooth.profile.mcp.server.enabled?=true \
176    bluetooth.profile.ccp.server.enabled?=true \
177    bluetooth.profile.vcp.controller.enabled?=true \
178
179# Bluetooth LE Audio CIS handover to SCO
180# Set the property only if the controller doesn't support CIS and SCO
181# simultaneously. More details in b/242908683.
182PRODUCT_PRODUCT_PROPERTIES += \
183    persist.bluetooth.leaudio.notify.idle.during.call=true
184
185# BT controller not able to support LE Audio dual mic SWB call
186PRODUCT_PRODUCT_PROPERTIES += \
187    bluetooth.leaudio.dual_bidirection_swb.supported=false
188
189# LE Auido Offload Capabilities setting
190PRODUCT_COPY_FILES += \
191    device/google/pantah/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml
192
193# LE Audio Unicast Allowlist
194PRODUCT_PRODUCT_PROPERTIES += \
195    persist.bluetooth.leaudio.allow_list=SM-R510
196
197# Support LE & Classic concurrent encryption (b/330704060)
198PRODUCT_PRODUCT_PROPERTIES += \
199    bluetooth.ble.allow_enc_with_bredr=true
200
201# Bluetooth EWP test tool
202PRODUCT_PACKAGES_DEBUG += \
203    ewp_tool
204
205PRODUCT_PRODUCT_PROPERTIES += \
206    persist.bluetooth.firmware.selection=BCM.hcd
207
208# Bluetooth AAC VBR
209PRODUCT_PRODUCT_PROPERTIES += \
210    persist.bluetooth.a2dp_aac.vbr_supported=true
211
212# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging
213ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
214PRODUCT_PRODUCT_PROPERTIES += \
215    persist.bluetooth.bqr.event_mask=262238
216else
217PRODUCT_PRODUCT_PROPERTIES += \
218    persist.bluetooth.bqr.event_mask=94
219endif
220
221# declare use of spatial audio
222PRODUCT_PROPERTY_OVERRIDES += \
223       ro.audio.spatializer_enabled=true
224
225# optimize spatializer effect
226PRODUCT_PROPERTY_OVERRIDES += \
227       audio.spatializer.effect.util_clamp_min=300
228
229# Keymaster HAL
230#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
231
232# Gatekeeper HAL
233#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software
234
235
236# Gatekeeper
237# PRODUCT_PACKAGES += \
238# 	android.hardware.gatekeeper@1.0-service.software
239
240# Keymint replaces Keymaster
241# PRODUCT_PACKAGES += \
242# 	android.hardware.security.keymint-service
243
244# Keymaster
245#PRODUCT_PACKAGES += \
246#	android.hardware.keymaster@4.0-impl \
247#	android.hardware.keymaster@4.0-service
248
249#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote
250#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote
251#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service
252#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
253
254# PRODUCT_PROPERTY_OVERRIDES += \
255# 	ro.hardware.keystore_desede=true \
256# 	ro.hardware.keystore=software \
257# 	ro.hardware.gatekeeper=software
258
259# PowerStats HAL
260PRODUCT_SOONG_NAMESPACES += \
261    device/google/pantah/powerstats/panther \
262    device/google/pantah
263
264# Fingerprint HAL
265GOODIX_CONFIG_BUILD_VERSION := g7_trusty
266$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_common.mk)
267ifeq ($(filter factory%, $(TARGET_PRODUCT)),)
268$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_shipping.mk)
269else
270$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_factory.mk)
271endif
272
273# Display
274PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=1500
275PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.ignore_hdr_camera_layers=true
276
277# WiFi Overlay
278PRODUCT_PACKAGES += \
279    WifiOverlay2022_P10
280
281PRODUCT_SOONG_NAMESPACES += device/google/pantah/panther/
282
283# Trusty liboemcrypto.so
284PRODUCT_SOONG_NAMESPACES += vendor/google_devices/pantah/prebuilts
285
286# Location
287ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
288        PRODUCT_COPY_FILES += \
289                device/google/pantah/location/gps.xml.p10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \
290                device/google/pantah/location/lhd.conf.p10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
291                device/google/pantah/location/scd.conf.p10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
292else
293        PRODUCT_COPY_FILES += \
294                device/google/pantah/location/gps_user.xml.p10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \
295                device/google/pantah/location/lhd_user.conf.p10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
296                device/google/pantah/location/scd_user.conf.p10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
297endif
298
299# Set support one-handed mode
300PRODUCT_PRODUCT_PROPERTIES += \
301    ro.support_one_handed_mode=true
302
303# Set zram size
304PRODUCT_VENDOR_PROPERTIES += \
305	vendor.zram.size=3g
306
307# Increment the SVN for any official public releases
308ifdef RELEASE_SVN_PANTHER
309TARGET_SVN ?= $(RELEASE_SVN_PANTHER)
310else
311# Set this for older releases that don't use build flag
312TARGET_SVN ?= 60
313endif
314
315PRODUCT_VENDOR_PROPERTIES += \
316    ro.vendor.build.svn=$(TARGET_SVN)
317
318# DCK properties based on target
319PRODUCT_PROPERTY_OVERRIDES += \
320    ro.gms.dck.eligible_wcc=2 \
321    ro.gms.dck.se_capability=1
322
323
324# Set support hide display cutout feature
325PRODUCT_PRODUCT_PROPERTIES += \
326    ro.support_hide_display_cutout=true
327
328PRODUCT_PACKAGES += \
329    NoCutoutOverlay \
330    AvoidAppsInCutoutOverlay
331
332# SKU specific RROs
333PRODUCT_PACKAGES += \
334    SettingsOverlayG03Z5 \
335    SettingsOverlayGQML3 \
336    SettingsOverlayGVU6C \
337    SettingsOverlayGVU6C_VN
338
339# userdebug specific
340ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
341    PRODUCT_COPY_FILES += \
342        device/google/gs201/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wlc.rc
343endif
344
345# Fingerprint HAL
346PRODUCT_VENDOR_PROPERTIES += \
347    persist.vendor.udfps.als_feed_forward_supported=true \
348    persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
349
350# Vibrator HAL
351$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
352ACTUATOR_MODEL := luxshare_ict_081545
353ADAPTIVE_HAPTICS_FEATURE := adaptive_haptics_v1
354PRODUCT_VENDOR_PROPERTIES += \
355    persist.vendor.vibrator.hal.chirp.enabled=0 \
356    ro.vendor.vibrator.hal.device.mass=0.195 \
357    ro.vendor.vibrator.hal.loc.coeff=2.65 \
358    persist.vendor.vibrator.hal.context.enable=false \
359    persist.vendor.vibrator.hal.context.scale=60 \
360    persist.vendor.vibrator.hal.context.fade=true \
361    persist.vendor.vibrator.hal.context.cooldowntime=1600 \
362    persist.vendor.vibrator.hal.context.settlingtime=5000
363
364# Keyboard bottom padding in dp for portrait mode and height ratio
365PRODUCT_PRODUCT_PROPERTIES += \
366    ro.com.google.ime.kb_pad_port_b=8 \
367    ro.com.google.ime.height_ratio=1.075
368
369# Enable camera exif model/make reporting
370PRODUCT_VENDOR_PROPERTIES += \
371    persist.vendor.camera.exif_reveal_make_model=true \
372    persist.vendor.camera.front_720P_always_binning=true
373
374# RKPD
375PRODUCT_PRODUCT_PROPERTIES += \
376    remote_provisioning.hostname=remoteprovisioning.googleapis.com \
377
378##Audio Vendor property
379PRODUCT_PROPERTY_OVERRIDES += \
380	persist.vendor.audio.cca.enabled=false
381
382# The default value of this variable is false and should only be set to true when
383# the device allows users to enable the seamless transfer feature.
384PRODUCT_PRODUCT_PROPERTIES += \
385   euicc.seamless_transfer_enabled_in_non_qs=true
386
387# Device features
388PRODUCT_COPY_FILES += \
389    frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
390
391# Disable Settings large-screen optimization enabled by Window Extensions
392PRODUCT_SYSTEM_PROPERTIES += \
393    persist.settings.large_screen_opt.enabled=false
394
395# Enable DeviceAsWebcam support
396PRODUCT_VENDOR_PROPERTIES += \
397    ro.usb.uvc.enabled=true
398
399# Quick Start device-specific settings
400PRODUCT_PRODUCT_PROPERTIES += \
401    ro.quick_start.oem_id=00e0 \
402    ro.quick_start.device_id=panther
403