mirror of
https://github.com/Evolution-X-Devices/device_google_taimen
synced 2026-01-29 17:26:36 +00:00
We have switch misc_writer to use more specific flags to set the dark mode. Modify the caller as well. Bug: 131775112 Test: set dark mode, check device boots with dark mode Change-Id: Ic79a83f58c3b0ca09dd530f28e93da234ae4463a
77 lines
2.8 KiB
Plaintext
77 lines
2.8 KiB
Plaintext
on late-fs
|
|
# boot time fs tune
|
|
write /sys/block/sda/queue/iostats 0
|
|
write /sys/block/sda/queue/scheduler cfq
|
|
write /sys/block/sda/queue/iosched/slice_idle 0
|
|
write /sys/block/sda/queue/read_ahead_kb 2048
|
|
write /sys/block/sda/queue/nr_requests 256
|
|
write /sys/block/sde/queue/iostats 0
|
|
write /sys/block/sde/queue/scheduler cfq
|
|
write /sys/block/sde/queue/iosched/slice_idle 0
|
|
write /sys/block/sde/queue/read_ahead_kb 2048
|
|
write /sys/block/sde/queue/nr_requests 256
|
|
write /sys/block/dm-0/queue/read_ahead_kb 2048
|
|
write /sys/block/dm-1/queue/read_ahead_kb 2048
|
|
|
|
on property:sys.boot_completed=1
|
|
# end boot time fs tune
|
|
write /sys/block/sda/queue/read_ahead_kb 128
|
|
write /sys/block/sda/queue/nr_requests 128
|
|
write /sys/block/sda/queue/iostats 1
|
|
write /sys/block/sde/queue/read_ahead_kb 128
|
|
write /sys/block/sde/queue/nr_requests 128
|
|
write /sys/block/sde/queue/iostats 1
|
|
write /sys/block/dm-0/queue/read_ahead_kb 128
|
|
write /sys/block/dm-1/queue/read_ahead_kb 128
|
|
|
|
on boot
|
|
# Allow ftm4 autotune from adb shell
|
|
chown system shell /sys/devices/virtual/input/ftm4_touch/autotune
|
|
|
|
on init && property:ro.boot.revision=*
|
|
setprop ro.boot.hardware.revision ${ro.boot.revision}
|
|
|
|
on property:init.svc.vendor.fps_hal=running && property:ro.boot.revision=rev_0
|
|
stop vendor.fps_hal
|
|
|
|
on property:sys.all.modules.ready=1
|
|
# Update touch firmware if required
|
|
write /sys/devices/virtual/input/ftm4_touch/check_fw 1
|
|
|
|
on property:ro.boot.hardware.display=2-1
|
|
setprop sys.display.low_persistence_mode_brightness 255
|
|
|
|
on property:persist.vendor.charge.stop.level=* && property:sys.all.modules.ready=1
|
|
write /sys/module/lge_battery/parameters/charge_stop_level ${persist.vendor.charge.stop.level}
|
|
|
|
on property:persist.vendor.charge.start.level=* && property:sys.all.modules.ready=1
|
|
write /sys/module/lge_battery/parameters/charge_start_level ${persist.vendor.charge.start.level}
|
|
|
|
on late-init && property:ro.boot.revision=rev_a
|
|
setprop vendor.thermal.config thermal_info_config_evt.json
|
|
|
|
on late-init && property:ro.boot.revision=rev_b
|
|
setprop vendor.thermal.config thermal_info_config_evt.json
|
|
|
|
# Write the dark theme magic to /misc partition.
|
|
service vendor.theme_set /vendor/bin/misc_writer --set-dark-theme
|
|
disabled
|
|
oneshot
|
|
|
|
# Clear the dark theme magic in /misc partition.
|
|
service vendor.theme_clear /vendor/bin/misc_writer --clear-dark-theme
|
|
disabled
|
|
oneshot
|
|
|
|
# Set the dark boot flag on dark mode (UiModeManager.MODE_NIGHT_YES == 2).
|
|
on property:persist.sys.theme=2
|
|
start vendor.theme_set
|
|
|
|
# Clear the dark theme flag on light mode (UiModeManager.MODE_NIGHT_NO == 1) or auto mode
|
|
# (UiModeManager.MODE_NIGHT_AUTO == 0).
|
|
on property:persist.sys.theme=1
|
|
start vendor.theme_clear
|
|
|
|
on property:persist.sys.theme=0
|
|
start vendor.theme_clear
|