Enable sender key by default.

fork-5.53.8
Greyson Parrelli 2021-08-25 16:11:49 -04:00 zatwierdzone przez Alex Hart
rodzic c92f3b5dfd
commit 0459d118a3
3 zmienionych plików z 10 dodań i 4 usunięć

Wyświetl plik

@ -12,12 +12,13 @@ public final class AppCapabilities {
private static final boolean GV2_CAPABLE = true;
private static final boolean GV1_MIGRATION = true;
private static final boolean ANNOUNCEMENT_GROUPS = true;
private static final boolean SENDER_KEY = true;
/**
* @param storageCapable Whether or not the user can use storage service. This is another way of
* asking if the user has set a Signal PIN or not.
*/
public static AccountAttributes.Capabilities getCapabilities(boolean storageCapable) {
return new AccountAttributes.Capabilities(UUID_CAPABLE, GV2_CAPABLE, storageCapable, GV1_MIGRATION, FeatureFlags.senderKey(), ANNOUNCEMENT_GROUPS);
return new AccountAttributes.Capabilities(UUID_CAPABLE, GV2_CAPABLE, storageCapable, GV1_MIGRATION, SENDER_KEY, ANNOUNCEMENT_GROUPS);
}
}

Wyświetl plik

@ -82,9 +82,10 @@ public class ApplicationMigrations {
static final int ATTACHMENT_CLEANUP_2 = 40;
static final int ANNOUNCEMENT_GROUP_CAPABILITY = 41;
static final int STICKER_MY_DAILY_LIFE = 42;
static final int SENDER_KEY_3 = 43;
}
public static final int CURRENT_VERSION = 42;
public static final int CURRENT_VERSION = 43;
/**
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
@ -362,6 +363,10 @@ public class ApplicationMigrations {
jobs.put(Version.STICKER_MY_DAILY_LIFE, new StickerMyDailyLifeMigrationJob());
}
if (lastSeenVersion < Version.SENDER_KEY_3) {
jobs.put(Version.SENDER_KEY_3, new AttributesMigrationJob());
}
return jobs;
}

Wyświetl plik

@ -78,7 +78,7 @@ public final class FeatureFlags {
private static final String MEDIA_QUALITY_LEVELS = "android.mediaQuality.levels";
private static final String RETRY_RECEIPT_LIFESPAN = "android.retryReceiptLifespan";
private static final String RETRY_RESPOND_MAX_AGE = "android.retryRespondMaxAge";
private static final String SENDER_KEY = "android.senderKey.4";
private static final String SENDER_KEY = "android.senderKey.5";
private static final String RETRY_RECEIPTS = "android.retryReceipts";
private static final String SUGGEST_SMS_BLACKLIST = "android.suggestSmsBlacklist";
private static final String MAX_GROUP_CALL_RING_SIZE = "global.calling.maxGroupCallRingSize";
@ -374,7 +374,7 @@ public final class FeatureFlags {
/** Whether or not sending using sender key is enabled. */
public static boolean senderKey() {
return getBoolean(SENDER_KEY, false);
return getBoolean(SENDER_KEY, true);
}
/** A comma-delimited list of country codes that should not be told about SMS during onboarding. */