dexopt: Replace -Xhidden-api-checks with -Xhidden-api-policy
Command line flag is changed to enable passing all valid values. Adjust
dexopt accordingly.
Bug: 125701194
Test: compiles, boots, dexopt working
Change-Id: I4807bb0a99ec37a69ca64a3bdbf9a441531bdfb7
(cherry picked from commit 36133d1ab9a48550e815ef3a0528610aa4c099d0)
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index a5cc0df..dbb4f22 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -534,7 +534,7 @@
}
AddRuntimeArg(target_sdk_version_arg);
if (enable_hidden_api_checks) {
- AddRuntimeArg("-Xhidden-api-checks");
+ AddRuntimeArg("-Xhidden-api-policy:enabled");
}
if (dex_metadata_fd > -1) {