Index: webrtc/sdk/android/api/org/webrtc/CameraCapturer.java |
diff --git a/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java b/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java |
index fcfcd70e861e759b109477a1cd1c2eee73f0732a..e80b0630d1e3ca96788042fabdba43fc951666cd 100644 |
--- a/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java |
+++ b/webrtc/sdk/android/api/org/webrtc/CameraCapturer.java |
@@ -61,7 +61,7 @@ public abstract class CameraCapturer implements CameraVideoCapturer { |
} |
@Override |
- public void onFailure(String error) { |
+ public void onFailure(CameraSession.FailureType failureType, String error) { |
checkIsOnCameraThread(); |
uiThreadHandler.removeCallbacks(openCameraTimeoutRunnable); |
synchronized (stateLock) { |
@@ -81,7 +81,11 @@ public abstract class CameraCapturer implements CameraVideoCapturer { |
switchState = SwitchState.IDLE; |
} |
- eventsHandler.onCameraError(error); |
+ if (failureType == CameraSession.FailureType.DISCONNECTED) { |
+ eventsHandler.onCameraDisconnected(); |
+ } else { |
+ eventsHandler.onCameraError(error); |
+ } |
} else { |
Logging.w(TAG, "Opening camera failed, retry: " + error); |