diff options
| author | 2011-10-21 04:48:22 -0700 | |
|---|---|---|
| committer | 2011-10-21 04:48:22 -0700 | |
| commit | 43abfe1be2ba6558b6f6f555ba7d646acb40040c (patch) | |
| tree | 73986ad9ef6aee1141ed8a29147dee570edefe7c | |
| parent | a625e1fe108d7e81dfd1b39d8a1cbdc53457721d (diff) | |
| parent | 0d491c1dce964ee94a805c595fbf589dbbb2902e (diff) | |
Merge "WebView part of fix for bug 5307956"
| -rw-r--r-- | core/java/android/webkit/JniUtil.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/webkit/JniUtil.java b/core/java/android/webkit/JniUtil.java index 7759ff37053e..466204040a89 100644 --- a/core/java/android/webkit/JniUtil.java +++ b/core/java/android/webkit/JniUtil.java @@ -22,6 +22,7 @@ import android.net.Uri; import android.provider.Settings; import android.util.Log; +import java.io.File; import java.io.InputStream; class JniUtil { @@ -79,7 +80,12 @@ class JniUtil { checkInitialized(); if (sCacheDirectory == null) { - sCacheDirectory = sContext.getCacheDir().getAbsolutePath(); + File cacheDir = sContext.getCacheDir(); + if (cacheDir == null) { + sCacheDirectory = ""; + } else { + sCacheDirectory = cacheDir.getAbsolutePath(); + } } return sCacheDirectory; |