complete list of reasons

This commit is contained in:
Daniel Gultsch 2020-04-14 18:18:16 +02:00
parent dd42a6b850
commit bfb9a6267a
2 changed files with 32 additions and 13 deletions

View file

@ -120,11 +120,13 @@ public class RtpContentMap {
rtpDescription = (RtpDescription) description; rtpDescription = (RtpDescription) description;
} else { } else {
Log.d(Config.LOGTAG, "description was " + description); Log.d(Config.LOGTAG, "description was " + description);
//todo throw unsupported application
throw new IllegalArgumentException("Content does not contain RtpDescription"); throw new IllegalArgumentException("Content does not contain RtpDescription");
} }
if (transportInfo instanceof IceUdpTransportInfo) { if (transportInfo instanceof IceUdpTransportInfo) {
iceUdpTransportInfo = (IceUdpTransportInfo) transportInfo; iceUdpTransportInfo = (IceUdpTransportInfo) transportInfo;
} else { } else {
//TODO throw UNSUPPORTED_TRANSPORT exception
throw new IllegalArgumentException("Content does not contain ICE-UDP transport"); throw new IllegalArgumentException("Content does not contain ICE-UDP transport");
} }
return new DescriptionTransport(rtpDescription, iceUdpTransportInfo); return new DescriptionTransport(rtpDescription, iceUdpTransportInfo);

View file

@ -5,7 +5,24 @@ import android.support.annotation.NonNull;
import com.google.common.base.CaseFormat; import com.google.common.base.CaseFormat;
public enum Reason { public enum Reason {
SUCCESS, DECLINE, BUSY, CANCEL, CONNECTIVITY_ERROR, FAILED_TRANSPORT, FAILED_APPLICATION, TIMEOUT, UNKNOWN; ALTERNATIVE_SESSION,
BUSY,
CANCEL,
CONNECTIVITY_ERROR,
DECLINE,
EXPIRED,
FAILED_APPLICATION,
FAILED_TRANSPORT,
GENERAL_ERROR,
GONE,
INCOMPATIBLE_PARAMETERS,
MEDIA_ERROR,
SECURITY_ERROR,
SUCCESS,
TIMEOUT,
UNSUPPORTED_APPLICATIONS,
UNSUPPORTED_TRANSPORTS,
UNKNOWN;
public static Reason of(final String value) { public static Reason of(final String value) {
try { try {