mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Update device-specific notification support configs.
This commit is contained in:
committed by
Cody Henthorne
parent
60a0565ba8
commit
9024c19169
@@ -8,7 +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.notifications.DeviceSpecificNotificationConfig;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -75,7 +75,11 @@ public final class LocaleRemoteConfig {
|
||||
}
|
||||
|
||||
public static boolean isBatterySaverPromptEnabled() {
|
||||
return RemoteConfig.internalUser() || isEnabledPartsPerMillion(RemoteConfig.PROMPT_BATTERY_SAVER, DelayedNotificationConfig.INSTANCE.getCurrentConfig().getLocalePercent());
|
||||
return RemoteConfig.internalUser() || isEnabledPartsPerMillion(RemoteConfig.PROMPT_BATTERY_SAVER, RemoteConfig.promptBatterySaver());
|
||||
}
|
||||
|
||||
public static boolean isDeviceSpecificNotificationEnabled() {
|
||||
return isEnabledPartsPerMillion(RemoteConfig.DEVICE_SPECIFIC_NOTIFICATION_CONFIG, DeviceSpecificNotificationConfig.getCurrentConfig().getLocalePercent());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -874,10 +874,10 @@ object RemoteConfig {
|
||||
hotSwappable = true
|
||||
)
|
||||
|
||||
private const val PROMPT_DELAYED_NOTIFICATION_CONFIG: String = "android.delayedNotificationConfig"
|
||||
const val DEVICE_SPECIFIC_NOTIFICATION_CONFIG: String = "android.deviceSpecificNotificationConfig"
|
||||
|
||||
val promptDelayedNotificationConfig: String by remoteString(
|
||||
key = PROMPT_DELAYED_NOTIFICATION_CONFIG,
|
||||
val deviceSpecificNotificationConfig: String by remoteString(
|
||||
key = DEVICE_SPECIFIC_NOTIFICATION_CONFIG,
|
||||
defaultValue = "",
|
||||
hotSwappable = true
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user