Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1832)

Unified Diff: media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java

Issue 2835413004: Image Capture: catch NoSuchFieldError if reading CONTROL_{AE,AWB}_LOCK_AVAILABLE where not available (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
diff --git a/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java b/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
index ef9726146b158d29aaea2c11827ca6b42a81e54b..aa828a755b9b24b50f1ebc79dbc1f1d6aa94c374 100644
--- a/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
+++ b/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java
@@ -805,8 +805,12 @@ public class VideoCaptureCamera2 extends VideoCapture {
break;
}
}
- if (cameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_LOCK_AVAILABLE)) {
- exposureModes.add(Integer.valueOf(AndroidMeteringMode.FIXED));
+ try {
+ if (cameraCharacteristics.get(CameraCharacteristics.CONTROL_AE_LOCK_AVAILABLE)) {
+ exposureModes.add(Integer.valueOf(AndroidMeteringMode.FIXED));
+ }
+ } catch (NoSuchFieldError e) {
+ // Ignore this exception, it means CONTROL_AE_LOCK_AVAILABLE is not known.
}
builder.setExposureModes(integerArrayListToArray(exposureModes));
@@ -840,8 +844,12 @@ public class VideoCaptureCamera2 extends VideoCapture {
break;
}
}
- if (cameraCharacteristics.get(CameraCharacteristics.CONTROL_AWB_LOCK_AVAILABLE)) {
- whiteBalanceModes.add(Integer.valueOf(AndroidMeteringMode.FIXED));
+ try {
+ if (cameraCharacteristics.get(CameraCharacteristics.CONTROL_AWB_LOCK_AVAILABLE)) {
+ whiteBalanceModes.add(Integer.valueOf(AndroidMeteringMode.FIXED));
+ }
+ } catch (NoSuchFieldError e) {
+ // Ignore this exception, it means CONTROL_AWB_LOCK_AVAILABLE is not known.
}
builder.setWhiteBalanceModes(integerArrayListToArray(whiteBalanceModes));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698