summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2018-01-04 23:13:53 +0100
committerChippa-a <vusal1372@gmail.com>2019-10-25 15:55:25 +0300
commit64f46fe9931128c1172aebb9be54153bf1078d88 (patch)
tree48f281791f365a7cc127a4d3939f3de4362e134d
parent7051a282eddc9e96da2da3b74d246d04b481289c (diff)
downloadandroid_packages_apps_Snap-64f46fe9931128c1172aebb9be54153bf1078d88.zip
android_packages_apps_Snap-64f46fe9931128c1172aebb9be54153bf1078d88.tar.gz
android_packages_apps_Snap-64f46fe9931128c1172aebb9be54153bf1078d88.tar.bz2
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
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java6
-rwxr-xr-xsrc/com/android/camera/util/VendorTagUtil.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 164d30e..d52996b 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 b2efbfa..0cc6359 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 {