Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b42c83e authored by Steve Kondik's avatar Steve Kondik
Browse files

Allow system property to disable use of /cache for dexfiles.

parent 726ffb33
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -373,6 +373,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);

@@ -387,8 +388,11 @@ int create_cache_path(char path[PKG_PATH_MAX], const char *src)

    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;
        }
    }
    if (!strncmp(src, "/sd-ext", 7)) {
        cache_path = DALVIK_SDEXT_CACHE_PREFIX;
    }