mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Enable opus low bitrate redundancy for internal testing.
This commit is contained in:
committed by
Greyson Parrelli
parent
70e64003f9
commit
d20b6f355c
@@ -426,6 +426,9 @@ public class ApplicationContext extends MultiDexApplication implements AppForegr
|
||||
if (FeatureFlags.callingFieldTrialAnyAddressPortsKillSwitch()) {
|
||||
fieldTrials.put("RingRTC-AnyAddressPortsKillSwitch", "Enabled");
|
||||
}
|
||||
if (!SignalStore.internalValues().callingDisableLBRed()) {
|
||||
fieldTrials.put("RingRTC-Audio-LBRed-For-Opus", "Enabled,bitrate_pri:22000");
|
||||
}
|
||||
CallManager.initialize(this, new RingRtcLogger(), fieldTrials);
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
throw new AssertionError("Unable to load ringrtc library", e);
|
||||
|
||||
@@ -492,9 +492,17 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
}
|
||||
)
|
||||
|
||||
if (SignalStore.donationsValues().getSubscriber() != null) {
|
||||
switchPref(
|
||||
title = DSLSettingsText.from("Disable LBRed"),
|
||||
isChecked = state.callingDisableLBRed,
|
||||
onClick = {
|
||||
viewModel.setInternalCallingDisableLBRed(!state.callingDisableLBRed)
|
||||
}
|
||||
)
|
||||
|
||||
dividerPref()
|
||||
|
||||
if (SignalStore.donationsValues().getSubscriber() != null) {
|
||||
sectionHeaderPref(DSLSettingsText.from("Badges"))
|
||||
|
||||
clickPref(
|
||||
@@ -527,6 +535,8 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
||||
Toast.makeText(context, "Cleared", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
)
|
||||
|
||||
dividerPref()
|
||||
}
|
||||
|
||||
if (state.hasPendingOneTimeDonation) {
|
||||
|
||||
@@ -15,6 +15,7 @@ data class InternalSettingsState(
|
||||
val callingAudioProcessingMethod: CallManager.AudioProcessingMethod,
|
||||
val callingDataMode: CallManager.DataMode,
|
||||
val callingDisableTelecom: Boolean,
|
||||
val callingDisableLBRed: Boolean,
|
||||
val useBuiltInEmojiSet: Boolean,
|
||||
val emojiVersion: EmojiFiles.Version?,
|
||||
val removeSenderKeyMinimium: Boolean,
|
||||
|
||||
@@ -113,6 +113,11 @@ class InternalSettingsViewModel(private val repository: InternalSettingsReposito
|
||||
refresh()
|
||||
}
|
||||
|
||||
fun setInternalCallingDisableLBRed(enabled: Boolean) {
|
||||
preferenceDataStore.putBoolean(InternalValues.CALLING_DISABLE_LBRED, enabled)
|
||||
refresh()
|
||||
}
|
||||
|
||||
fun setUseConversationItemV2Media(enabled: Boolean) {
|
||||
SignalStore.internalValues().setUseConversationItemV2Media(enabled)
|
||||
refresh()
|
||||
@@ -142,6 +147,7 @@ class InternalSettingsViewModel(private val repository: InternalSettingsReposito
|
||||
callingAudioProcessingMethod = SignalStore.internalValues().callingAudioProcessingMethod(),
|
||||
callingDataMode = SignalStore.internalValues().callingDataMode(),
|
||||
callingDisableTelecom = SignalStore.internalValues().callingDisableTelecom(),
|
||||
callingDisableLBRed = SignalStore.internalValues().callingDisableLBRed(),
|
||||
useBuiltInEmojiSet = SignalStore.internalValues().forceBuiltInEmoji(),
|
||||
emojiVersion = null,
|
||||
removeSenderKeyMinimium = SignalStore.internalValues().removeSenderKeyMinimum(),
|
||||
|
||||
@@ -25,6 +25,7 @@ public final class InternalValues extends SignalStoreValues {
|
||||
public static final String CALLING_AUDIO_PROCESSING_METHOD = "internal.calling_audio_processing_method";
|
||||
public static final String CALLING_DATA_MODE = "internal.calling_bandwidth_mode";
|
||||
public static final String CALLING_DISABLE_TELECOM = "internal.calling_disable_telecom";
|
||||
public static final String CALLING_DISABLE_LBRED = "internal.calling_disable_lbred";
|
||||
public static final String SHAKE_TO_REPORT = "internal.shake_to_report";
|
||||
public static final String DISABLE_STORAGE_SERVICE = "internal.disable_storage_service";
|
||||
public static final String FORCE_WEBSOCKET_MODE = "internal.force_websocket_mode";
|
||||
@@ -172,6 +173,17 @@ public final class InternalValues extends SignalStoreValues {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not LBRed for Opus is manually disabled.
|
||||
*/
|
||||
public synchronized boolean callingDisableLBRed() {
|
||||
if (FeatureFlags.internalUser()) {
|
||||
return getBoolean(CALLING_DISABLE_LBRED, false);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the system is forced to be in 'websocket mode', where FCM is ignored and we use a foreground service to keep the app alive.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user