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

Commit 41d4332a authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Handle null cache directory" into jb-mr1-dev

parents 6715d1ef 92d57052
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -4070,10 +4070,14 @@ public final class ActivityThread {
        if (!Process.isIsolated()) {
            final File cacheDir = appContext.getCacheDir();

            if (cacheDir != null) {
                // Provide a usable directory for temporary files
                System.setProperty("java.io.tmpdir", cacheDir.getAbsolutePath());
    
                setupGraphicsSupport(data.info, cacheDir);
            } else {
                Log.e(TAG, "Unable to setupGraphicsSupport due to missing cache directory");
            }
        }
        /**
         * For system applications on userdebug/eng builds, log stack
+1 −1
Original line number Diff line number Diff line
@@ -769,7 +769,7 @@ class ContextImpl extends Context {
            }
            if (!mCacheDir.exists()) {
                if(!mCacheDir.mkdirs()) {
                    Log.w(TAG, "Unable to create cache directory");
                    Log.w(TAG, "Unable to create cache directory " + mCacheDir.getAbsolutePath());
                    return null;
                }
                FileUtils.setPermissions(