am 622da682: Merge change 23765 into eclair

Merge commit '622da6829f11f0cacdbd6fe3b58f230d98115ed5' into eclair-plus-aosp

* commit '622da6829f11f0cacdbd6fe3b58f230d98115ed5':
  [Issue 2087123] Suppressing all exception when trying to load a photo for the in-call UI
This commit is contained in:
Dmitri Plotnikov
2009-09-02 20:24:04 -07:00
committed by Android Git Automerger

View File

@@ -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());