Skip to content

Commit

Permalink
davinci: init: Set hardware sku to davinci
Browse files Browse the repository at this point in the history
 * Only enable NFC for specific variants if the sku is set.

Change-Id: Iac4734657504004c12630dc482dfb9d6c2612282
  • Loading branch information
PIPIPIG233666 committed Aug 18, 2020
1 parent cea20ce commit bc06234
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 26 deletions.
7 changes: 6 additions & 1 deletion BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2019 The LineageOS Project
# Copyright (C) 2019-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -38,6 +38,11 @@ TARGET_BOARD_PLATFORM_GPU := qcom-adreno618
# HIDL
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml

ODM_MANIFEST_SKUS += \
davinci

ODM_MANIFEST_DAVINCI_FILES := $(DEVICE_PATH)/manifest_davinci.xml

# NFC
TARGET_USES_NQ_NFC := true

Expand Down
14 changes: 7 additions & 7 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \

# Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.uicc.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/android.hardware.nfc.xml \
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/android.hardware.nfc.ese.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/android.hardware.nfc.uicc.xml \
frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \
frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_davinci/com.nxp.mifare.xml

# Audio
PRODUCT_COPY_FILES += \
Expand Down
2 changes: 2 additions & 0 deletions init/init_davinci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void vendor_load_properties()
property_override("ro.build.fingerprint",
"Xiaomi/davinci/davinci:10/QKQ1.190825.002/V11.0.6.0.QFJCNXM:user/release-keys");
property_override("ro.build.description", "davinci-user 10 QKQ1.190825.002 V11.0.6.0.QFJCNXM release-keys");
property_override("ro.boot.product.hardware.sku", "davinci");
}
else if (region == "INDIA")
{
Expand Down Expand Up @@ -120,5 +121,6 @@ void vendor_load_properties()
property_override("ro.build.fingerprint",
"Xiaomi/davinci/davinci:10/QKQ1.190825.002/V12.0.0.11.QFJMIXM:user/release-keys");
property_override("ro.product.mod_device", "davinci_global");
property_override("ro.boot.product.hardware.sku", "davinci");
}
}
18 changes: 0 additions & 18 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.xiaomi.hardware.motor</name>
<transport>hwbinder</transport>
Expand Down
20 changes: 20 additions & 0 deletions manifest_davinci.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

0 comments on commit bc06234

Please sign in to comment.