mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Refactor FeatureFlags.
This commit is contained in:
@@ -98,7 +98,7 @@ object ContactDiscoveryRefreshV2 {
|
||||
Optional.empty(),
|
||||
BuildConfig.CDSI_MRENCLAVE,
|
||||
10_000,
|
||||
if (FeatureFlags.useLibsignalNetForCdsiLookup()) AppDependencies.libsignalNetwork else null
|
||||
if (FeatureFlags.useLibsignalNetForCdsiLookup) AppDependencies.libsignalNetwork else null
|
||||
) {
|
||||
Log.i(TAG, "Ignoring token for one-off lookup.")
|
||||
}
|
||||
@@ -145,8 +145,8 @@ object ContactDiscoveryRefreshV2 {
|
||||
return ContactDiscovery.RefreshResult(emptySet(), emptyMap())
|
||||
}
|
||||
|
||||
if (newE164s.size > FeatureFlags.cdsHardLimit()) {
|
||||
Log.w(TAG, "[$tag] Number of new contacts (${newE164s.size.roundedString()} > hard limit (${FeatureFlags.cdsHardLimit()}! Failing and marking ourselves as permanently blocked.")
|
||||
if (newE164s.size > FeatureFlags.cdsHardLimit) {
|
||||
Log.w(TAG, "[$tag] Number of new contacts (${newE164s.size.roundedString()} > hard limit (${FeatureFlags.cdsHardLimit}! Failing and marking ourselves as permanently blocked.")
|
||||
SignalStore.misc().markCdsPermanentlyBlocked()
|
||||
throw IOException("New contacts over the CDS hard limit!")
|
||||
}
|
||||
@@ -163,7 +163,7 @@ object ContactDiscoveryRefreshV2 {
|
||||
Optional.ofNullable(token),
|
||||
BuildConfig.CDSI_MRENCLAVE,
|
||||
timeoutMs,
|
||||
if (FeatureFlags.useLibsignalNetForCdsiLookup()) AppDependencies.libsignalNetwork else null
|
||||
if (FeatureFlags.useLibsignalNetForCdsiLookup) AppDependencies.libsignalNetwork else null
|
||||
) { tokenToSave ->
|
||||
stopwatch.split("network-pre-token")
|
||||
if (!isPartialRefresh) {
|
||||
|
||||
Reference in New Issue
Block a user