Pass dexopt flags as integer
Instead of using a series of booleans, create a single flags integer
that contains all of the dexopt options.
Change-Id: I35542aa73ca57b0e765d19b1339b1429849c1ae8
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index 3d82663..3a9b54f 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -47,10 +47,9 @@
static int do_dexopt(char **arg, char reply[REPLY_MAX] __unused)
{
- /* apk_path, uid, is_public, pkgname, instruction_set,
- * dexopt_needed, vm_safe_mode, debuggable, oat_dir, boot_complete */
- return dexopt(arg[0], atoi(arg[1]), atoi(arg[2]), arg[3], arg[4], atoi(arg[5]),
- atoi(arg[6]), atoi(arg[7]), arg[8], atoi(arg[9]));
+ /* apk_path, uid, pkgname, instruction_set, dexopt_needed, oat_dir, dexopt_flags */
+ return dexopt(arg[0], atoi(arg[1]), arg[2], arg[3], atoi(arg[4]),
+ arg[5], atoi(arg[6]));
}
static int do_mark_boot_complete(char **arg, char reply[REPLY_MAX] __unused)
@@ -188,7 +187,7 @@
struct cmdinfo cmds[] = {
{ "ping", 0, do_ping },
{ "install", 5, do_install },
- { "dexopt", 10, do_dexopt },
+ { "dexopt", 7, do_dexopt },
{ "markbootcomplete", 1, do_mark_boot_complete },
{ "movedex", 3, do_move_dex },
{ "rmdex", 2, do_rm_dex },