Caught another exception when sharing contacts.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1789 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin@google.com 2011-05-20 15:40:21 +00:00
parent f957304831
commit e2ef16f46f

View file

@ -196,7 +196,13 @@ public final class ShareActivity extends Activity {
return; // Show error?
}
ContentResolver resolver = getContentResolver();
Cursor contactCursor = resolver.query(contactUri, null, null, null, null);
Cursor contactCursor;
try {
// We're seeing about six reports a week of this exception although I don't understand why.
contactCursor = resolver.query(contactUri, null, null, null, null);
} catch (IllegalArgumentException e) {
return;
}
Bundle bundle = new Bundle();
if (contactCursor != null && contactCursor.moveToFirst()) {
int nameColumn = contactCursor.getColumnIndex(Contacts.PeopleColumns.NAME);