Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: webrtc/sdk/android/api/org/webrtc/Camera2Session.java

Issue 2674243002: Camera2Session: Add return statements after reportError where needed. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/android/api/org/webrtc/Camera2Session.java
diff --git a/webrtc/sdk/android/api/org/webrtc/Camera2Session.java b/webrtc/sdk/android/api/org/webrtc/Camera2Session.java
index 0ef3e42d15c2ccce946b37b0048c400dad5c7a89..dfc6aa374ab93fa8624322c8a9122e7053e2b4d8 100644
--- a/webrtc/sdk/android/api/org/webrtc/Camera2Session.java
+++ b/webrtc/sdk/android/api/org/webrtc/Camera2Session.java
@@ -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;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698