Add a flag for recipientTrust.
parent
0e4a19c368
commit
2a133587cc
|
@ -368,6 +368,10 @@ public class RecipientDatabase extends Database {
|
||||||
throw new IllegalArgumentException("Must provide a UUID or E164!");
|
throw new IllegalArgumentException("Must provide a UUID or E164!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!FeatureFlags.recipientTrust()) {
|
||||||
|
highTrust = true;
|
||||||
|
}
|
||||||
|
|
||||||
RecipientId recipientNeedingRefresh = null;
|
RecipientId recipientNeedingRefresh = null;
|
||||||
Pair<RecipientId, RecipientId> remapped = null;
|
Pair<RecipientId, RecipientId> remapped = null;
|
||||||
boolean transactionSuccessful = false;
|
boolean transactionSuccessful = false;
|
||||||
|
|
|
@ -56,6 +56,7 @@ public final class FeatureFlags {
|
||||||
private static final String GROUPS_V2_CREATE = "android.groupsv2.create.2";
|
private static final String GROUPS_V2_CREATE = "android.groupsv2.create.2";
|
||||||
private static final String GROUPS_V2_CAPACITY = "android.groupsv2.capacity";
|
private static final String GROUPS_V2_CAPACITY = "android.groupsv2.capacity";
|
||||||
private static final String CDS = "android.cds";
|
private static final String CDS = "android.cds";
|
||||||
|
private static final String RECIPIENT_TRUST = "android.recipientTrust";
|
||||||
private static final String INTERNAL_USER = "android.internalUser";
|
private static final String INTERNAL_USER = "android.internalUser";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,6 +70,7 @@ public final class FeatureFlags {
|
||||||
GROUPS_V2,
|
GROUPS_V2,
|
||||||
GROUPS_V2_CREATE,
|
GROUPS_V2_CREATE,
|
||||||
GROUPS_V2_CAPACITY,
|
GROUPS_V2_CAPACITY,
|
||||||
|
RECIPIENT_TRUST,
|
||||||
INTERNAL_USER
|
INTERNAL_USER
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -91,7 +93,8 @@ public final class FeatureFlags {
|
||||||
*/
|
*/
|
||||||
private static final Set<String> HOT_SWAPPABLE = Sets.newHashSet(
|
private static final Set<String> HOT_SWAPPABLE = Sets.newHashSet(
|
||||||
ATTACHMENTS_V3,
|
ATTACHMENTS_V3,
|
||||||
GROUPS_V2_CREATE
|
GROUPS_V2_CREATE,
|
||||||
|
RECIPIENT_TRUST
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,7 +102,8 @@ public final class FeatureFlags {
|
||||||
*/
|
*/
|
||||||
private static final Set<String> STICKY = Sets.newHashSet(
|
private static final Set<String> STICKY = Sets.newHashSet(
|
||||||
GROUPS_V2,
|
GROUPS_V2,
|
||||||
GROUPS_V2_OLD
|
GROUPS_V2_OLD,
|
||||||
|
RECIPIENT_TRUST
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,6 +216,11 @@ public final class FeatureFlags {
|
||||||
return getBoolean(CDS, false);
|
return getBoolean(CDS, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Whether or not we allow different trust levels for recipient address sources. */
|
||||||
|
public static boolean recipientTrust() {
|
||||||
|
return getBoolean(RECIPIENT_TRUST, false);
|
||||||
|
}
|
||||||
|
|
||||||
/** Only for rendering debug info. */
|
/** Only for rendering debug info. */
|
||||||
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
|
||||||
return new TreeMap<>(REMOTE_VALUES);
|
return new TreeMap<>(REMOTE_VALUES);
|
||||||
|
|
Loading…
Reference in New Issue