summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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));