Skip to content

Commit 205a4c1

Browse files
committed
Add OTA update hook for Pre-reboot Dexopt.
Bug: 311377497 Test: manual - Install an OTA package and see the hook called. Change-Id: Ide8fd51b0490465940ce539195eeda56ccecef49
1 parent f3166e4 commit 205a4c1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cmds/installd/otapreopt_script.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ else
5050
exit 1
5151
fi
5252

53+
if pm art on-ota-staged --slot "$TARGET_SLOT_SUFFIX"; then
54+
# Handled by Pre-reboot Dexopt.
55+
exit 0
56+
fi
57+
echo "Pre-reboot Dexopt not enabled. Fall back to otapreopt."
58+
5359
if [ "$(/system/bin/otapreopt_chroot --version)" != 2 ]; then
5460
# We require an updated chroot wrapper that reads dexopt commands from stdin.
5561
# Even if we kept compat with the old binary, the OTA preopt wouldn't work due

0 commit comments

Comments
 (0)