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

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

Issue 2634973002: Do not classify error after stopping the camera as a startup failure. (Closed)
Patch Set: Created 3 years, 11 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 2552b2413e373263baf3e2039ed3617607f82726..a8e992d80229663f79a7c4ee7e49e374cec55d92 100644
--- a/webrtc/sdk/android/api/org/webrtc/Camera2Session.java
+++ b/webrtc/sdk/android/api/org/webrtc/Camera2Session.java
@@ -97,7 +97,7 @@ public class Camera2Session implements CameraSession {
@Override
public void onDisconnected(CameraDevice camera) {
checkIsOnCameraThread();
- final boolean startFailure = (captureSession == null);
+ final boolean startFailure = (captureSession == null) && (state != SessionState.STOPPED);
state = SessionState.STOPPED;
stopInternal();
if (startFailure) {
@@ -402,7 +402,7 @@ public class Camera2Session implements CameraSession {
checkIsOnCameraThread();
Logging.e(TAG, "Error: " + error);
- final boolean startFailure = (captureSession == null);
+ final boolean startFailure = (captureSession == null) && (state != SessionState.STOPPED);
state = SessionState.STOPPED;
stopInternal();
if (startFailure) {
« 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