Loading core/java/android/provider/ContactsContract.java +12 −19 Original line number Original line Diff line number Diff line Loading @@ -2113,29 +2113,22 @@ public final class ContactsContract { Data.DATA_VERSION); Data.DATA_VERSION); for (String key : DATA_KEYS) { for (String key : DATA_KEYS) { final int columnIndex = cursor.getColumnIndexOrThrow(key); final int columnIndex = cursor.getColumnIndexOrThrow(key); if (cursor.isNull(columnIndex)) { switch (cursor.getType(columnIndex)) { case Cursor.FIELD_TYPE_NULL: // don't put anything // don't put anything } else { break; try { case Cursor.FIELD_TYPE_INTEGER: case Cursor.FIELD_TYPE_FLOAT: case Cursor.FIELD_TYPE_STRING: cv.put(key, cursor.getString(columnIndex)); cv.put(key, cursor.getString(columnIndex)); } catch (SQLiteException e) { break; case Cursor.FIELD_TYPE_BLOB: cv.put(key, cursor.getBlob(columnIndex)); cv.put(key, cursor.getBlob(columnIndex)); break; default: throw new IllegalStateException("Invalid or unhandled data type"); } } } } // TODO: go back to this version of the code when bug // http://b/issue?id=2306370 is fixed. // if (cursor.isNull(columnIndex)) { // // don't put anything // } else if (cursor.isLong(columnIndex)) { // values.put(key, cursor.getLong(columnIndex)); // } else if (cursor.isFloat(columnIndex)) { // values.put(key, cursor.getFloat(columnIndex)); // } else if (cursor.isString(columnIndex)) { // values.put(key, cursor.getString(columnIndex)); // } else if (cursor.isBlob(columnIndex)) { // values.put(key, cursor.getBlob(columnIndex)); // } } contact.addSubValue(ContactsContract.Data.CONTENT_URI, cv); contact.addSubValue(ContactsContract.Data.CONTENT_URI, cv); } while (cursor.moveToNext()); } while (cursor.moveToNext()); Loading Loading
core/java/android/provider/ContactsContract.java +12 −19 Original line number Original line Diff line number Diff line Loading @@ -2113,29 +2113,22 @@ public final class ContactsContract { Data.DATA_VERSION); Data.DATA_VERSION); for (String key : DATA_KEYS) { for (String key : DATA_KEYS) { final int columnIndex = cursor.getColumnIndexOrThrow(key); final int columnIndex = cursor.getColumnIndexOrThrow(key); if (cursor.isNull(columnIndex)) { switch (cursor.getType(columnIndex)) { case Cursor.FIELD_TYPE_NULL: // don't put anything // don't put anything } else { break; try { case Cursor.FIELD_TYPE_INTEGER: case Cursor.FIELD_TYPE_FLOAT: case Cursor.FIELD_TYPE_STRING: cv.put(key, cursor.getString(columnIndex)); cv.put(key, cursor.getString(columnIndex)); } catch (SQLiteException e) { break; case Cursor.FIELD_TYPE_BLOB: cv.put(key, cursor.getBlob(columnIndex)); cv.put(key, cursor.getBlob(columnIndex)); break; default: throw new IllegalStateException("Invalid or unhandled data type"); } } } } // TODO: go back to this version of the code when bug // http://b/issue?id=2306370 is fixed. // if (cursor.isNull(columnIndex)) { // // don't put anything // } else if (cursor.isLong(columnIndex)) { // values.put(key, cursor.getLong(columnIndex)); // } else if (cursor.isFloat(columnIndex)) { // values.put(key, cursor.getFloat(columnIndex)); // } else if (cursor.isString(columnIndex)) { // values.put(key, cursor.getString(columnIndex)); // } else if (cursor.isBlob(columnIndex)) { // values.put(key, cursor.getBlob(columnIndex)); // } } contact.addSubValue(ContactsContract.Data.CONTENT_URI, cv); contact.addSubValue(ContactsContract.Data.CONTENT_URI, cv); } while (cursor.moveToNext()); } while (cursor.moveToNext()); Loading