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:
Sami Kalliomäki
2018-03-22 13:32:44 +01:00
committed by Commit Bot
parent 12d6a49e97
commit e7592d8d5f
47 changed files with 277 additions and 170 deletions

View File

@ -20,6 +20,7 @@ import android.os.Handler;
import android.os.HandlerThread;
import java.nio.ByteBuffer;
import java.util.concurrent.Callable;
import javax.annotation.Nullable;
import org.webrtc.EglBase;
import org.webrtc.VideoFrame.TextureBuffer;
@ -62,6 +63,7 @@ public class SurfaceTextureHelper {
// Therefore, in order to control the callback thread on API lvl < 21, the SurfaceTextureHelper
// is constructed on the |handler| thread.
return ThreadUtils.invokeAtFrontUninterruptibly(handler, new Callable<SurfaceTextureHelper>() {
@Nullable
@Override
public SurfaceTextureHelper call() {
try {
@ -81,14 +83,14 @@ public class SurfaceTextureHelper {
private YuvConverter yuvConverter;
// These variables are only accessed from the |handler| thread.
private OnTextureFrameAvailableListener listener;
@Nullable private OnTextureFrameAvailableListener listener;
// The possible states of this class.
private boolean hasPendingTexture = false;
private volatile boolean isTextureInUse = false;
private boolean isQuitting = false;
// |pendingListener| is set in setListener() and the runnable is posted to the handler thread.
// setListener() is not allowed to be called again before stopListening(), so this is thread safe.
private OnTextureFrameAvailableListener pendingListener;
@Nullable private OnTextureFrameAvailableListener pendingListener;
final Runnable setListenerRunnable = new Runnable() {
@Override
public void run() {