Fix npe in getCacheTotalSize.
Bug: 2882277 Change-Id: I9319a48e0ed75561d3d04691fb288f69d11edc84
This commit is contained in:
@@ -727,6 +727,9 @@ public class WebViewDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
long getCacheTotalSize() {
|
long getCacheTotalSize() {
|
||||||
|
if (mCacheDatabase == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
long size = 0;
|
long size = 0;
|
||||||
Cursor cursor = null;
|
Cursor cursor = null;
|
||||||
final String query = "SELECT SUM(contentlength) as sum FROM cache";
|
final String query = "SELECT SUM(contentlength) as sum FROM cache";
|
||||||
|
|||||||
Reference in New Issue
Block a user