Chromium Code Reviews

Unified Diff: webrtc/api/android/java/src/org/webrtc/Camera1Session.java

Issue 2381343002: Add onCameraDisconnected camera event. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | webrtc/api/android/java/src/org/webrtc/Camera2Session.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/android/java/src/org/webrtc/Camera1Session.java
diff --git a/webrtc/api/android/java/src/org/webrtc/Camera1Session.java b/webrtc/api/android/java/src/org/webrtc/Camera1Session.java
index 11b8b78bd2e9b6220c83c53dfb22ecde05d41b93..dae7910f70774bff4b3e966322b2c8456e640cd8 100644
--- a/webrtc/api/android/java/src/org/webrtc/Camera1Session.java
+++ b/webrtc/api/android/java/src/org/webrtc/Camera1Session.java
@@ -202,7 +202,11 @@ public class Camera1Session implements CameraSession {
Logging.e(TAG, errorMessage);
state = SessionState.STOPPED;
stopInternal();
- events.onCameraError(Camera1Session.this, errorMessage);
+ if (error == android.hardware.Camera.CAMERA_ERROR_EVICTED) {
+ events.onCameraDisconnected(Camera1Session.this);
+ } else {
+ events.onCameraError(Camera1Session.this, errorMessage);
+ }
}
});
« no previous file with comments | « no previous file | webrtc/api/android/java/src/org/webrtc/Camera2Session.java » ('j') | no next file with comments »

Powered by Google App Engine