summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-10-26 18:39:05 -0700
committerMichael Bestas <mikeioannina@cyanogenmod.org>2016-01-19 17:13:29 +0200
commitb5de27139a64c261bcf2de031f50354c2ebade55 (patch)
treed356abfad348d4daff9dd4509e0382fcbb7090e9
parent860c1f5121371ff9bebe09a4946eb9f74bb8a386 (diff)
downloadandroid_packages_apps_Snap-b5de27139a64c261bcf2de031f50354c2ebade55.zip
android_packages_apps_Snap-b5de27139a64c261bcf2de031f50354c2ebade55.tar.gz
android_packages_apps_Snap-b5de27139a64c261bcf2de031f50354c2ebade55.tar.bz2
SnapdragonCamera: Add option to control antibanding in camcorder
The antibanding setting in camcorder is linked to the setting in camera mode for better UX (if you change one, the other will change accordingly). Change-Id: I98c1bc65472cf8eec530f5a7572f46458b0ab3fa
-rw-r--r--res/xml/video_preferences.xml6
-rw-r--r--src/com/android/camera/VideoMenu.java1
-rw-r--r--src/com/android/camera/VideoModule.java23
3 files changed, 14 insertions, 16 deletions
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index 530d987..dec9166 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -155,6 +155,12 @@
camera:title="@string/pref_camera_video_rotation_title"
camera:entries="@array/pref_camera_video_rotation_entries"
camera:entryValues="@array/pref_camera_video_rotation_entryvalues" />
+ <ListPreference
+ camera:key="pref_camera_antibanding_key"
+ camera:defaultValue="@string/pref_camera_antibanding_default"
+ camera:title="@string/pref_camera_antibanding_title"
+ camera:entries="@array/pref_camera_antibanding_entries"
+ camera:entryValues="@array/pref_camera_antibanding_entryvalues" />
<IconListPreference
camera:key="pref_power_shutter"
camera:defaultValue="@string/pref_camera_power_shutter_default"
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index 6018fcf..e8aca48 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -137,6 +137,7 @@ public class VideoMenu extends MenuController
CameraSettings.KEY_VIDEO_ENCODER,
CameraSettings.KEY_AUDIO_ENCODER,
CameraSettings.KEY_VIDEO_HDR,
+ CameraSettings.KEY_ANTIBANDING,
CameraSettings.KEY_VIDEO_ROTATION,
CameraSettings.KEY_VIDEO_CDS_MODE,
CameraSettings.KEY_VIDEO_TNR_MODE
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 92d9e29..6b882ae 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -328,7 +328,6 @@ public class VideoModule implements CameraModule,
private boolean mUnsupportedHFRVideoSize = false;
private boolean mUnsupportedHSRVideoSize = false;
private boolean mUnsupportedHFRVideoCodec = false;
- private String mDefaultAntibanding = null;
public void onScreenSizeChanged(int width, int height) {
if (mFocusManager != null) mFocusManager.setPreviewSize(width, height);
@@ -2278,23 +2277,15 @@ public class VideoModule implements CameraModule,
}
}
- if (mDefaultAntibanding == null) {
- mDefaultAntibanding = mParameters.getAntibanding();
- Log.d(TAG, "default antibanding value = " + mDefaultAntibanding);
+ // Set anti banding parameter.
+ String antiBanding = mPreferences.getString(
+ CameraSettings.KEY_ANTIBANDING,
+ mActivity.getString(R.string.pref_camera_antibanding_default));
+ Log.v(TAG, "antiBanding value =" + antiBanding);
+ if (CameraUtil.isSupported(antiBanding, mParameters.getSupportedAntibanding())) {
+ mParameters.setAntibanding(antiBanding);
}
- if (disMode.equals("enable")) {
- Log.d(TAG, "dis is enabled, set antibanding to auto.");
- if (isSupported(Parameters.ANTIBANDING_AUTO, mParameters.getSupportedAntibanding())) {
- mParameters.setAntibanding(Parameters.ANTIBANDING_AUTO);
- }
- } else {
- if (isSupported(mDefaultAntibanding, mParameters.getSupportedAntibanding())) {
- mParameters.setAntibanding(mDefaultAntibanding);
- }
- }
- Log.d(TAG, "antiBanding value = " + mParameters.getAntibanding());
-
String seeMoreMode = mPreferences.getString(
CameraSettings.KEY_SEE_MORE,
mActivity.getString(R.string.pref_camera_see_more_default));