Make verificationV2 a separate flag.
This commit is contained in:
parent
1634d7d531
commit
57150a20fd
2 changed files with 14 additions and 5 deletions
|
@ -307,7 +307,7 @@ public class VerifyIdentityActivity extends PassphraseRequiredActivity implement
|
||||||
byte[] localId;
|
byte[] localId;
|
||||||
byte[] remoteId;
|
byte[] remoteId;
|
||||||
|
|
||||||
if (FeatureFlags.cds() && recipient.resolve().getUuid().isPresent()) {
|
if (FeatureFlags.verifyV2() && recipient.resolve().getUuid().isPresent()) {
|
||||||
Log.i(TAG, "Using UUID (version 2).");
|
Log.i(TAG, "Using UUID (version 2).");
|
||||||
version = 2;
|
version = 2;
|
||||||
localId = UuidUtil.toByteArray(TextSecurePreferences.getLocalUuid(requireContext()));
|
localId = UuidUtil.toByteArray(TextSecurePreferences.getLocalUuid(requireContext()));
|
||||||
|
|
|
@ -56,9 +56,10 @@ public final class FeatureFlags {
|
||||||
private static final String GROUPS_V2 = "android.groupsv2.3";
|
private static final String GROUPS_V2 = "android.groupsv2.3";
|
||||||
private static final String GROUPS_V2_CREATE = "android.groupsv2.create.3";
|
private static final String GROUPS_V2_CREATE = "android.groupsv2.create.3";
|
||||||
private static final String GROUPS_V2_CAPACITY = "all.groupsv2.capacity";
|
private static final String GROUPS_V2_CAPACITY = "all.groupsv2.capacity";
|
||||||
private static final String CDS = "android.cds.2";
|
private static final String CDS = "android.cds.3";
|
||||||
private static final String INTERNAL_USER = "android.internalUser";
|
private static final String INTERNAL_USER = "android.internalUser";
|
||||||
private static final String MENTIONS = "android.mentions";
|
private static final String MENTIONS = "android.mentions";
|
||||||
|
private static final String VERIFY_V2 = "android.verifyV2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
* We will only store remote values for flags in this set. If you want a flag to be controllable
|
||||||
|
@ -72,7 +73,8 @@ public final class FeatureFlags {
|
||||||
GROUPS_V2_CREATE,
|
GROUPS_V2_CREATE,
|
||||||
GROUPS_V2_CAPACITY,
|
GROUPS_V2_CAPACITY,
|
||||||
INTERNAL_USER,
|
INTERNAL_USER,
|
||||||
MENTIONS
|
MENTIONS,
|
||||||
|
VERIFY_V2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,7 +96,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,
|
||||||
|
VERIFY_V2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +106,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_1,
|
GROUPS_V2_OLD_1,
|
||||||
GROUPS_V2_OLD_2
|
GROUPS_V2_OLD_2,
|
||||||
|
VERIFY_V2
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -231,6 +235,11 @@ public final class FeatureFlags {
|
||||||
return getBoolean(MENTIONS, false);
|
return getBoolean(MENTIONS, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Whether or not to use the UUID in verification codes. */
|
||||||
|
public static boolean verifyV2() {
|
||||||
|
return getBoolean(VERIFY_V2, 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…
Add table
Reference in a new issue