* Use libbase logging and file utils * Read max brightness from sysfs * Convert constants to constexpr * Move helper functions to anonymous namespace * Bug fixes * Remove redundant chmod * Start the service after permissions are set up because it reads max brightness in constructor. Change-Id: I145d393c785e182060c5651e796d489f8c4d697b
31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
on boot
|
|
# Notification LED
|
|
chown system system /sys/class/leds/white/blink
|
|
chown system system /sys/class/leds/white/brightness
|
|
chown system system /sys/class/leds/white/duty_pcts
|
|
chown system system /sys/class/leds/white/max_brightness
|
|
chown system system /sys/class/leds/white/pause_hi
|
|
chown system system /sys/class/leds/white/pause_lo
|
|
chown system system /sys/class/leds/white/ramp_step_ms
|
|
chown system system /sys/class/leds/white/start_idx
|
|
|
|
chmod 660 /sys/class/leds/white/blink
|
|
chmod 660 /sys/class/leds/white/brightness
|
|
chmod 660 /sys/class/leds/white/duty_pcts
|
|
chmod 660 /sys/class/leds/white/pause_hi
|
|
chmod 660 /sys/class/leds/white/pause_lo
|
|
chmod 660 /sys/class/leds/white/ramp_step_ms
|
|
chmod 660 /sys/class/leds/white/start_idx
|
|
|
|
chown system system /sys/class/leds/lcd-backlight/max_brightness
|
|
|
|
start vendor.light-hal-2-0
|
|
|
|
service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_sdm660
|
|
interface android.hardware.light@2.0::ILight default
|
|
class hal
|
|
user system
|
|
group system
|
|
# shutting off lights while powering-off
|
|
shutdown critical
|
|
disabled
|