Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62cadf15 authored by Kristian Monsen's avatar Kristian Monsen
Browse files

Workaround for bug 8700358: Reproducible WebView crash in Feedly starting in JWR22B

Catching all excptions from reading from the AssetManager

Change-Id: I53f99484deda3778307eab2ae86ca9fc0ad2fead
parent 4e0eb22f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -762,13 +762,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)) {