diff options
Diffstat (limited to 'sdk/android/api/org/webrtc/Camera2Enumerator.java')
-rw-r--r-- | sdk/android/api/org/webrtc/Camera2Enumerator.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sdk/android/api/org/webrtc/Camera2Enumerator.java b/sdk/android/api/org/webrtc/Camera2Enumerator.java index b32b3ad302..2c6bb57b68 100644 --- a/sdk/android/api/org/webrtc/Camera2Enumerator.java +++ b/sdk/android/api/org/webrtc/Camera2Enumerator.java @@ -55,7 +55,7 @@ public class Camera2Enumerator implements CameraEnumerator { // catch statement with an Exception from a newer API, even if the code is never executed. // https://code.google.com/p/android/issues/detail?id=209129 } catch (/* CameraAccessException */ AndroidException e) { - Logging.e(TAG, "Camera access exception: " + e); + Logging.e(TAG, "Camera access exception", e); return new String[] {}; } } @@ -97,7 +97,7 @@ public class Camera2Enumerator implements CameraEnumerator { // catch statement with an Exception from a newer API, even if the code is never executed. // https://code.google.com/p/android/issues/detail?id=209129 } catch (/* CameraAccessException */ AndroidException e) { - Logging.e(TAG, "Camera access exception: " + e); + Logging.e(TAG, "Camera access exception", e); return null; } } @@ -123,8 +123,8 @@ public class Camera2Enumerator implements CameraEnumerator { // On Android OS pre 4.4.2, a class will not load because of VerifyError if it contains a // catch statement with an Exception from a newer API, even if the code is never executed. // https://code.google.com/p/android/issues/detail?id=209129 - } catch (/* CameraAccessException */ AndroidException e) { - Logging.e(TAG, "Camera access exception: " + e); + } catch (/* CameraAccessException */ AndroidException | RuntimeException e) { + Logging.e(TAG, "Failed to check if camera2 is supported", e); return false; } return true; @@ -186,7 +186,7 @@ public class Camera2Enumerator implements CameraEnumerator { try { cameraCharacteristics = cameraManager.getCameraCharacteristics(cameraId); } catch (Exception ex) { - Logging.e(TAG, "getCameraCharacteristics(): " + ex); + Logging.e(TAG, "getCameraCharacteristics()", ex); return new ArrayList<CaptureFormat>(); } |