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

@ -13,6 +13,7 @@ package org.webrtc;
import android.os.SystemClock;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nullable;
import org.webrtc.CameraEnumerationAndroid.CaptureFormat;
@SuppressWarnings("deprecation")
@ -73,7 +74,7 @@ public class Camera1Enumerator implements CameraEnumerator {
return new Camera1Capturer(deviceName, eventsHandler, captureToTexture);
}
private static android.hardware.Camera.CameraInfo getCameraInfo(int index) {
private static @Nullable android.hardware.Camera.CameraInfo getCameraInfo(int index) {
android.hardware.Camera.CameraInfo info = new android.hardware.Camera.CameraInfo();
try {
android.hardware.Camera.getCameraInfo(index, info);
@ -171,7 +172,7 @@ public class Camera1Enumerator implements CameraEnumerator {
// Returns the name of the camera with camera index. Returns null if the
// camera can not be used.
static String getDeviceName(int index) {
static @Nullable String getDeviceName(int index) {
android.hardware.Camera.CameraInfo info = getCameraInfo(index);
if (info == null) {
return null;