Camera2Session: Add return statements after reportError where needed.

BUG=webrtc:7117

Review-Url: https://codereview.webrtc.org/2674243002
Cr-Commit-Position: refs/heads/master@{#16445}
This commit is contained in:
sakal
2017-02-06 04:55:21 -08:00
committed by Commit bot
parent 873fcb958f
commit b114e9c159

View File

@ -315,6 +315,7 @@ public class Camera2Session implements CameraSession {
cameraCharacteristics = cameraManager.getCameraCharacteristics(cameraId);
} catch (final CameraAccessException e) {
reportError("getCameraCharacteristics(): " + e.getMessage());
return;
}
cameraOrientation = cameraCharacteristics.get(CameraCharacteristics.SENSOR_ORIENTATION);
isCameraFrontFacing = cameraCharacteristics.get(CameraCharacteristics.LENS_FACING)
@ -338,6 +339,7 @@ public class Camera2Session implements CameraSession {
if (framerateRanges.isEmpty() || sizes.isEmpty()) {
reportError("No supported capture formats.");
return;
}
final CaptureFormat.FramerateRange bestFpsRange =
@ -360,6 +362,7 @@ public class Camera2Session implements CameraSession {
cameraManager.openCamera(cameraId, new CameraStateCallback(), cameraThreadHandler);
} catch (CameraAccessException e) {
reportError("Failed to open camera: " + e);
return;
}
}