sanely handle duplicate contacts in db

// FREEBIE
This commit is contained in:
Jake McGinty 2014-05-06 02:14:44 -05:00 committed by Moxie Marlinspike
parent dff6997a65
commit 542e1984c1

View File

@ -214,7 +214,7 @@ public class ContactsDatabase {
values.put(NUMBER_TYPE_COLUMN, ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM);
values.put(NUMBER_COLUMN, user.numbers.get(0).number);
values.put(TYPE_COLUMN, PUSH_TYPE);
mDatabase.insert(TABLE_NAME, null, values);
mDatabase.insertWithOnConflict(TABLE_NAME, null, values, SQLiteDatabase.CONFLICT_IGNORE);
}
Log.d(TAG, "finished populating push users.");
}