Annotate libjingle_peerconnection_java with @Nullable.
Bug: webrtc:8881 Change-Id: Ida2ef6c003567d19529c21629c916ed40e8de3a6 Reviewed-on: https://webrtc-review.googlesource.com/63380 Commit-Queue: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Paulina Hensman <phensman@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22563}
This commit is contained in:

committed by
Commit Bot

parent
12d6a49e97
commit
e7592d8d5f
@ -12,6 +12,7 @@ package org.webrtc;
|
||||
|
||||
import android.content.Context;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Java wrapper for a C++ PeerConnectionFactoryInterface. Main entry point to
|
||||
@ -27,9 +28,9 @@ public class PeerConnectionFactory {
|
||||
|
||||
private final long nativeFactory;
|
||||
private static volatile boolean internalTracerInitialized = false;
|
||||
private static Thread networkThread;
|
||||
private static Thread workerThread;
|
||||
private static Thread signalingThread;
|
||||
@Nullable private static Thread networkThread;
|
||||
@Nullable private static Thread workerThread;
|
||||
@Nullable private static Thread signalingThread;
|
||||
private EglBase localEglbase;
|
||||
private EglBase remoteEglbase;
|
||||
|
||||
@ -124,11 +125,11 @@ public class PeerConnectionFactory {
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
private Options options;
|
||||
private VideoEncoderFactory encoderFactory;
|
||||
private VideoDecoderFactory decoderFactory;
|
||||
private AudioProcessingFactory audioProcessingFactory;
|
||||
private FecControllerFactoryFactoryInterface fecControllerFactoryFactory;
|
||||
private @Nullable Options options;
|
||||
private @Nullable VideoEncoderFactory encoderFactory;
|
||||
private @Nullable VideoDecoderFactory decoderFactory;
|
||||
private @Nullable AudioProcessingFactory audioProcessingFactory;
|
||||
private @Nullable FecControllerFactoryFactoryInterface fecControllerFactoryFactory;
|
||||
|
||||
private Builder() {}
|
||||
|
||||
@ -262,9 +263,10 @@ public class PeerConnectionFactory {
|
||||
null /* fecControllerFactoryFactory */);
|
||||
}
|
||||
|
||||
private PeerConnectionFactory(Options options, VideoEncoderFactory encoderFactory,
|
||||
VideoDecoderFactory decoderFactory, AudioProcessingFactory audioProcessingFactory,
|
||||
FecControllerFactoryFactoryInterface fecControllerFactoryFactory) {
|
||||
private PeerConnectionFactory(Options options, @Nullable VideoEncoderFactory encoderFactory,
|
||||
@Nullable VideoDecoderFactory decoderFactory,
|
||||
@Nullable AudioProcessingFactory audioProcessingFactory,
|
||||
@Nullable FecControllerFactoryFactoryInterface fecControllerFactoryFactory) {
|
||||
checkInitializeHasBeenCalled();
|
||||
nativeFactory = nativeCreatePeerConnectionFactory(ContextUtils.getApplicationContext(), options,
|
||||
encoderFactory, decoderFactory,
|
||||
@ -279,6 +281,7 @@ public class PeerConnectionFactory {
|
||||
* Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct
|
||||
* instead and use the method without constraints in the signature.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig,
|
||||
MediaConstraints constraints, PeerConnection.Observer observer) {
|
||||
@ -298,6 +301,7 @@ public class PeerConnectionFactory {
|
||||
* Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct
|
||||
* instead and use the method without constraints in the signature.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
public PeerConnection createPeerConnection(List<PeerConnection.IceServer> iceServers,
|
||||
MediaConstraints constraints, PeerConnection.Observer observer) {
|
||||
@ -305,12 +309,14 @@ public class PeerConnectionFactory {
|
||||
return createPeerConnection(rtcConfig, constraints, observer);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public PeerConnection createPeerConnection(
|
||||
List<PeerConnection.IceServer> iceServers, PeerConnection.Observer observer) {
|
||||
PeerConnection.RTCConfiguration rtcConfig = new PeerConnection.RTCConfiguration(iceServers);
|
||||
return createPeerConnection(rtcConfig, observer);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public PeerConnection createPeerConnection(
|
||||
PeerConnection.RTCConfiguration rtcConfig, PeerConnection.Observer observer) {
|
||||
return createPeerConnection(rtcConfig, null /* constraints */, observer);
|
||||
@ -411,7 +417,7 @@ public class PeerConnectionFactory {
|
||||
return nativeFactory;
|
||||
}
|
||||
|
||||
private static void printStackTrace(Thread thread, String threadName) {
|
||||
private static void printStackTrace(@Nullable Thread thread, String threadName) {
|
||||
if (thread != null) {
|
||||
StackTraceElement[] stackTraces = thread.getStackTrace();
|
||||
if (stackTraces.length > 0) {
|
||||
|
Reference in New Issue
Block a user