diff options
author | ctso <ctsoyars@gmail.com> | 2010-06-23 21:59:03 +0000 |
---|---|---|
committer | ctso <ctsoyars@gmail.com> | 2010-06-23 21:59:03 +0000 |
commit | d6c372759b6c48b993a0b85a2b86f55f7d5197d0 (patch) | |
tree | e5a2058b72c418c4a7539fa26480ac4bf1485893 /cmds/installd | |
parent | 61229acdcc8d1147ddea0df79db59041551b6fdf (diff) | |
download | frameworks_base-d6c372759b6c48b993a0b85a2b86f55f7d5197d0.zip frameworks_base-d6c372759b6c48b993a0b85a2b86f55f7d5197d0.tar.gz frameworks_base-d6c372759b6c48b993a0b85a2b86f55f7d5197d0.tar.bz2 |
Allow system property to disable use of /cache for dexfiles.
Conflicts:
cmds/installd/commands.c
Change-Id: I1d628a9352637c9af7d03124bc0159cbe1d7ac06
Diffstat (limited to 'cmds/installd')
-rw-r--r-- | cmds/installd/commands.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index ccc6601..4992872 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; |