summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorRyuinferno <ryuinferno.xda@gmail.com>2013-12-26 19:11:23 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-26 00:51:24 +0100
commit358310ffa93a772fc8411fa2b7ef4613e495fc3b (patch)
treea385caa6244b6d9302a65c09b64dfbe551f78e8b /src/com/android
parentb9afe5c37966869e29d996d981dacf7765195fca (diff)
downloadandroid_packages_apps_Snap-358310ffa93a772fc8411fa2b7ef4613e495fc3b.tar.gz
android_packages_apps_Snap-358310ffa93a772fc8411fa2b7ef4613e495fc3b.tar.bz2
android_packages_apps_Snap-358310ffa93a772fc8411fa2b7ef4613e495fc3b.zip
Camera2: More thorough compatibility fixes
Certain chipsets (such as omap) have contrast, sharpness and saturation set, but no max integer given for those Change-Id: I58efaef4d0a511aefc803a440e0c3aa3dbdc9483
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/CameraSettings.java9
-rw-r--r--src/com/android/camera/PhotoModule.java9
2 files changed, 12 insertions, 6 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 9f98efffa..f077e7011 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -806,15 +806,18 @@ public class CameraSettings {
selectableZoneAf, ParametersWrapper.getSupportedSelectableZoneAf(mParameters));
}
- if (saturation != null && !CameraUtil.isSupported(mParameters, "saturation")) {
+ if (saturation != null && !CameraUtil.isSupported(mParameters, "saturation") &&
+ !CameraUtil.isSupported(mParameters, "saturation-max")) {
removePreference(group, saturation.getKey());
}
- if (contrast != null && !CameraUtil.isSupported(mParameters, "contrast")) {
+ if (contrast != null && !CameraUtil.isSupported(mParameters, "contrast") &&
+ !CameraUtil.isSupported(mParameters, "contrast-max")) {
removePreference(group, contrast.getKey());
}
- if (sharpness != null && !CameraUtil.isSupported(mParameters, "sharpness")) {
+ if (sharpness != null && !CameraUtil.isSupported(mParameters, "sharpness") &&
+ !CameraUtil.isSupported(mParameters, "sharpness-max")) {
removePreference(group, sharpness.getKey());
}
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index fd750e9a8..7cf83a607 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -3349,7 +3349,8 @@ public class PhotoModule
}
//Set Saturation
- if (CameraUtil.isSupported(mParameters, "saturation")) {
+ if (CameraUtil.isSupported(mParameters, "saturation") &&
+ CameraUtil.isSupported(mParameters, "saturation-max")) {
String saturationStr = mPreferences.getString(
CameraSettings.KEY_SATURATION,
mActivity.getString(R.string.pref_camera_saturation_default));
@@ -3360,7 +3361,8 @@ public class PhotoModule
}
}
// Set contrast parameter.
- if (CameraUtil.isSupported(mParameters, "contrast")) {
+ if (CameraUtil.isSupported(mParameters, "contrast") &&
+ CameraUtil.isSupported(mParameters, "contrast-max")) {
String contrastStr = mPreferences.getString(
CameraSettings.KEY_CONTRAST,
mActivity.getString(R.string.pref_camera_contrast_default));
@@ -3371,7 +3373,8 @@ public class PhotoModule
}
}
// Set sharpness parameter
- if (CameraUtil.isSupported(mParameters, "sharpness")) {
+ if (CameraUtil.isSupported(mParameters, "sharpness") &&
+ CameraUtil.isSupported(mParameters, "sharpness-max")) {
String sharpnessStr = mPreferences.getString(
CameraSettings.KEY_SHARPNESS,
mActivity.getString(R.string.pref_camera_sharpness_default));