Support for storing OAT files in app directory

Changes to installd:
- dexopt now allows oat_dir param for custom output directory
- Added helper method calculate_oat_file_path for calculating oat file
  output location based on oat_dir and apk_path.

Bug: 19550105
Change-Id: I6b079207310583adeb6dad918a58034a059e34c4
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index 47577d6..9c30a35 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -220,9 +220,14 @@
              int64_t *codesize, int64_t *datasize, int64_t *cachesize, int64_t *asecsize);
 int free_cache(int64_t free_size);
 int dexopt(const char *apk_path, uid_t uid, bool is_public, const char *pkgName,
-           const char *instruction_set, bool vm_safe_mode, bool should_relocate, bool debuggable);
+           const char *instruction_set, bool vm_safe_mode, bool should_relocate, bool debuggable, 
+           const char* outputPath);
 int mark_boot_complete(const char *instruction_set);
 int movefiles();
 int linklib(const char* target, const char* source, int userId);
 int idmap(const char *target_path, const char *overlay_path, uid_t uid);
 int restorecon_data();
+int create_oat_dir(const char* oat_dir, const char *instruction_set);
+int rm_package_dir(const char* apk_path);
+int calculate_oat_file_path(char path[PKG_PATH_MAX], const char *oat_dir, const char *apk_path,
+                            const char *instruction_set);
\ No newline at end of file