Skip to content

Commit dc40d5c

Browse files
committed
JITSI: catch exception in Camera2Enumerator.isSupported()
Avoids this exception: Fatal Exception: java.lang.RuntimeException: Camera is being used after Camera.release() was called at android.hardware.Camera._enableShutterSound(Camera.java) at android.hardware.Camera.updateAppOpsPlayAudio + 1786(Camera.java:1786) at android.hardware.Camera.initAppOps + 598(Camera.java:598) at android.hardware.Camera.(Camera.java:591) at android.hardware.Camera.getEmptyParameters + 2146(Camera.java:2146) at android.hardware.camera2.legacy.LegacyMetadataMapper.createCharacteristics + 151(LegacyMetadataMapper.java:151) at android.hardware.camera2.CameraManager.getCameraCharacteristics + 347(CameraManager.java:347) at org.webrtc.Camera2Enumerator.isSupported + 116(Camera2Enumerator.java:116)
1 parent 8849f86 commit dc40d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/android/api/org/webrtc/Camera2Enumerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static boolean isSupported(Context context) {
123123
// On Android OS pre 4.4.2, a class will not load because of VerifyError if it contains a
124124
// catch statement with an Exception from a newer API, even if the code is never executed.
125125
// https://code.google.com/p/android/issues/detail?id=209129
126-
} catch (/* CameraAccessException */ AndroidException e) {
126+
} catch (Exception e) {
127127
Logging.e(TAG, "Camera access exception: " + e);
128128
return false;
129129
}

0 commit comments

Comments
 (0)