Refactor argument parsing in ota preopt

Unify the parsing of all the versions. This will make it much
easier to extend the interface to accept new arguments.

(cherry picked from commit 7707aeaa92171bc34718ceaf0554e982d2e92729)

Test: installd_otapreopt_test
Bug: 30934496
Merged-In: Idf945d3f4078b4ef86e2c2532b321768d2868fa7
Change-Id: Idf945d3f4078b4ef86e2c2532b321768d2868fa7
diff --git a/cmds/installd/otapreopt_parameters.h b/cmds/installd/otapreopt_parameters.h
index 20faeb5..eb5dd85 100644
--- a/cmds/installd/otapreopt_parameters.h
+++ b/cmds/installd/otapreopt_parameters.h
@@ -28,11 +28,8 @@
     bool ReadArguments(int argc, const char** argv);
 
   private:
-    bool ReadArgumentsV1(int argc, const char** argv);
-    bool ReadArgumentsV2(int argc, const char** argv, bool versioned);
-    bool ReadArgumentsV3(int argc, const char** argv);
-    bool ReadArgumentsV4(int argc, const char** argv);
-    bool ReadArgumentsV5(int argc, const char** argv);
+    bool ReadArgumentsV1(const char** argv);
+    bool ReadArgumentsPostV1(uint32_t version, const char** argv, bool versioned);
 
     const char* apk_path;
     uid_t uid;