mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-25 03:11:10 +01:00
Rename FeatureFlags -> RemoteConfig.
This commit is contained in:
@@ -5,7 +5,7 @@ import androidx.annotation.NonNull;
|
||||
import org.signal.ringrtc.CallManager;
|
||||
import org.thoughtcrime.securesms.BuildConfig;
|
||||
import org.thoughtcrime.securesms.util.Environment;
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags;
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@@ -50,7 +50,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* Members will not be added directly to a GV2 even if they could be.
|
||||
*/
|
||||
public synchronized boolean gv2ForceInvites() {
|
||||
return FeatureFlags.internalUser() && getBoolean(GV2_FORCE_INVITES, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(GV2_FORCE_INVITES, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,56 +58,56 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* directly which allows testing of certain testing scenarios.
|
||||
*/
|
||||
public synchronized boolean gv2IgnoreP2PChanges() {
|
||||
return FeatureFlags.internalUser() && getBoolean(GV2_IGNORE_P2P_CHANGES, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(GV2_IGNORE_P2P_CHANGES, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show detailed recipient info in the {@link org.thoughtcrime.securesms.components.settings.conversation.InternalConversationSettingsFragment}.
|
||||
*/
|
||||
public synchronized boolean recipientDetails() {
|
||||
return FeatureFlags.internalUser() && getBoolean(RECIPIENT_DETAILS, true);
|
||||
return RemoteConfig.internalUser() && getBoolean(RECIPIENT_DETAILS, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow changing the censorship circumvention setting regardless of network status.
|
||||
*/
|
||||
public synchronized boolean allowChangingCensorshipSetting() {
|
||||
return FeatureFlags.internalUser() && getBoolean(ALLOW_CENSORSHIP_SETTING, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(ALLOW_CENSORSHIP_SETTING, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the app to use the emoji that ship with the app, as opposed to the ones that were downloaded.
|
||||
*/
|
||||
public synchronized boolean forceBuiltInEmoji() {
|
||||
return FeatureFlags.internalUser() && getBoolean(FORCE_BUILT_IN_EMOJI, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(FORCE_BUILT_IN_EMOJI, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the requirement that there must be two sender-key-capable recipients to use sender key
|
||||
*/
|
||||
public synchronized boolean removeSenderKeyMinimum() {
|
||||
return FeatureFlags.internalUser() && getBoolean(REMOVE_SENDER_KEY_MINIMUM, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(REMOVE_SENDER_KEY_MINIMUM, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delay resending messages in response to retry receipts by 10 seconds.
|
||||
*/
|
||||
public synchronized boolean delayResends() {
|
||||
return FeatureFlags.internalUser() && getBoolean(DELAY_RESENDS, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(DELAY_RESENDS, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not "shake to report" is enabled.
|
||||
*/
|
||||
public synchronized boolean shakeToReport() {
|
||||
return FeatureFlags.internalUser() && getBoolean(SHAKE_TO_REPORT, true);
|
||||
return RemoteConfig.internalUser() && getBoolean(SHAKE_TO_REPORT, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not storage service is manually disabled.
|
||||
*/
|
||||
public synchronized boolean storageServiceDisabled() {
|
||||
return FeatureFlags.internalUser() && getBoolean(DISABLE_STORAGE_SERVICE, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(DISABLE_STORAGE_SERVICE, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +118,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* internal users cannot be left on old servers.
|
||||
*/
|
||||
public synchronized @NonNull String groupCallingServer() {
|
||||
String internalServer = FeatureFlags.internalUser() ? getString(CALLING_SERVER, Environment.Calling.defaultSfuUrl()) : null;
|
||||
String internalServer = RemoteConfig.internalUser() ? getString(CALLING_SERVER, Environment.Calling.defaultSfuUrl()) : null;
|
||||
if (internalServer != null && !Arrays.asList(BuildConfig.SIGNAL_SFU_INTERNAL_URLS).contains(internalServer)) {
|
||||
internalServer = null;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* Setting to override the default handling of hardware/software AEC.
|
||||
*/
|
||||
public synchronized CallManager.AudioProcessingMethod callingAudioProcessingMethod() {
|
||||
if (FeatureFlags.internalUser()) {
|
||||
if (RemoteConfig.internalUser()) {
|
||||
return CallManager.AudioProcessingMethod.values()[getInteger(CALLING_AUDIO_PROCESSING_METHOD, CallManager.AudioProcessingMethod.Default.ordinal())];
|
||||
} else {
|
||||
return CallManager.AudioProcessingMethod.Default;
|
||||
@@ -140,7 +140,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* Setting to override the default calling bandwidth mode.
|
||||
*/
|
||||
public synchronized CallManager.DataMode callingDataMode() {
|
||||
if (FeatureFlags.internalUser()) {
|
||||
if (RemoteConfig.internalUser()) {
|
||||
int index = getInteger(CALLING_DATA_MODE, CallManager.DataMode.NORMAL.ordinal());
|
||||
CallManager.DataMode[] modes = CallManager.DataMode.values();
|
||||
|
||||
@@ -154,7 +154,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* Whether or not Telecom integration is manually disabled.
|
||||
*/
|
||||
public synchronized boolean callingDisableTelecom() {
|
||||
if (FeatureFlags.internalUser()) {
|
||||
if (RemoteConfig.internalUser()) {
|
||||
return getBoolean(CALLING_DISABLE_TELECOM, true);
|
||||
} else {
|
||||
return false;
|
||||
@@ -165,7 +165,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* Whether or not LBRed for Opus is manually disabled.
|
||||
*/
|
||||
public synchronized boolean callingDisableLBRed() {
|
||||
if (FeatureFlags.internalUser()) {
|
||||
if (RemoteConfig.internalUser()) {
|
||||
return getBoolean(CALLING_DISABLE_LBRED, false);
|
||||
} else {
|
||||
return true;
|
||||
@@ -176,7 +176,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
* Whether or not the system is forced to be in 'websocket mode', where FCM is ignored and we use a foreground service to keep the app alive.
|
||||
*/
|
||||
public boolean isWebsocketModeForced() {
|
||||
if (FeatureFlags.internalUser()) {
|
||||
if (RemoteConfig.internalUser()) {
|
||||
return getBoolean(FORCE_WEBSOCKET_MODE, false);
|
||||
} else {
|
||||
return false;
|
||||
@@ -196,7 +196,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
}
|
||||
|
||||
public boolean useConversationItemV2Media() {
|
||||
return FeatureFlags.internalUser() && getBoolean(CONVERSATION_ITEM_V2_MEDIA, false);
|
||||
return RemoteConfig.internalUser() && getBoolean(CONVERSATION_ITEM_V2_MEDIA, false);
|
||||
}
|
||||
|
||||
public synchronized void setWebSocketShadowingStats(byte[] bytes) {
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.thoughtcrime.securesms.payments.currency.CurrencyUtil
|
||||
import org.thoughtcrime.securesms.payments.proto.MobileCoinLedger
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig
|
||||
import org.thoughtcrime.securesms.util.Util
|
||||
import org.whispersystems.signalservice.api.payments.Money
|
||||
import java.io.IOException
|
||||
@@ -118,7 +118,7 @@ internal class PaymentsValues internal constructor(store: KeyValueStore) : Signa
|
||||
if (!SignalStore.account().isRegistered) {
|
||||
return PaymentsAvailability.NOT_IN_REGION
|
||||
}
|
||||
return if (FeatureFlags.payments) {
|
||||
return if (RemoteConfig.payments) {
|
||||
if (mobileCoinPaymentsEnabled()) {
|
||||
if (GeographicalRestrictions.e164Allowed(SignalStore.account().e164)) {
|
||||
PaymentsAvailability.WITHDRAW_AND_SEND
|
||||
|
||||
Reference in New Issue
Block a user