Skip to content

Commit

Permalink
JITSI: handle camera2 session creation errors
Browse files Browse the repository at this point in the history
Fatal Exception: java.lang.IllegalArgumentException: connectHelper:1378: Illegal argument to HAL module for camera "0"
       at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:720)
       at android.hardware.camera2.CameraManager.openCameraDeviceUserAsync(CameraManager.java:380)
       at android.hardware.camera2.CameraManager.openCameraForUid(CameraManager.java:542)
       at android.hardware.camera2.CameraManager.openCamera(CameraManager.java:470)
       at org.webrtc.Camera2Session.openCamera(Camera2Session.java:351)
       at org.webrtc.Camera2Session.start(Camera2Session.java:314)
       at org.webrtc.Camera2Session.<init>(Camera2Session.java:296)
       at org.webrtc.Camera2Session.create(Camera2Session.java:274)
       at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
       at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:193)
       at android.os.HandlerThread.run(HandlerThread.java:65)
  • Loading branch information
saghul committed Nov 20, 2020
1 parent 389e277 commit 9a88667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/android/src/java/org/webrtc/Camera2Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private void openCamera() {

try {
cameraManager.openCamera(cameraId, new CameraStateCallback(), cameraThreadHandler);
} catch (CameraAccessException e) {
} catch (CameraAccessException | IllegalArgumentException e) {
reportError("Failed to open camera: " + e);
return;
}
Expand Down

0 comments on commit 9a88667

Please sign in to comment.