diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index a93a9f4..b05a7e0 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -225,8 +225,15 @@ $(foreach sku, $(call to-upper, $(DEVICE_MANIFEST_SKUS)), \ $(eval DEVICE_MANIFEST_$(sku)_FILES := \ $(COMMON_PATH)/vintf/manifest.xml \ $(COMMON_PATH)/vintf/manifest_xiaomi.xml \ + $(if $(TARGET_NFC_SUPPORTED_SKUS),,$(COMMON_PATH)/vintf/manifest_nfc.xml) \ )) +ifneq ($(TARGET_NFC_SUPPORTED_SKUS),) +ODM_MANIFEST_SKUS += $(TARGET_NFC_SUPPORTED_SKUS) +$(foreach nfc_sku, $(call to-upper, $(TARGET_NFC_SUPPORTED_SKUS)), \ + $(eval ODM_MANIFEST_$(nfc_sku)_FILES += $(COMMON_PATH)/vintf/manifest_nfc.xml)) +endif + DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ hardware/xiaomi/vintf/xiaomi_framework_compatibility_matrix.xml \ diff --git a/common.mk b/common.mk index 8b213b9..848e2e2 100644 --- a/common.mk +++ b/common.mk @@ -312,14 +312,22 @@ PRODUCT_PACKAGES += \ android.hardware.nfc@1.2.vendor \ libchrome.vendor -PRODUCT_COPY_FILES += \ - 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_VENDOR)/etc/permissions/android.hardware.nfc.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 +ifeq ($(TARGET_NFC_SUPPORTED_SKUS),) +TARGET_COPY_OUT_NFC_SKU_PERMISSIONS := $(TARGET_COPY_OUT_VENDOR)/etc/permissions/ +else +$(foreach sku, $(TARGET_NFC_SUPPORTED_SKUS), \ + $(eval TARGET_COPY_OUT_NFC_SKU_PERMISSIONS += $(TARGET_COPY_OUT_ODM)/etc/permissions/sku_$(sku))) +endif + +$(foreach sku_out, $(TARGET_COPY_OUT_NFC_SKU_PERMISSIONS), \ + $(eval PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(sku_out)/android.hardware.nfc.ese.xml \ + frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(sku_out)/android.hardware.nfc.hce.xml \ + frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(sku_out)/android.hardware.nfc.hcef.xml \ + frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(sku_out)/android.hardware.nfc.uicc.xml \ + frameworks/native/data/etc/android.hardware.nfc.xml:$(sku_out)/android.hardware.nfc.xml \ + frameworks/native/data/etc/com.android.nfc_extras.xml:$(sku_out)/com.android.nfc_extras.xml \ + frameworks/native/data/etc/com.nxp.mifare.xml:$(sku_out)/com.nxp.mifare.xml)) # Overlays PRODUCT_PACKAGES += \ diff --git a/vintf/manifest.xml b/vintf/manifest.xml index ddb1beb..0c40577 100644 --- a/vintf/manifest.xml +++ b/vintf/manifest.xml @@ -116,25 +116,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. default - - - android.hardware.nfc - hwbinder - 1.2 - - INfc - default - - - - vendor.nxp.hardware.nfc - hwbinder - 2.0 - - INqNfc - default - - android.hardware.secure_element diff --git a/vintf/manifest_nfc.xml b/vintf/manifest_nfc.xml new file mode 100644 index 0000000..d9b4c07 --- /dev/null +++ b/vintf/manifest_nfc.xml @@ -0,0 +1,21 @@ + + + + android.hardware.nfc + hwbinder + 1.2 + + INfc + default + + + + vendor.nxp.hardware.nfc + hwbinder + 2.0 + + INqNfc + default + + +