Merge "Workaround for bug 8700358: Reproducible WebView crash in Feedly starting in JWR22B" into jb-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5866570947
@@ -757,13 +757,16 @@ class BrowserFrame extends Handler {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else if (url.startsWith(ANDROID_ASSET)) {
|
} else if (url.startsWith(ANDROID_ASSET)) {
|
||||||
url = url.replaceFirst(ANDROID_ASSET, "");
|
String assetUrl = url.replaceFirst(ANDROID_ASSET, "");
|
||||||
try {
|
try {
|
||||||
AssetManager assets = mContext.getAssets();
|
AssetManager assets = mContext.getAssets();
|
||||||
Uri uri = Uri.parse(url);
|
Uri uri = Uri.parse(assetUrl);
|
||||||
return assets.open(uri.getPath(), AssetManager.ACCESS_STREAMING);
|
return assets.open(uri.getPath(), AssetManager.ACCESS_STREAMING);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
return null;
|
return null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.w(LOGTAG, "Problem loading url: " + url, e);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
} else if (mSettings.getAllowContentAccess() &&
|
} else if (mSettings.getAllowContentAccess() &&
|
||||||
url.startsWith(ANDROID_CONTENT)) {
|
url.startsWith(ANDROID_CONTENT)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user