diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-09-19 11:59:46 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-09-19 11:59:46 -0700 |
commit | 81b91551dfd0f35380094e3434e5358e8d63f0ba (patch) | |
tree | 3202b70814559f43b7c53427a718c296602075a4 /src | |
parent | 0fa36eae91e743e85f2942407e6b686cb38ac363 (diff) | |
parent | ec449be018e9ff0f644d3484e61334a9667f82a6 (diff) | |
download | android_packages_apps_Snap-81b91551dfd0f35380094e3434e5358e8d63f0ba.tar.gz android_packages_apps_Snap-81b91551dfd0f35380094e3434e5358e8d63f0ba.tar.bz2 android_packages_apps_Snap-81b91551dfd0f35380094e3434e5358e8d63f0ba.zip |
Merge "SnapdragonCamera: Add HDR need 1x menu selection"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 17 | ||||
-rw-r--r-- | src/com/android/camera/PhotoMenu.java | 3 | ||||
-rwxr-xr-x | src/com/android/camera/PhotoModule.java | 10 |
3 files changed, 29 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index c0c8a4092..1232d09ac 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -96,6 +96,7 @@ public class CameraSettings { public static final String KEY_AE_BRACKET_HDR = "pref_camera_ae_bracket_hdr_key"; public static final String KEY_ADVANCED_FEATURES = "pref_camera_advanced_features_key"; public static final String KEY_HDR_MODE = "pref_camera_hdr_mode_key"; + public static final String KEY_HDR_NEED_1X = "pref_camera_hdr_need_1x_key"; public static final String KEY_VIDEO_SNAPSHOT_SIZE = "pref_camera_videosnapsize_key"; public static final String KEY_VIDEO_HIGH_FRAME_RATE = "pref_camera_hfr_key"; @@ -117,6 +118,7 @@ public class CameraSettings { private static final String KEY_QC_SUPPORTED_FACE_RECOGNITION_MODES = "face-recognition-values"; private static final String KEY_QC_SUPPORTED_DIS_MODES = "dis-values"; private static final String KEY_SNAPCAM_SUPPORTED_HDR_MODES = "hdr-mode-values"; + private static final String KEY_SNAPCAM_SUPPORTED_HDR_NEED_1X = "hdr-need-1x-values"; public static final String KEY_QC_AE_BRACKETING = "ae-bracket-hdr"; public static final String KEY_QC_AF_BRACKETING = "af-bracket"; public static final String KEY_QC_RE_FOCUS = "re-focus"; @@ -127,6 +129,7 @@ public class CameraSettings { public static final String KEY_QC_FACE_RECOGNITION = "face-recognition"; public static final String KEY_QC_DIS_MODE = "dis"; public static final String KEY_SNAPCAM_HDR_MODE = "hdr-mode"; + public static final String KEY_SNAPCAM_HDR_NEED_1X = "hdr-need-1x"; public static final String KEY_VIDEO_HSR = "video-hsr"; public static final String KEY_INTERNAL_PREVIEW_RESTART = "internal-restart"; @@ -281,6 +284,14 @@ public class CameraSettings { return split(str); } + public static List<String> getSupportedHDRNeed1x(Parameters params) { + String str = params.get(KEY_SNAPCAM_SUPPORTED_HDR_NEED_1X); + if (str == null) { + return null; + } + return split(str); + } + public List<String> getSupportedAdvancedFeatures(Parameters params) { String str = params.get(KEY_QC_SUPPORTED_AF_BRACKETING_MODES); str += ',' + params.get(KEY_QC_SUPPORTED_CF_MODES); @@ -380,6 +391,12 @@ public class CameraSettings { ListPreference longShot = group.findPreference(KEY_LONGSHOT); ListPreference auto_hdr = group.findPreference(KEY_AUTO_HDR); ListPreference hdr_mode = group.findPreference(KEY_HDR_MODE); + ListPreference hdr_need_1x = group.findPreference(KEY_HDR_NEED_1X); + + if (hdr_need_1x != null) { + filterUnsupportedOptions(group, + hdr_need_1x, getSupportedHDRNeed1x(mParameters)); + } if (hdr_mode != null) { filterUnsupportedOptions(group, diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java index ebafd0fa4..78ab98c5d 100644 --- a/src/com/android/camera/PhotoMenu.java +++ b/src/com/android/camera/PhotoMenu.java @@ -105,7 +105,8 @@ public class PhotoMenu extends PieController CameraSettings.KEY_CAMERA_SAVEPATH, CameraSettings.KEY_LONGSHOT, CameraSettings.KEY_AUTO_HDR, - CameraSettings.KEY_HDR_MODE + CameraSettings.KEY_HDR_MODE, + CameraSettings.KEY_HDR_NEED_1X }; mOtherKeys2 = new String[] { diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index b5208e7ed..b81e96f0f 100755 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -2639,6 +2639,16 @@ public class PhotoModule mParameters.set(CameraSettings.KEY_SNAPCAM_HDR_MODE, hdrMode); } + // Set hdr need 1x + String hdrNeed1x = mPreferences.getString( + CameraSettings.KEY_HDR_NEED_1X, + mActivity.getString(R.string.pref_camera_hdr_need_1x_default)); + Log.v(TAG, "HDR need 1x value =" + hdrNeed1x); + if (CameraUtil.isSupported(hdrNeed1x, + CameraSettings.getSupportedHDRNeed1x(mParameters))) { + mParameters.set(CameraSettings.KEY_SNAPCAM_HDR_NEED_1X, hdrNeed1x); + } + // Set Advanced features. String advancedFeature = mPreferences.getString( CameraSettings.KEY_ADVANCED_FEATURES, |