sweet: Disable NFC for indian devices

* Setup sweet sku when device is global.
* Move the nfc manifest entry to sweet hardware sku
  variant.

Change-Id: I76ac75cd80f85efa6dfa68753602d934a11000a3
Signed-off-by: Arian <arian.kulmer@web.de>
This commit is contained in:
Erfan Abdi 2020-07-25 16:15:59 +04:30 committed by AdarshGrewal
parent 762b245611
commit e307f22c28
6 changed files with 30 additions and 9 deletions

View File

@ -20,6 +20,10 @@ TARGET_PROVIDES_AUDIO_EXTNS := true
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(DEVICE_PATH)/configs/hidl/device_framework_compatibility_matrix.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += vendor/lineage/config/device_framework_matrix.xml
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/hidl/manifest.xml
ODM_MANIFEST_SKUS += sweet
ODM_MANIFEST_SWEET_FILES := \
$(COMMON_PATH)/configs/hidl/manifest-qva.xml \
$(DEVICE_PATH)/configs/hidl/manifest-nfc.xml
# Init
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_sweet

View File

@ -0,0 +1,11 @@
<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>
</manifest>

View File

@ -8,13 +8,4 @@
<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>
</manifest>

View File

@ -44,6 +44,10 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_RAMDISK)/fstab.qcom \
$(LOCAL_PATH)/rootdir/etc/fstab.qcom:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.qcom
# Init scripts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/init.sweet.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.sweet.rc
# NFC
PRODUCT_PACKAGES += \
com.android.nfc_extras \

View File

@ -91,6 +91,7 @@ void vendor_load_properties() {
fingerprint = "Redmi/sweet_eea/sweet:11/RKQ1.200826.002/V12.0.10.0.RKFEUXM:user/release-keys";
description = "sweet_eea-user 11 RKQ1.200826.002 V12.0.10.0.RKFEUXM release-keys";
mod_device = "sweet_eea_global";
property_override("ro.boot.product.hardware.sku", "sweet");
} else if (region == "INDIA") {
if (sku == "std") {
model = "M2101K6P";

10
rootdir/etc/init.sweet.rc Normal file
View File

@ -0,0 +1,10 @@
on property:ro.boot.product.hardware.sku=sweet
enable vendor.nfc_hal_service
service vendor.nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.2-service
override
class hal
user nfc
group nfc
writepid /dev/cpuset/system-background/tasks
disabled