mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Stop broadcasting the change number capability.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
import org.whispersystems.signalservice.api.account.AccountAttributes;
|
||||
|
||||
public final class AppCapabilities {
|
||||
@@ -12,13 +13,12 @@ public final class AppCapabilities {
|
||||
private static final boolean GV1_MIGRATION = true;
|
||||
private static final boolean ANNOUNCEMENT_GROUPS = true;
|
||||
private static final boolean SENDER_KEY = true;
|
||||
private static final boolean CHANGE_NUMBER = 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, SENDER_KEY, ANNOUNCEMENT_GROUPS, CHANGE_NUMBER);
|
||||
return new AccountAttributes.Capabilities(UUID_CAPABLE, GV2_CAPABLE, storageCapable, GV1_MIGRATION, SENDER_KEY, ANNOUNCEMENT_GROUPS, FeatureFlags.changeNumber());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,9 +87,10 @@ public class ApplicationMigrations {
|
||||
static final int SENDER_KEY_3 = 43;
|
||||
static final int CHANGE_NUMBER_SYNC = 44;
|
||||
static final int CHANGE_NUMBER_CAPABILITY = 45;
|
||||
static final int CHANGE_NUMBER_CAPABILITY_2 = 46;
|
||||
}
|
||||
|
||||
public static final int CURRENT_VERSION = 45;
|
||||
public static final int CURRENT_VERSION = 46;
|
||||
|
||||
/**
|
||||
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
|
||||
@@ -379,6 +380,10 @@ public class ApplicationMigrations {
|
||||
jobs.put(Version.CHANGE_NUMBER_CAPABILITY, new AttributesMigrationJob());
|
||||
}
|
||||
|
||||
if (lastSeenVersion < Version.CHANGE_NUMBER_CAPABILITY_2) {
|
||||
jobs.put(Version.CHANGE_NUMBER_CAPABILITY_2, new AttributesMigrationJob());
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user