diff options
| author | Amith Yamasani <yamasani@google.com> | 2012-08-17 18:00:52 -0700 |
|---|---|---|
| committer | Amith Yamasani <yamasani@google.com> | 2012-08-17 18:01:24 -0700 |
| commit | 11de39a5cfa41e6518b7e9d171a0dc5888538c94 (patch) | |
| tree | 3da0a9eca66741c78476d3b7c448c0d2a20890e2 /core/java/android/app/ActivityThread.java | |
| parent | 427dccc0cdc315f6a4b2be9954ff16f802cd9a60 (diff) | |
Don't create cache directory for isolated processes
They don't have access anyway
This makes Chrome work in secondary users
Change-Id: I4d30581bc6e807901e642893d6964854c0567fec
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
| -rw-r--r-- | core/java/android/app/ActivityThread.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 7eb86f41c4b5..0438e772c88b 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -4055,13 +4055,14 @@ public final class ActivityThread { final ContextImpl appContext = new ContextImpl(); appContext.init(data.info, null, this); - final File cacheDir = appContext.getCacheDir(); + if (!Process.isIsolated()) { + final File cacheDir = appContext.getCacheDir(); - // Provide a usable directory for temporary files - System.setProperty("java.io.tmpdir", cacheDir.getAbsolutePath()); - - setupGraphicsSupport(data.info, cacheDir); + // Provide a usable directory for temporary files + System.setProperty("java.io.tmpdir", cacheDir.getAbsolutePath()); + setupGraphicsSupport(data.info, cacheDir); + } /** * For system applications on userdebug/eng builds, log stack * traces of disk and network access to dropbox for analysis. |
