mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Remove uuidOnlyContacts feature flag.
This commit is contained in:
@@ -689,13 +689,13 @@ public class RecipientDatabase extends Database {
|
||||
|
||||
try {
|
||||
for (SignalContactRecord insert : contactInserts) {
|
||||
ContentValues values = validateContactValuesForInsert(getValuesForStorageContact(insert, true));
|
||||
ContentValues values = getValuesForStorageContact(insert, true);
|
||||
long id = db.insertWithOnConflict(TABLE_NAME, null, values, SQLiteDatabase.CONFLICT_IGNORE);
|
||||
|
||||
RecipientId recipientId;
|
||||
|
||||
if (id < 0) {
|
||||
values = validateContactValuesForInsert(getValuesForStorageContact(insert, false));
|
||||
values = getValuesForStorageContact(insert, false);
|
||||
Log.w(TAG, "Failed to insert! It's likely that these were newly-registered users that were missed in the merge. Doing an update instead.");
|
||||
|
||||
if (insert.getAddress().getNumber().isPresent()) {
|
||||
@@ -2145,17 +2145,6 @@ public class RecipientDatabase extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
private static ContentValues validateContactValuesForInsert(ContentValues values) {
|
||||
if (!FeatureFlags.uuidOnlyContacts() &&
|
||||
values.getAsString(UUID) != null &&
|
||||
values.getAsString(PHONE) == null)
|
||||
{
|
||||
throw new UuidRecipientError();
|
||||
} else {
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges one UUID recipient with an E164 recipient. It is assumed that the E164 recipient does
|
||||
* *not* have a UUID.
|
||||
|
||||
Reference in New Issue
Block a user