mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01: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()) {
|
if (FeatureFlags.callingFieldTrialAnyAddressPortsKillSwitch()) {
|
||||||
fieldTrials.put("RingRTC-AnyAddressPortsKillSwitch", "Enabled");
|
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);
|
CallManager.initialize(this, new RingRtcLogger(), fieldTrials);
|
||||||
} catch (UnsatisfiedLinkError e) {
|
} catch (UnsatisfiedLinkError e) {
|
||||||
throw new AssertionError("Unable to load ringrtc library", e);
|
throw new AssertionError("Unable to load ringrtc library", e);
|
||||||
|
|||||||
+12
-2
@@ -492,9 +492,17 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (SignalStore.donationsValues().getSubscriber() != null) {
|
switchPref(
|
||||||
dividerPref()
|
title = DSLSettingsText.from("Disable LBRed"),
|
||||||
|
isChecked = state.callingDisableLBRed,
|
||||||
|
onClick = {
|
||||||
|
viewModel.setInternalCallingDisableLBRed(!state.callingDisableLBRed)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
dividerPref()
|
||||||
|
|
||||||
|
if (SignalStore.donationsValues().getSubscriber() != null) {
|
||||||
sectionHeaderPref(DSLSettingsText.from("Badges"))
|
sectionHeaderPref(DSLSettingsText.from("Badges"))
|
||||||
|
|
||||||
clickPref(
|
clickPref(
|
||||||
@@ -527,6 +535,8 @@ class InternalSettingsFragment : DSLSettingsFragment(R.string.preferences__inter
|
|||||||
Toast.makeText(context, "Cleared", Toast.LENGTH_SHORT).show()
|
Toast.makeText(context, "Cleared", Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dividerPref()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.hasPendingOneTimeDonation) {
|
if (state.hasPendingOneTimeDonation) {
|
||||||
|
|||||||
+1
@@ -15,6 +15,7 @@ data class InternalSettingsState(
|
|||||||
val callingAudioProcessingMethod: CallManager.AudioProcessingMethod,
|
val callingAudioProcessingMethod: CallManager.AudioProcessingMethod,
|
||||||
val callingDataMode: CallManager.DataMode,
|
val callingDataMode: CallManager.DataMode,
|
||||||
val callingDisableTelecom: Boolean,
|
val callingDisableTelecom: Boolean,
|
||||||
|
val callingDisableLBRed: Boolean,
|
||||||
val useBuiltInEmojiSet: Boolean,
|
val useBuiltInEmojiSet: Boolean,
|
||||||
val emojiVersion: EmojiFiles.Version?,
|
val emojiVersion: EmojiFiles.Version?,
|
||||||
val removeSenderKeyMinimium: Boolean,
|
val removeSenderKeyMinimium: Boolean,
|
||||||
|
|||||||
+6
@@ -113,6 +113,11 @@ class InternalSettingsViewModel(private val repository: InternalSettingsReposito
|
|||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setInternalCallingDisableLBRed(enabled: Boolean) {
|
||||||
|
preferenceDataStore.putBoolean(InternalValues.CALLING_DISABLE_LBRED, enabled)
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
|
||||||
fun setUseConversationItemV2Media(enabled: Boolean) {
|
fun setUseConversationItemV2Media(enabled: Boolean) {
|
||||||
SignalStore.internalValues().setUseConversationItemV2Media(enabled)
|
SignalStore.internalValues().setUseConversationItemV2Media(enabled)
|
||||||
refresh()
|
refresh()
|
||||||
@@ -142,6 +147,7 @@ class InternalSettingsViewModel(private val repository: InternalSettingsReposito
|
|||||||
callingAudioProcessingMethod = SignalStore.internalValues().callingAudioProcessingMethod(),
|
callingAudioProcessingMethod = SignalStore.internalValues().callingAudioProcessingMethod(),
|
||||||
callingDataMode = SignalStore.internalValues().callingDataMode(),
|
callingDataMode = SignalStore.internalValues().callingDataMode(),
|
||||||
callingDisableTelecom = SignalStore.internalValues().callingDisableTelecom(),
|
callingDisableTelecom = SignalStore.internalValues().callingDisableTelecom(),
|
||||||
|
callingDisableLBRed = SignalStore.internalValues().callingDisableLBRed(),
|
||||||
useBuiltInEmojiSet = SignalStore.internalValues().forceBuiltInEmoji(),
|
useBuiltInEmojiSet = SignalStore.internalValues().forceBuiltInEmoji(),
|
||||||
emojiVersion = null,
|
emojiVersion = null,
|
||||||
removeSenderKeyMinimium = SignalStore.internalValues().removeSenderKeyMinimum(),
|
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_AUDIO_PROCESSING_METHOD = "internal.calling_audio_processing_method";
|
||||||
public static final String CALLING_DATA_MODE = "internal.calling_bandwidth_mode";
|
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_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 SHAKE_TO_REPORT = "internal.shake_to_report";
|
||||||
public static final String DISABLE_STORAGE_SERVICE = "internal.disable_storage_service";
|
public static final String DISABLE_STORAGE_SERVICE = "internal.disable_storage_service";
|
||||||
public static final String FORCE_WEBSOCKET_MODE = "internal.force_websocket_mode";
|
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.
|
* 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