Installd: Change app image name computation
Refactor computation to take A/B OTAs into account.
Fix a const issue.
Bug: 25612095
Change-Id: I5cf79def532d1eeec4b35bb80014376959083a83
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp
index 05e4cfa..3775709 100644
--- a/cmds/installd/otapreopt.cpp
+++ b/cmds/installd/otapreopt.cpp
@@ -491,7 +491,6 @@
////////////////////////
int get_property(const char *key, char *value, const char *default_value) {
- // TODO: Replace with system-properties map.
return gOps.GetProperty(key, value, default_value);
}
@@ -499,9 +498,8 @@
bool calculate_oat_file_path(char path[PKG_PATH_MAX], const char *oat_dir,
const char *apk_path,
const char *instruction_set) {
- // TODO: Insert B directory.
- char *file_name_start;
- char *file_name_end;
+ const char *file_name_start;
+ const char *file_name_end;
file_name_start = strrchr(apk_path, '/');
if (file_name_start == nullptr) {