From 9a31e9b31249bcaa6863ac2f3eef5e3c75d31e8b Mon Sep 17 00:00:00 2001 From: Sebastiano Barezzi Date: Sun, 18 Aug 2024 23:59:08 +0200 Subject: [PATCH] sweet: Move to Xiaomi IR AIDL Change-Id: I46094bcbfaba252b5d98ea8211b927fdaa079e2d --- device.mk | 2 +- proprietary-files.txt | 3 --- sepolicy/vendor/file_contexts | 3 ++- sepolicy/vendor/hal_ir_default.te | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/device.mk b/device.mk index 9a31540..18bc5a7 100644 --- a/device.mk +++ b/device.mk @@ -57,7 +57,7 @@ PRODUCT_COPY_FILES += \ # IR PRODUCT_PACKAGES += \ - android.hardware.ir-service.example + android.hardware.ir-service.xiaomi PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml diff --git a/proprietary-files.txt b/proprietary-files.txt index c108a50..7e74ad2 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -331,9 +331,6 @@ vendor/firmware/a615_zap.mdt vendor/firmware/a618_gmu.bin vendor/firmware/a630_sqe.fw -# IR --vendor/lib64/hw/consumerir.default.so:vendor/lib64/hw/consumerir.sm6150.so - # NFC vendor/etc/libnfc-nci.conf vendor/etc/libnfc-nxp.conf diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 4a13b12..0bbf3d9 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -1,5 +1,6 @@ # IR -/dev/ir_spi u:object_r:vendor_ir_device:s0 +/dev/lirc[0-9]+ u:object_r:lirc_device:s0 +/vendor/bin/hw/android\.hardware\.ir-service\.xiaomi u:object_r:hal_ir_default_exec:s0 # Proximity /dev/elliptic0 u:object_r:vendor_elliptic_device:s0 diff --git a/sepolicy/vendor/hal_ir_default.te b/sepolicy/vendor/hal_ir_default.te index 67cab21..75230af 100644 --- a/sepolicy/vendor/hal_ir_default.te +++ b/sepolicy/vendor/hal_ir_default.te @@ -1,3 +1,3 @@ -type vendor_ir_device, dev_type; +type lirc_device, dev_type; -allow hal_ir_default vendor_ir_device:chr_file rw_file_perms; +allow hal_ir_default lirc_device:chr_file rw_file_perms;