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

Commit 2d20fc8f authored by Wu Ahan's avatar Wu Ahan Committed by Android (Google) Code Review
Browse files

Merge "Catch SecurityException while resolving image to avoid crashing."

parents 0995402a 6745c813
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -87,8 +87,8 @@ public class NotificationInlineImageCache implements NotificationInlineImageReso

            try {
                drawable = mResolver.resolveImage(target);
            } catch (IOException ex) {
                Log.d(TAG, "PreloadImageTask: Resolve failed from " + target);
            } catch (IOException | SecurityException ex) {
                Log.d(TAG, "PreloadImageTask: Resolve failed from " + target, ex);
            }

            return drawable;
+2 −2
Original line number Diff line number Diff line
@@ -81,8 +81,8 @@ public class NotificationInlineImageResolver implements ImageResolver {
        Drawable result = null;
        try {
            result = hasCache() ? mImageCache.get(uri) : resolveImage(uri);
        } catch (IOException ex) {
            Log.d(TAG, "loadImage: Can't load image from " + uri);
        } catch (IOException | SecurityException ex) {
            Log.d(TAG, "loadImage: Can't load image from " + uri, ex);
        }
        return result;
    }