diff options
author | Steve Kondik <shade@chemlab.org> | 2013-10-22 10:30:32 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-10-22 10:30:32 -0700 |
commit | 6b8f083f75739ed50ea548e13ed1d2a4cc65d5e9 (patch) | |
tree | 0d720890aad067fa04b631280577531ac27e8d0a | |
parent | 4447aef57040f8b47b22a9f95e8ac04cc5447f1c (diff) | |
download | android_frameworks_native-6b8f083f75739ed50ea548e13ed1d2a4cc65d5e9.tar.gz android_frameworks_native-6b8f083f75739ed50ea548e13ed1d2a4cc65d5e9.tar.bz2 android_frameworks_native-6b8f083f75739ed50ea548e13ed1d2a4cc65d5e9.zip |
installd: Skip dexroot-on-cache for user builds
Change-Id: Ia724cce7e904558654f5a0ed853e817c768d1383
-rw-r--r-- | cmds/installd/Android.mk | 4 | ||||
-rw-r--r-- | cmds/installd/commands.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cmds/installd/Android.mk b/cmds/installd/Android.mk index e11b4f87e..35f937438 100644 --- a/cmds/installd/Android.mk +++ b/cmds/installd/Android.mk @@ -7,6 +7,10 @@ common_src_files := \ # Static library used in testing and executable # +ifneq ($(TARGET_BUILD_VARIANT),user) + LOCAL_CFLAGS += -DALLOW_DEXROOT_ON_CACHE +endif + include $(CLEAR_VARS) LOCAL_SRC_FILES := \ diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 9586fcb8d..ff77ab802 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -561,12 +561,14 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src) } const char *cache_path = DALVIK_CACHE_PREFIX; +#ifdef ALLOW_DEXROOT_ON_CACHE if (!strncmp(src, "/system", 7)) { property_get("dalvik.vm.dexopt-data-only", dexopt_data_only, ""); if (strcmp(dexopt_data_only, "1") != 0) { cache_path = DALVIK_SYSTEM_CACHE_PREFIX; } } +#endif dstlen = srclen + strlen(cache_path) + strlen(DALVIK_CACHE_POSTFIX) + 1; |