Use more specific option to set dark mode
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: I6fd5dfdc88d041223121d7ecfa5abe10a1a03844
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index 3287aa8..aa9688c 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -90,9 +90,6 @@
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
TARGET_RECOVERY_UI_LIB := \
librecovery_ui_pixel \
- libnos_citadel_for_recovery \
- libnos_for_recovery \
- libbootloader_message \
libfstab
# system.img
diff --git a/init.hardware.rc b/init.hardware.rc
index 5044a59..e66d5a5 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -894,15 +894,13 @@
on property:vendor.fps.init.succeed=true && property:init.svc.vendor.fps_hal=stopped
start init-fingerprint-sh
-# Write the dark theme magic (`theme-dark`, or 0x7468656d652d6461726b in hex string) to /misc
-# partition. Offset 0 in vendor space is effectively offset 2048 in /misc partition.
-service vendor.theme_set /vendor/bin/misc_writer --vendor-space-offset 0 --hex-string 0x7468656d652d6461726b
+# Write the dark theme magic to /misc partition.
+service vendor.theme_set /vendor/bin/misc_writer --set-dark-theme
disabled
oneshot
-# Clear the 10-byte dark theme magic in /misc partition. Offset 0 in vendor space is effectively
-# offset 2048 in /misc partition.
-service vendor.theme_clear /vendor/bin/misc_writer --vendor-space-offset 0 --hex-string 0x00000000000000000000
+# Clear the dark theme magic in /misc partition.
+service vendor.theme_clear /vendor/bin/misc_writer --clear-dark-theme
disabled
oneshot