-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Close leaked InputStream #737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: androidx-main
Are you sure you want to change the base?
Conversation
framework icon also has this problem. |
This fails to compile
please fix. |
return new BitmapDrawable(context.getResources(), | ||
BitmapFactory.decodeStream(is)); | ||
} catch (Exception e) { | ||
/* ignore */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: for consistency with the existing error logging in loadDrawableInner()
(e.g. line 590), consider logging the exception instead of silently ignoring it:
catch (Exception e) {
Log.e(TAG, "Unable to load image from URI: " + getUri(), e);
}
This would make debugging easier while preserving current fallback behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Proposed Changes
Testing
Test: no test.
Issues Fixed
Fixes: The bug on https://issuetracker.google.com/issues/387245369 being fixed