mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Add toggle to control call bandwidth.
This commit is contained in:
committed by
Greyson Parrelli
parent
8724d904b7
commit
be91f2396c
@@ -0,0 +1,40 @@
|
||||
package org.thoughtcrime.securesms.webrtc;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.signal.ringrtc.CallException;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.util.NetworkUtil;
|
||||
|
||||
/**
|
||||
* Represents the user's desired bandwidth mode for calls.
|
||||
*/
|
||||
public enum CallBandwidthMode {
|
||||
LOW_ALWAYS(0),
|
||||
HIGH_ON_WIFI(1),
|
||||
HIGH_ALWAYS(2);
|
||||
|
||||
private final int code;
|
||||
|
||||
CallBandwidthMode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public static CallBandwidthMode fromCode(int code) {
|
||||
switch (code) {
|
||||
case 1:
|
||||
return HIGH_ON_WIFI;
|
||||
case 2:
|
||||
return HIGH_ALWAYS;
|
||||
default:
|
||||
return LOW_ALWAYS;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user