From 04f9a60e4c2e62e1f91f01820f72e301d2930d3a Mon Sep 17 00:00:00 2001 From: roynatech2544 Date: Fri, 27 Oct 2023 20:13:11 +0900 Subject: [PATCH] universal7885: Bring back lights HAL --- .../sepolicy/vendor/hal_light_default.te | 9 +++++++++ universal7885-common/universal7885-common.mk | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 universal7885-common/sepolicy/vendor/hal_light_default.te diff --git a/universal7885-common/sepolicy/vendor/hal_light_default.te b/universal7885-common/sepolicy/vendor/hal_light_default.te new file mode 100644 index 0000000..6cd32fd --- /dev/null +++ b/universal7885-common/sepolicy/vendor/hal_light_default.te @@ -0,0 +1,9 @@ +# hal_light_default.te + +# /sys/devices/platform/panel@0/backlight/panel/brightness +# /sys/devices/platform/panel@0/backlight/panel/max_brightness +allow hal_light_default sysfs_backlight_writable:file rw_file_perms; +allow hal_light_default sysfs_graphics:dir search; +allow hal_light_default sysfs_graphics:file rw_file_perms; +allow hal_light_default sysfs_virtual:dir search; +allow hal_light_default sysfs_virtual:file rw_file_perms; diff --git a/universal7885-common/universal7885-common.mk b/universal7885-common/universal7885-common.mk index 3e884fd..04d418b 100644 --- a/universal7885-common/universal7885-common.mk +++ b/universal7885-common/universal7885-common.mk @@ -179,6 +179,10 @@ PRODUCT_PACKAGES += \ init.target.rc \ init.baseband.rc +# Lights +PRODUCT_PACKAGES += \ + android.hardware.light-service.samsung + # Keylayout PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/keylayout/Codec3035_Headset_Events.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Codec3035_Headset_Events.kl \