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;
|
||||
}
|
||||
} else if (url.startsWith(ANDROID_ASSET)) {
|
||||
url = url.replaceFirst(ANDROID_ASSET, "");
|
||||
String assetUrl = url.replaceFirst(ANDROID_ASSET, "");
|
||||
try {
|
||||
AssetManager assets = mContext.getAssets();
|
||||
Uri uri = Uri.parse(url);
|
||||
Uri uri = Uri.parse(assetUrl);
|
||||
return assets.open(uri.getPath(), AssetManager.ACCESS_STREAMING);
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
Log.w(LOGTAG, "Problem loading url: " + url, e);
|
||||
return null;
|
||||
}
|
||||
} else if (mSettings.getAllowContentAccess() &&
|
||||
url.startsWith(ANDROID_CONTENT)) {
|
||||
|
||||
Reference in New Issue
Block a user