Adds support for restore dexopt flag
This change adds support for a restore dexopt flag that modifies
installd to start dex2oat with a custom cpu set.
Bug: 135202722
Test: manual;adb install --install-reason 2 <apk>
Change-Id: If9ff54277d02d54c7b2dbb2659b708de6eecd500
Merged-In: If9ff54277d02d54c7b2dbb2659b708de6eecd500
(cherry picked from commit 00d3f4f8d2c0fadc3c1554c712e26a4902d802ec)
diff --git a/cmds/installd/tests/installd_dexopt_test.cpp b/cmds/installd/tests/installd_dexopt_test.cpp
index 7d8cf1f..9a1888c 100644
--- a/cmds/installd/tests/installd_dexopt_test.cpp
+++ b/cmds/installd/tests/installd_dexopt_test.cpp
@@ -643,6 +643,15 @@
DEX2OAT_FROM_SCRATCH);
}
+TEST_F(DexoptTest, DexoptPrimaryPublicRestore) {
+ LOG(INFO) << "DexoptPrimaryPublicRestore";
+ CompilePrimaryDexOk("verify",
+ DEXOPT_FOR_RESTORE | DEXOPT_BOOTCOMPLETE | DEXOPT_PUBLIC,
+ app_oat_dir_.c_str(),
+ kTestAppGid,
+ DEX2OAT_FROM_SCRATCH);
+}
+
TEST_F(DexoptTest, DexoptPrimaryFailedInvalidFilter) {
LOG(INFO) << "DexoptPrimaryFailedInvalidFilter";
binder::Status status;