mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-22 10:46:50 +00:00
Make max envelope size remote configurable.
This commit is contained in:
@@ -174,10 +174,9 @@ public class ApplicationDependencyProvider implements AppDependencies.Provider {
|
||||
keysApi,
|
||||
Optional.of(new SecurityEventListener(context)),
|
||||
SignalExecutors.newCachedBoundedExecutor("signal-messages", ThreadUtil.PRIORITY_IMPORTANT_BACKGROUND_THREAD, 1, 16, 30),
|
||||
ByteUnit.KILOBYTES.toBytes(256),
|
||||
RemoteConfig.maxEnvelopeSizeBytes(),
|
||||
RemoteConfig::useMessageSendRestFallback,
|
||||
RemoteConfig.usePqRatchet(),
|
||||
RemoteConfig.internalUser() ? Optional.of(ByteUnit.KILOBYTES.toBytes(96)) : Optional.empty());
|
||||
RemoteConfig.usePqRatchet());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -875,7 +875,7 @@ object RemoteConfig {
|
||||
@JvmStatic
|
||||
@get:JvmName("promptForDelayedNotificationLogs")
|
||||
val promptForDelayedNotificationLogs: String by remoteString(
|
||||
key = RemoteConfig.PROMPT_FOR_NOTIFICATION_LOGS,
|
||||
key = PROMPT_FOR_NOTIFICATION_LOGS,
|
||||
defaultValue = "*",
|
||||
hotSwappable = true
|
||||
)
|
||||
@@ -1177,5 +1177,14 @@ object RemoteConfig {
|
||||
if (value.asBoolean(false)) UsePqRatchet.YES else UsePqRatchet.NO
|
||||
}
|
||||
|
||||
/** The maximum allowed envelope size for messages we send. */
|
||||
@JvmStatic
|
||||
@get:JvmName("maxEnvelopeSizeBytes")
|
||||
val maxEnvelopeSizeBytes: Long by remoteLong(
|
||||
key = "android.maxEnvelopeSizeBytes",
|
||||
defaultValue = 256.kibiBytes.inWholeBytes,
|
||||
hotSwappable = true
|
||||
)
|
||||
|
||||
// endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user