mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Add toggle to control call bandwidth.
This commit is contained in:
committed by
Greyson Parrelli
parent
8724d904b7
commit
be91f2396c
@@ -6,6 +6,8 @@ import android.text.TextUtils;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.thoughtcrime.securesms.webrtc.CallBandwidthMode;
|
||||
|
||||
public final class SettingsValues extends SignalStoreValues {
|
||||
|
||||
public static final String LINK_PREVIEWS = "settings.link_previews";
|
||||
@@ -14,6 +16,8 @@ public final class SettingsValues extends SignalStoreValues {
|
||||
private static final String SIGNAL_BACKUP_DIRECTORY = "settings.signal.backup.directory";
|
||||
private static final String SIGNAL_LATEST_BACKUP_DIRECTORY = "settings.signal.backup.directory,latest";
|
||||
|
||||
private static final String CALL_BANDWIDTH_MODE = "settings.signal.call.bandwidth.mode";
|
||||
|
||||
public static final String THREAD_TRIM_LENGTH = "pref_trim_length";
|
||||
public static final String THREAD_TRIM_ENABLED = "pref_trim_threads";
|
||||
|
||||
@@ -77,6 +81,14 @@ public final class SettingsValues extends SignalStoreValues {
|
||||
putString(SIGNAL_BACKUP_DIRECTORY, null);
|
||||
}
|
||||
|
||||
public void setCallBandwidthMode(@NonNull CallBandwidthMode callBandwidthMode) {
|
||||
putInteger(CALL_BANDWIDTH_MODE, callBandwidthMode.getCode());
|
||||
}
|
||||
|
||||
public @NonNull CallBandwidthMode getCallBandwidthMode() {
|
||||
return CallBandwidthMode.fromCode(getInteger(CALL_BANDWIDTH_MODE, CallBandwidthMode.HIGH_ALWAYS.getCode()));
|
||||
}
|
||||
|
||||
private @Nullable Uri getUri(@NonNull String key) {
|
||||
String uri = getString(key, "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user