ART: ART pre-install system-server
Add support to optimize the system server components.
Slightly refactor fsverity point to avoid duplicated work, as
a second enable is not only superfluous, but also not idempotent.
Bug: 125474642
Test: m
Test: manual
Change-Id: I9321581815da1581690ad063ef2f351214c8d956
diff --git a/build/apex/art_preinstall_hook.sh b/build/apex/art_preinstall_hook.sh
index 8ff7edb..94a1b21 100644
--- a/build/apex/art_preinstall_hook.sh
+++ b/build/apex/art_preinstall_hook.sh
@@ -40,4 +40,10 @@
`dirname $0`/art_preinstall_hook_boot $ARCH || exit 200
done
-# TODO: System server.
+PRIMARY_ARCH=`echo $ARCHES | sed -e 's/ .*//'`
+`dirname $0`/art_preinstall_hook_system_server $PRIMARY_ARCH || exit 300
+
+FILES=`find /data/dalvik-cache -type f`
+for FILE in $FILES ; do
+ setup_fsverity $FILE || exit 400
+done