From bc06234d795aa1a8186e1aaf2c6346aae4b44d36 Mon Sep 17 00:00:00 2001 From: Pig Date: Tue, 19 May 2020 15:57:08 +0200 Subject: [PATCH] davinci: init: Set hardware sku to davinci * Only enable NFC for specific variants if the sku is set. Change-Id: Iac4734657504004c12630dc482dfb9d6c2612282 --- BoardConfig.mk | 7 ++++++- device.mk | 14 +++++++------- init/init_davinci.cpp | 2 ++ manifest.xml | 18 ------------------ manifest_davinci.xml | 20 ++++++++++++++++++++ 5 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 manifest_davinci.xml diff --git a/BoardConfig.mk b/BoardConfig.mk index eec46a3..82f4c10 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2019 The LineageOS Project +# Copyright (C) 2019-2020 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -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 diff --git a/device.mk b/device.mk index df3624b..ea82659 100644 --- a/device.mk +++ b/device.mk @@ -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 += \ diff --git a/init/init_davinci.cpp b/init/init_davinci.cpp index eca728e..910f7ef 100644 --- a/init/init_davinci.cpp +++ b/init/init_davinci.cpp @@ -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") { @@ -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"); } } diff --git a/manifest.xml b/manifest.xml index 0ec6f81..39b38e9 100644 --- a/manifest.xml +++ b/manifest.xml @@ -8,24 +8,6 @@ default - - android.hardware.nfc - hwbinder - 1.2 - - INfc - default - - - - vendor.nxp.hardware.nfc - hwbinder - 1.1 - - INqNfc - default - - vendor.xiaomi.hardware.motor hwbinder diff --git a/manifest_davinci.xml b/manifest_davinci.xml new file mode 100644 index 0000000..0279e35 --- /dev/null +++ b/manifest_davinci.xml @@ -0,0 +1,20 @@ + + + android.hardware.nfc + hwbinder + 1.2 + + INfc + default + + + + vendor.nxp.hardware.nfc + hwbinder + 1.1 + + INqNfc + default + + +