Add internal setting for call bandwidth mode.

This commit is contained in:
Peter Thatcher
2022-04-15 07:48:08 -06:00
committed by Greyson Parrelli
parent eee9c967fa
commit 2f97b80b9c
7 changed files with 54 additions and 21 deletions

View File

@@ -35,6 +35,10 @@ public final class NetworkUtil {
}
public static @NonNull CallManager.BandwidthMode getCallingBandwidthMode(@NonNull Context context, @NonNull PeerConnection.AdapterType networkAdapter) {
if (SignalStore.internalValues().callingBandwidthMode() != CallManager.BandwidthMode.NORMAL) {
return SignalStore.internalValues().callingBandwidthMode();
}
return useLowBandwidthCalling(context, networkAdapter) ? CallManager.BandwidthMode.LOW : CallManager.BandwidthMode.NORMAL;
}