Commit 91ed256b authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Check for null CONTROL_AWB_LOCK_AVAILABLE value in VideoCamera2

Check that the value for this property is not null before trying
to use its value.

Bug: 1031921
Change-Id: I164ad850775df07fa5b993d7db51e671fc5bfa36
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2185491
Auto-Submit: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
Reviewed-by: default avatarMarina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#766351}
parent 29627786
......@@ -624,7 +624,9 @@ public class VideoCaptureCamera2 extends VideoCapture {
}
}
try {
if (cameraCharacteristics.get(CameraCharacteristics.CONTROL_AWB_LOCK_AVAILABLE)) {
Boolean awb_lock_available =
cameraCharacteristics.get(CameraCharacteristics.CONTROL_AWB_LOCK_AVAILABLE);
if (awb_lock_available != null && awb_lock_available.booleanValue()) {
whiteBalanceModes.add(Integer.valueOf(AndroidMeteringMode.FIXED));
}
} catch (NoSuchFieldError e) {
......
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