summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorctso <ctsoyars@gmail.com>2010-06-24 03:25:49 +0000
committerctso <ctsoyars@gmail.com>2010-06-24 03:25:49 +0000
commit6678bba7f69859fd51901fc87daa003c73a658a1 (patch)
tree61cb3fe0e975b50ea550a31220dcbba181dbf3b9
parent0529fceedd0fafb7eeb8d711998efeac73f4ed69 (diff)
downloadframeworks_base-6678bba7f69859fd51901fc87daa003c73a658a1.zip
frameworks_base-6678bba7f69859fd51901fc87daa003c73a658a1.tar.gz
frameworks_base-6678bba7f69859fd51901fc87daa003c73a658a1.tar.bz2
Allow property to disable dexopt on /cache
Change-Id: Ic74707c4bead387bbf82e4c6d5037efc2d2ebeaf
-rw-r--r--cmds/installd/commands.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index ccc6601..fff922f 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -405,6 +405,7 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src)
char *tmp;
int srclen;
int dstlen;
+ char dexopt_data_only[PROPERTY_VALUE_MAX];
srclen = strlen(src);
@@ -417,7 +418,13 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src)
return -1;
}
- const char *cache_path = strncmp(src, "/system", 7) ? DALVIK_CACHE_PREFIX : DALVIK_SYSTEM_CACHE_PREFIX;
+ const char *cache_path = DALVIK_CACHE_PREFIX;
+ if (!strncmp(src, "/system", 7)) {
+ property_get("dalvik.vm.dexopt-data-only" dexopt_data_only, "");
+ if (!strcmp(dexopt_data_only, "1")) {
+ cache_path = DALVIK_SYSTEM_CACHE_PREFIX;
+ }
+ }
dstlen = srclen + strlen(cache_path) +
strlen(DALVIK_CACHE_POSTFIX) + 1;