Skip to content

Commit 43abfe1

Browse files
kristianmonsenAndroid (Google) Code Review
authored andcommitted
Merge "WebView part of fix for bug 5307956"
2 parents a625e1f + 0d491c1 commit 43abfe1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/java/android/webkit/JniUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import android.provider.Settings;
2323
import android.util.Log;
2424

25+
import java.io.File;
2526
import java.io.InputStream;
2627

2728
class JniUtil {
@@ -79,7 +80,12 @@ private static synchronized String getCacheDirectory() {
7980
checkInitialized();
8081

8182
if (sCacheDirectory == null) {
82-
sCacheDirectory = sContext.getCacheDir().getAbsolutePath();
83+
File cacheDir = sContext.getCacheDir();
84+
if (cacheDir == null) {
85+
sCacheDirectory = "";
86+
} else {
87+
sCacheDirectory = cacheDir.getAbsolutePath();
88+
}
8389
}
8490

8591
return sCacheDirectory;

0 commit comments

Comments
 (0)