diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2018-01-04 23:13:53 +0100 |
---|---|---|
committer | Chippa-a <vusal1372@gmail.com> | 2019-10-25 15:55:25 +0300 |
commit | 64f46fe9931128c1172aebb9be54153bf1078d88 (patch) | |
tree | 48f281791f365a7cc127a4d3939f3de4362e134d /src/com/android | |
parent | 7051a282eddc9e96da2da3b74d246d04b481289c (diff) | |
download | android_packages_apps_Snap-64f46fe9931128c1172aebb9be54153bf1078d88.tar.gz android_packages_apps_Snap-64f46fe9931128c1172aebb9be54153bf1078d88.tar.bz2 android_packages_apps_Snap-64f46fe9931128c1172aebb9be54153bf1078d88.zip |
Snap: check tags before using them
MessageQueue-JNI: java.lang.IllegalArgumentException: Could not find tag for key
'org.codeaurora.qcamera3.saturation.use_saturation')
Change-Id: Ia42c67552f9d4574e5f86af2ac5aea853198d0ed
Diffstat (limited to 'src/com/android')
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 6 | ||||
-rwxr-xr-x | src/com/android/camera/util/VendorTagUtil.java | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 164d30ee8..d52996b38 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -5878,6 +5878,8 @@ public class CaptureModule implements CameraModule, PhotoController, } private void applyInstantAEC(CaptureRequest.Builder request) { + if (!VendorTagUtil.isSupported(request, CaptureModule.INSTANT_AEC_MODE)) + return; String value = mSettingsManager.getValue(SettingsManager.KEY_INSTANT_AEC); if (value == null || value.equals("0")) return; @@ -5886,6 +5888,8 @@ public class CaptureModule implements CameraModule, PhotoController, } private void applySaturationLevel(CaptureRequest.Builder request) { + if (!VendorTagUtil.isSupported(request, CaptureModule.SATURATION)) + return; String value = mSettingsManager.getValue(SettingsManager.KEY_SATURATION_LEVEL); if (value != null) { int intValue = Integer.parseInt(value); @@ -5984,6 +5988,8 @@ public class CaptureModule implements CameraModule, PhotoController, } private void applyHistogram(CaptureRequest.Builder request) { + if (!VendorTagUtil.isSupported(request, CaptureModule.histMode)) + return; String value = mSettingsManager.getValue(SettingsManager.KEY_STATS_VISUALIZER_VALUE); if (value != null ) { if (value.contains("2")) { diff --git a/src/com/android/camera/util/VendorTagUtil.java b/src/com/android/camera/util/VendorTagUtil.java index b2efbfa54..0cc6359ec 100755 --- a/src/com/android/camera/util/VendorTagUtil.java +++ b/src/com/android/camera/util/VendorTagUtil.java @@ -71,7 +71,7 @@ public class VendorTagUtil { private static final int MANUAL_WB_CCT_MODE = 1; private static final int MANUAL_WB_GAINS_MODE = 2; - private static boolean isSupported(CaptureRequest.Builder builder, + public static boolean isSupported(CaptureRequest.Builder builder, CaptureRequest.Key<?> key) { boolean supported = true; try { |