From b18fbd1d46bb2472caa0717000568da48aa67f2f Mon Sep 17 00:00:00 2001 From: Sultanxda Date: Mon, 26 Oct 2015 18:39:05 -0700 Subject: 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 --- src/com/android/camera/VideoModule.java | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'src/com/android/camera/VideoModule.java') diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 4c615bdb6..b87b3e432 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -362,7 +362,6 @@ public class VideoModule implements CameraModule, private boolean mUnsupportedHFRVideoSize = false; private boolean mUnsupportedHSRVideoSize = false; private boolean mUnsupportedHFRVideoCodec = false; - private String mDefaultAntibanding = null; boolean mUnsupportedProfile = false; // This Handler is used to post message back onto the main thread of the @@ -2417,23 +2416,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()); - mUnsupportedHFRVideoSize = false; mUnsupportedHFRVideoCodec = false; mUnsupportedHSRVideoSize = false; -- cgit v1.2.3