Commit bcde09d4 authored by Christian Fremerey's avatar Christian Fremerey Committed by Commit Bot

[Video Capture, Android] Catch AssertionError on getCameraCharacteristics

Crash reports indicate that on some devices the call to getCameraCharacteristics
raises an AssertionError inside Android OS level code. The message attached to
it is typically "Supported FPS ranges cannot be null."

On the Chromium side, the best we can do is to catch this, so that instead of
crashing, we fail gracefully. This CL adds the catch clause.

Bug: 860784
Change-Id: Ic5092e98b9497399ac309f00ea3eaecd41512646
Reviewed-on: https://chromium-review.googlesource.com/1145727Reviewed-by: default avatarEmircan Uysaler <emircan@chromium.org>
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577224}
parent 4b252648
...@@ -807,7 +807,7 @@ public class VideoCaptureCamera2 extends VideoCapture { ...@@ -807,7 +807,7 @@ public class VideoCaptureCamera2 extends VideoCapture {
Context.CAMERA_SERVICE); Context.CAMERA_SERVICE);
try { try {
return manager.getCameraCharacteristics(Integer.toString(id)); return manager.getCameraCharacteristics(Integer.toString(id));
} catch (CameraAccessException | IllegalArgumentException ex) { } catch (CameraAccessException | IllegalArgumentException | AssertionError ex) {
Log.e(TAG, "getCameraCharacteristics: ", ex); Log.e(TAG, "getCameraCharacteristics: ", ex);
} }
return null; return null;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment