aboutsummaryrefslogtreecommitdiff
path: root/libdex/OptInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libdex/OptInvocation.cpp')
-rw-r--r--libdex/OptInvocation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdex/OptInvocation.cpp b/libdex/OptInvocation.cpp
index 77a72b34e..ad69a9efa 100644
--- a/libdex/OptInvocation.cpp
+++ b/libdex/OptInvocation.cpp
@@ -32,7 +32,9 @@
#include "OptInvocation.h"
#include "DexFile.h"
+#ifdef ALLOW_DEXROOT_ON_CACHE
#include <cutils/properties.h>
+#endif
static const char* kCacheDirectoryName = "dalvik-cache";
static const char* kClassesDex = "classes.dex";
@@ -56,7 +58,9 @@ char* dexOptGenerateCacheFileName(const char* fileName, const char* subFileName)
const char* cacheRoot;
const char* systemRoot;
char* cp;
+#ifdef ALLOW_DEXROOT_ON_CACHE
char dexoptDataOnly[PROPERTY_VALUE_MAX];
+#endif
/*
* Get the absolute path of the Jar or DEX file.
@@ -115,7 +119,9 @@ char* dexOptGenerateCacheFileName(const char* fileName, const char* subFileName)
if (systemRoot == NULL)
systemRoot = "/system";
+#ifdef ALLOW_DEXROOT_ON_CACHE
if (dexRoot == NULL)
+#endif
dexRoot = dataRoot;
#ifdef ALLOW_DEXROOT_ON_CACHE