Remove uuidOnlyContacts feature flag.

This commit is contained in:
Greyson Parrelli
2020-07-21 14:26:40 -04:00
parent 4e55d2d941
commit 870cee5707
6 changed files with 8 additions and 48 deletions

View File

@@ -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.