mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add device-specific support configs.
This commit is contained in:
committed by
Greyson Parrelli
parent
c0da0bd272
commit
b806952430
@@ -8,6 +8,7 @@ import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.mms.PushMediaConstraints;
|
||||
import org.thoughtcrime.securesms.notifications.DelayedNotificationConfig;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -74,7 +75,7 @@ public final class LocaleRemoteConfig {
|
||||
}
|
||||
|
||||
public static boolean isBatterySaverPromptEnabled() {
|
||||
return RemoteConfig.internalUser() || isEnabledPartsPerMillion(RemoteConfig.PROMPT_BATTERY_SAVER, RemoteConfig.promptBatterySaver());
|
||||
return RemoteConfig.internalUser() || isEnabledPartsPerMillion(RemoteConfig.PROMPT_BATTERY_SAVER, DelayedNotificationConfig.INSTANCE.getCurrentConfig().getLocalePercent());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,9 @@ import org.thoughtcrime.securesms.jobs.RemoteConfigRefreshJob
|
||||
import org.thoughtcrime.securesms.jobs.Svr3MirrorJob
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.messageprocessingalarm.RoutineMessageFetchReceiver
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig.Config
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig.remoteBoolean
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig.remoteValue
|
||||
import java.io.IOException
|
||||
import java.util.TreeMap
|
||||
import kotlin.math.max
|
||||
@@ -873,6 +876,14 @@ object RemoteConfig {
|
||||
hotSwappable = true
|
||||
)
|
||||
|
||||
private const val PROMPT_DELAYED_NOTIFICATION_CONFIG: String = "android.delayedNotificationConfig"
|
||||
|
||||
val promptDelayedNotificationConfig: String by remoteString(
|
||||
key = PROMPT_DELAYED_NOTIFICATION_CONFIG,
|
||||
defaultValue = "",
|
||||
hotSwappable = true
|
||||
)
|
||||
|
||||
const val CRASH_PROMPT_CONFIG: String = "android.crashPromptConfig"
|
||||
|
||||
/** Config object for what crashes to prompt about. */
|
||||
|
||||
Reference in New Issue
Block a user