Include consumerir feature, disable dynamically if not present

This commit is contained in:
Pierre-Hugues Husson 2018-05-19 13:40:50 +02:00
parent e5bf6a5c2a
commit 1936b6256e
2 changed files with 6 additions and 2 deletions

View File

@ -1,8 +1,8 @@
#Huawei devices don't declare fingerprint and telephony hardware feature #Huawei devices don't declare fingerprint and telephony hardware feature
#TODO: Proper detection
PRODUCT_COPY_FILES := \ PRODUCT_COPY_FILES := \
frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml \ frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc/permissions/android.hardware.fingerprint.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.consumerir.xml:system/etc/permissions/android.hardware.consumerir.xml
#Use a more decent APN config #Use a more decent APN config
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \

View File

@ -53,6 +53,10 @@ if ! grep android.hardware.biometrics.fingerprint /vendor/manifest.xml;then
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.fingerprint.xml mount -o bind system/phh/empty /system/etc/permissions/android.hardware.fingerprint.xml
fi fi
if ! grep android.hardware.ir /vendor/manifest.xml;then
mount -o bind system/phh/empty /system/etc/permissions/android.hardware.consumerir.xml
fi
#Disable trustkernel keystore, because it doesn't work for the moment #Disable trustkernel keystore, because it doesn't work for the moment
#Found on MTK devices #Found on MTK devices
mount -o bind /system/phh/empty /vendor/lib/hw/keystore.trustkernel.so || true mount -o bind /system/phh/empty /vendor/lib/hw/keystore.trustkernel.so || true