Inline feature flag to show ACI SN by default.
This commit is contained in:
parent
a9be6aff44
commit
772bafbe43
3 changed files with 6 additions and 32 deletions
|
@ -109,7 +109,6 @@ public final class FeatureFlags {
|
|||
private static final String SVR2_KILLSWITCH = "android.svr2.killSwitch";
|
||||
private static final String CDS_DISABLE_COMPAT_MODE = "cds.disableCompatibilityMode";
|
||||
private static final String FCM_MAY_HAVE_MESSAGES_KILL_SWITCH = "android.fcmNotificationFallbackKillSwitch";
|
||||
private static final String SAFETY_NUMBER_ACI = "global.safetyNumberAci";
|
||||
public static final String PROMPT_FOR_NOTIFICATION_LOGS = "android.logs.promptNotifications";
|
||||
private static final String PROMPT_FOR_NOTIFICATION_CONFIG = "android.logs.promptNotificationsConfig";
|
||||
public static final String PROMPT_BATTERY_SAVER = "android.promptBatterySaver";
|
||||
|
@ -180,7 +179,6 @@ public final class FeatureFlags {
|
|||
AD_HOC_CALLING,
|
||||
SVR2_KILLSWITCH,
|
||||
CDS_DISABLE_COMPAT_MODE,
|
||||
SAFETY_NUMBER_ACI,
|
||||
FCM_MAY_HAVE_MESSAGES_KILL_SWITCH,
|
||||
PROMPT_FOR_NOTIFICATION_LOGS,
|
||||
PROMPT_FOR_NOTIFICATION_CONFIG,
|
||||
|
@ -259,7 +257,6 @@ public final class FeatureFlags {
|
|||
MAX_ATTACHMENT_SIZE_BYTES,
|
||||
SVR2_KILLSWITCH,
|
||||
CDS_DISABLE_COMPAT_MODE,
|
||||
SAFETY_NUMBER_ACI,
|
||||
FCM_MAY_HAVE_MESSAGES_KILL_SWITCH,
|
||||
PROMPT_FOR_NOTIFICATION_LOGS,
|
||||
PROMPT_FOR_NOTIFICATION_CONFIG,
|
||||
|
@ -373,14 +370,6 @@ public final class FeatureFlags {
|
|||
return getBoolean(VERIFY_V2, false);
|
||||
}
|
||||
|
||||
/** Whether or not we show the ACI safety number as the default initial safety number. */
|
||||
public static boolean showAciSafetyNumberAsDefault() {
|
||||
long estimatedServerTimeSeconds = (System.currentTimeMillis() - SignalStore.misc().getLastKnownServerTimeOffset()) / 1000;
|
||||
long flagEnableTimeSeconds = getLong(SAFETY_NUMBER_ACI, Long.MAX_VALUE);
|
||||
|
||||
return estimatedServerTimeSeconds > flagEnableTimeSeconds;
|
||||
}
|
||||
|
||||
/** The raw client expiration JSON string. */
|
||||
public static String clientExpiration() {
|
||||
return getString(CLIENT_EXPIRATION, null);
|
||||
|
|
|
@ -56,16 +56,9 @@ public class VerifyIdentityActivity extends PassphraseRequiredActivity {
|
|||
boolean verified) {
|
||||
Recipient recipient = Recipient.live(recipientId).resolve();
|
||||
|
||||
if (FeatureFlags.showAciSafetyNumberAsDefault()) {
|
||||
if (!recipient.hasServiceId()) {
|
||||
showExchangeMessagesDialog(context);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!recipient.hasServiceId() || !recipient.hasE164()) {
|
||||
showExchangeMessagesDialog(context);
|
||||
return;
|
||||
}
|
||||
if (!recipient.hasServiceId()) {
|
||||
showExchangeMessagesDialog(context);
|
||||
return;
|
||||
}
|
||||
|
||||
context.startActivity(newIntent(context, recipientId, identityKey, verified));
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.thoughtcrime.securesms.recipients.LiveRecipient
|
|||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import org.thoughtcrime.securesms.util.IdentityUtil
|
||||
|
||||
class VerifySafetyNumberViewModel(
|
||||
|
@ -70,17 +69,10 @@ class VerifySafetyNumberViewModel(
|
|||
aciFingerprint = SafetyNumberFingerprint(version, localIdentifier, localIdentity, remoteIdentifier, remoteIdentity, generator.createFor(version, localIdentifier, localIdentity, remoteIdentifier, remoteIdentity))
|
||||
}
|
||||
|
||||
if (FeatureFlags.showAciSafetyNumberAsDefault()) {
|
||||
if (aciFingerprint != null) {
|
||||
fingerprintList.add(aciFingerprint)
|
||||
if (e164Fingerprint != null) {
|
||||
fingerprintList.add(e164Fingerprint)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (aciFingerprint != null && e164Fingerprint != null) {
|
||||
if (aciFingerprint != null) {
|
||||
fingerprintList.add(aciFingerprint)
|
||||
if (e164Fingerprint != null) {
|
||||
fingerprintList.add(e164Fingerprint)
|
||||
fingerprintList.add(aciFingerprint)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue