diff options
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 28d4433f1e21..2751b54ebdb7 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -6657,12 +6657,13 @@ public final class ActivityThread extends ClientTransactionHandler // Setup a location to store generated/compiled graphics code. final Context deviceContext = context.createDeviceProtectedStorageContext(); final File codeCacheDir = deviceContext.getCodeCacheDir(); - if (codeCacheDir != null) { + final File deviceCacheDir = deviceContext.getCacheDir(); + if (codeCacheDir != null && deviceCacheDir != null) { try { int uid = Process.myUid(); String[] packages = getPackageManager().getPackagesForUid(uid); if (packages != null) { - HardwareRenderer.setupDiskCache(codeCacheDir); + HardwareRenderer.setupDiskCache(deviceCacheDir); RenderScriptCacheDir.setupDiskCache(codeCacheDir); } } catch (RemoteException e) { |