summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyuinferno <ryuinferno.xda@gmail.com>2013-12-26 19:11:23 +0100
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:02 +0300
commit1c2ff71cbdf1713425b86e925764c0505ec1ed43 (patch)
tree85c0d9cee9936d140cca8eddecaa0112dad94edd
parentfee810cb66383b2962af5250a0f67a12147c0455 (diff)
downloadandroid_packages_apps_Snap-1c2ff71cbdf1713425b86e925764c0505ec1ed43.zip
android_packages_apps_Snap-1c2ff71cbdf1713425b86e925764c0505ec1ed43.tar.gz
android_packages_apps_Snap-1c2ff71cbdf1713425b86e925764c0505ec1ed43.tar.bz2
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
-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 1384912..7d92e3c 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -639,15 +639,18 @@ public class CameraSettings {
selectableZoneAf, mParameters.getSupportedSelectableZoneAf());
}
- 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 616b629..c770893 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2843,7 +2843,8 @@ public class PhotoModule
mParameters.setColorEffect(colorEffect);
}
//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));
@@ -2854,7 +2855,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));
@@ -2865,7 +2867,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));