am 58665709: Merge "Workaround for bug 8700358: Reproducible WebView crash in Feedly starting in JWR22B" into jb-mr2-dev

* commit '5866570947a7ef325f74d9dbfc1ccbdd02d3e7b6':
  Workaround for bug 8700358: Reproducible WebView crash in Feedly starting in JWR22B
This commit is contained in:
Kristian Monsen
2013-04-25 21:22:26 -07:00
committed by Android Git Automerger

View File

@@ -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)) {