Merge commit '9d6783e774c5ade517dbba7c28cf3a16fdb4e635' * commit '9d6783e774c5ade517dbba7c28cf3a16fdb4e635': [Issue 2087123] Suppressing all exception when trying to load a photo for the in-call UI
This commit is contained in:
@@ -183,8 +183,14 @@ public class ContactsAsyncHelper extends Handler {
|
||||
|
||||
switch (msg.arg1) {
|
||||
case EVENT_LOAD_IMAGE:
|
||||
InputStream inputStream = Contacts.openContactPhotoInputStream(
|
||||
args.context.getContentResolver(), args.uri);
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
inputStream = Contacts.openContactPhotoInputStream(
|
||||
args.context.getContentResolver(), args.uri);
|
||||
} catch (Exception e) {
|
||||
Log.e(LOG_TAG, "Error opening photo input stream", e);
|
||||
}
|
||||
|
||||
if (inputStream != null) {
|
||||
args.result = Drawable.createFromStream(inputStream, args.uri.toString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user