summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShwetha Kotekar <skotekar@codeaurora.org>2015-03-10 13:36:06 -0700
committerSteve Kondik <steve@cyngn.com>2016-07-30 05:03:50 -0700
commit2fc004c8bbbd21a873141d3710adcd5e2a9ad69a (patch)
tree7ba2c3a38e003d54bb721a120aa9886f3a9d3d6d
parent6d7dfbf65ebb420bc9c6ab37a2c9d97db870f5d4 (diff)
downloadandroid_packages_apps_Snap-2fc004c8bbbd21a873141d3710adcd5e2a9ad69a.zip
android_packages_apps_Snap-2fc004c8bbbd21a873141d3710adcd5e2a9ad69a.tar.gz
android_packages_apps_Snap-2fc004c8bbbd21a873141d3710adcd5e2a9ad69a.tar.bz2
SnapdragonCamera: Disable CDS and TNR if SeeMore is enabled
If seeMore is enabled, send a disable command to HAL to disable the CDS and TNR features. Change-Id: I91bac0a01c58cb13ba32296739b47f74dc296003 SnapdragonCamera: Enable SeeMore option for 4k. Currently SeeMore option for 4k recording is disabled. As per requirements, enabling the same. Change-Id: I69e84e0c20c199d80fc819f8aa6be62605bfbd79 SnapdragonCamera: Turning off CDS and TNR while SeeMore is on. Ensuring turning off of CDS and TNR while see more feature is on. Change-Id: I74c76f8b07046b8dca9db2be162b7ef20ba2d96d CRs-Fixed: 937242 Camera2: Add StillMore option in Camera app menu Add menu item for StillMore feature under the Advanced Features item during camera preview. Change-Id: I89ae260339896878ff4f1c5099885c6f3b05a18b SnapdragonCamera: Changes to enable TNR processing by default. TNR was disabled by default from UI. Change configures TNR for camera stream to improve image quality. CDS is disabled as TNR is enabled by default from now. Change-Id: I7c1bf9533c52b8642fb15f79625cec57cc85b6cf Crs-fixed: 890243 SnapdragonCamera: Checking whether SeeMore is available Checking if the preference is available. Change-Id: Ie885b9312f2fe054e272d15b9a38e2cedf756632 CRs-Fixed: 957117
-rw-r--r--res/values/qcomarrays.xml2
-rw-r--r--res/values/qcomstrings.xml12
-rw-r--r--res/values/strings.xml6
-rw-r--r--src/com/android/camera/CameraSettings.java11
-rw-r--r--src/com/android/camera/PhotoModule.java48
-rw-r--r--src/com/android/camera/VideoMenu.java18
-rw-r--r--src/com/android/camera/VideoModule.java47
7 files changed, 108 insertions, 36 deletions
diff --git a/res/values/qcomarrays.xml b/res/values/qcomarrays.xml
index 6ae1926..2b565fd 100644
--- a/res/values/qcomarrays.xml
+++ b/res/values/qcomarrays.xml
@@ -691,6 +691,7 @@
<item>@string/pref_camera_advanced_feature_entry_FSSR</item>
<item>@string/pref_camera_advanced_feature_entry_trueportrait</item>
<item>@string/pref_camera_advanced_feature_entry_multi_touch_focus</item>
+ <item>@string/pref_camera_advanced_feature_entry_stillmore</item>
</string-array>
<string-array name="pref_camera_advanced_features_entryvalues" translatable="false">
@@ -702,6 +703,7 @@
<item>FSSR-on</item>
<item>true-portrait-on</item>
<item>multi-touch-focus-on</item>
+ <item>@string/pref_camera_advanced_feature_value_stillmore_on</item>
</string-array>
<!-- Continuous shot -->
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 723bdff..fcf0891 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -128,6 +128,11 @@
<string name="pref_camera_manual_focus_entry_diopter_mode">Diopter mode</string>
<string name="pref_camera_manual_focus_entry_off">Off</string>
+ <!-- Still More -->
+ <string name="pref_camera_advanced_feature_entry_stillmore">Still More</string>
+ <string name="pref_camera_advanced_feature_value_stillmore_on">still-more-on</string>
+ <string name="pref_camera_advanced_feature_value_stillmore_off">still-more-off</string>
+
<!-- Video HDR-->
<string name="pref_camera_video_hdr_title">Video HDR</string>
<string name="pref_camera_video_hdr_default" translatable="false">off</string>
@@ -140,7 +145,7 @@
<!-- Video CDS-->
<string name="pref_camera_video_cds_title">Video CDS mode</string>
- <string name="pref_camera_video_cds_default" translatable="false">on</string>
+ <string name="pref_camera_video_cds_default" translatable="false">off</string>
<string name="pref_camera_video_cds_entry_auto">Auto</string>
@@ -150,7 +155,7 @@
<!-- Video TNR -->
<string name="pref_camera_video_tnr_title">Video TNR mode</string>
- <string name="pref_camera_video_tnr_default" translatable="false">off</string>
+ <string name="pref_camera_video_tnr_default" translatable="false">on</string>
<!-- Face detection -->
<string name="pref_camera_facedetection_title">Face detection</string>
@@ -516,8 +521,5 @@
<string name="pref_camera_manual_exp_value_exptime_priority" translatable="false">exp-time-priority</string>
<string name="pref_camera_manual_exp_value_user_setting" translatable="false">user-setting</string>
- <string name="pref_camera_see_more_value_off" translatable="false">off</string>
- <string name="pref_camera_see_more_value_on" translatable="false">on</string>
-
<string name="pref_camera_dis_value_disable" translatable="false">disable</string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index fecad08..409bca7 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -379,6 +379,12 @@
<!-- Toast after trying to select a setting that is not allowed to change in scene mode [CHAR LIMIT=NONE] -->
<string name="not_selectable_in_scene_mode">Not selectable in scene mode.</string>
+ <!-- Toast after SeeMore has been enabled to show CDS is disabled -->
+ <string name="disable_CDS_during_SeeMore">SeeMore will disable CDS.</string>
+
+ <!-- Toast after SeeMore has been enabled to show TNR is disabled -->
+ <string name="disable_TNR_during_SeeMore">SeeMore will disable TNR.</string>
+
<!-- Exposure settings in preference -->
<string name="pref_exposure_title">Exposure</string>
<string name="pref_exposure_default" translatable="false">0</string>
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 3cb197f..ee5ba7b 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -135,6 +135,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_QC_SUPPORTED_SEE_MORE_MODES = "see-more-values";
+ private static final String KEY_QC_SUPPORTED_STILL_MORE_MODES = "still-more-values";
private static final String KEY_QC_SUPPORTED_CDS_MODES = "cds-mode-values";
private static final String KEY_QC_SUPPORTED_VIDEO_CDS_MODES = "video-cds-mode-values";
private static final String KEY_QC_SUPPORTED_TNR_MODES = "tnr-mode-values";
@@ -155,6 +156,7 @@ public class CameraSettings {
public static final String KEY_QC_FSSR = "FSSR";
public static final String KEY_QC_TP = "true-portrait";
public static final String KEY_QC_MULTI_TOUCH_FOCUS = "multi-touch-focus";
+ public static final String KEY_QC_STILL_MORE = "still-more";
public static final String KEY_QC_FACE_RECOGNITION = "face-recognition";
public static final String KEY_QC_DIS_MODE = "dis";
public static final String KEY_QC_CDS_MODE = "cds-mode";
@@ -545,6 +547,7 @@ public class CameraSettings {
str += ',' + params.get(KEY_QC_SUPPORTED_MTF_MODES);
str += ',' + mContext.getString(R.string.pref_camera_advanced_feature_default);
str += ',' + params.get(KEY_QC_SUPPORTED_RE_FOCUS_MODES);
+ str += ',' + params.get(KEY_QC_SUPPORTED_STILL_MORE_MODES);
return split(str);
}
@@ -612,6 +615,14 @@ public class CameraSettings {
return split(str);
}
+ public static List<String> getSupportedStillMoreModes(Parameters params) {
+ String str = params.get(KEY_QC_SUPPORTED_STILL_MORE_MODES);
+ if (str == null) {
+ return null;
+ }
+ return split(str);
+ }
+
// Splits a comma delimited string to an ArrayList of String.
// Return null if the passing string is null or the size is 0.
private static ArrayList<String> split(String str) {
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 6ac286f..89f5677 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1808,6 +1808,10 @@ public class PhotoModule
mParameters.get(CameraSettings.KEY_QC_TP);
String multiTouchFocus =
mParameters.get(CameraSettings.KEY_QC_MULTI_TOUCH_FOCUS);
+ String stillMoreOn = mActivity.getString(R.string.
+ pref_camera_advanced_feature_value_stillmore_on);
+ String stillMore =
+ mParameters.get(CameraSettings.KEY_QC_STILL_MORE);
String continuousShot =
mParameters.get("long-shot");
@@ -1832,7 +1836,8 @@ public class PhotoModule
(chromaFlash != null && chromaFlash.equals(chromaFlashOn)) ||
(optiZoom != null && optiZoom.equals(optiZoomOn)) ||
(fssr != null && fssr.equals(fssrOn)) ||
- (truePortrait != null && truePortrait.equals(truPortraitOn))) {
+ (truePortrait != null && truePortrait.equals(truPortraitOn)) ||
+ (stillMore != null && stillMore.equals(stillMoreOn))) {
mSceneMode = sceneMode = Parameters.SCENE_MODE_AUTO;
flashMode = Parameters.FLASH_MODE_OFF;
focusMode = Parameters.FOCUS_MODE_INFINITY;
@@ -2863,7 +2868,8 @@ public class PhotoModule
String optiZoom,
String fssr,
String truePortrait,
- String multiTouchFocus) {
+ String multiTouchFocus,
+ String stillMore) {
if (CameraUtil.isSupported(ubiFocus,
CameraSettings.getSupportedAFBracketingModes(mParameters))) {
mParameters.set(CameraSettings.KEY_QC_AF_BRACKETING, ubiFocus);
@@ -2892,6 +2898,10 @@ public class PhotoModule
CameraSettings.getSupportedMultiTouchFocusModes(mParameters))) {
mParameters.set(CameraSettings.KEY_QC_MULTI_TOUCH_FOCUS, multiTouchFocus);
}
+ if (CameraUtil.isSupported(stillMore,
+ CameraSettings.getSupportedStillMoreModes(mParameters))) {
+ mParameters.set(CameraSettings.KEY_QC_STILL_MORE, stillMore);
+ }
}
private String getSaturationSafe() {
@@ -3159,6 +3169,8 @@ public class PhotoModule
pref_camera_advanced_feature_value_trueportrait_off);
String multiTouchFocusOff = mActivity.getString(R.string.
pref_camera_advanced_feature_value_multi_touch_focus_off);
+ String stillMoreOff = mActivity.getString(R.string.
+ pref_camera_advanced_feature_value_stillmore_off);
if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_ubifocus_on))) {
@@ -3168,7 +3180,8 @@ public class PhotoModule
optiZoomOff,
fssrOff,
truePortraitOff,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
} else if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_chromaflash_on))) {
qcomUpdateAdvancedFeatures(ubiFocusOff,
@@ -3177,7 +3190,8 @@ public class PhotoModule
optiZoomOff,
fssrOff,
truePortraitOff,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
} else if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_refocus_on))) {
qcomUpdateAdvancedFeatures(ubiFocusOff,
@@ -3186,7 +3200,8 @@ public class PhotoModule
optiZoomOff,
fssrOff,
truePortraitOff,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
mRefocus = true;
} else if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_optizoom_on))) {
@@ -3196,7 +3211,8 @@ public class PhotoModule
advancedFeature,
fssrOff,
truePortraitOff,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
} else if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_FSSR_on))) {
qcomUpdateAdvancedFeatures(ubiFocusOff,
@@ -3205,7 +3221,8 @@ public class PhotoModule
optiZoomOff,
advancedFeature,
truePortraitOff,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
} else if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_trueportrait_on))) {
qcomUpdateAdvancedFeatures(ubiFocusOff,
@@ -3214,7 +3231,8 @@ public class PhotoModule
optiZoomOff,
fssrOff,
advancedFeature,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
} else if (advancedFeature.equals(mActivity.getString(R.string.
pref_camera_advanced_feature_value_multi_touch_focus_on))) {
qcomUpdateAdvancedFeatures(ubiFocusOff,
@@ -3223,6 +3241,17 @@ public class PhotoModule
optiZoomOff,
fssrOff,
truePortraitOff,
+ advancedFeature,
+ stillMoreOff);
+ } else if (advancedFeature.equals(mActivity.getString(R.string.
+ pref_camera_advanced_feature_value_stillmore_on))) {
+ qcomUpdateAdvancedFeatures(ubiFocusOff,
+ chromaFlashOff,
+ reFocusOff,
+ optiZoomOff,
+ fssrOff,
+ truePortraitOff,
+ multiTouchFocusOff,
advancedFeature);
} else {
qcomUpdateAdvancedFeatures(ubiFocusOff,
@@ -3231,7 +3260,8 @@ public class PhotoModule
optiZoomOff,
fssrOff,
truePortraitOff,
- multiTouchFocusOff);
+ multiTouchFocusOff,
+ stillMoreOff);
}
}
// Set auto exposure parameter.
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index c7e7e9f..1541acb 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -609,8 +609,7 @@ public class VideoMenu extends MenuController
mPrevSavedVideoCDS = cds;
}
- if ((tnr != null) && !mActivity.getString(R.string.
- pref_camera_video_tnr_default).equals(tnr)) {
+ if ((tnr != null) && !tnr.equals("off")) {
mListMenu.setPreferenceEnabled(
CameraSettings.KEY_VIDEO_CDS_MODE,false);
mListMenu.overrideSettings(
@@ -633,6 +632,21 @@ public class VideoMenu extends MenuController
mIsVideoCDSUpdated = false;
}
}
+
+ ListPreference pref_SeeMore = mPreferenceGroup.findPreference(CameraSettings.KEY_SEE_MORE);
+ if(pref_SeeMore != null && pref_SeeMore.getValue() != null
+ && pref_SeeMore.getValue().equals("on")) {
+ mListMenu.setPreferenceEnabled(
+ CameraSettings.KEY_VIDEO_CDS_MODE,false);
+ mListMenu.overrideSettings(
+ CameraSettings.KEY_VIDEO_CDS_MODE,
+ mActivity.getString(R.string.pref_camera_video_cds_value_off));
+ mListMenu.setPreferenceEnabled(
+ CameraSettings.KEY_VIDEO_TNR_MODE, false);
+ mListMenu.overrideSettings(
+ CameraSettings.KEY_VIDEO_TNR_MODE,
+ mActivity.getString(R.string.pref_camera_video_tnr_value_off));
+ }
}
}
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index ff3e787..7464604 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -2329,26 +2329,6 @@ public class VideoModule implements CameraModule,
mParameters.setAntibanding(antiBanding);
}
- String seeMoreMode = mPreferences.getString(
- CameraSettings.KEY_SEE_MORE,
- mActivity.getString(R.string.pref_camera_see_more_default));
- Log.v(TAG, "See More value =" + seeMoreMode);
-
- if (isSupported(seeMoreMode,
- CameraSettings.getSupportedSeeMoreModes(mParameters))) {
- if (is4KEnabled() && seeMoreMode.equals(mActivity.getString(R.string.
- pref_camera_see_more_value_on))) {
- mParameters.set(CameraSettings.KEY_QC_SEE_MORE_MODE,
- mActivity.getString(R.string.pref_camera_see_more_value_off));
- mUI.overrideSettings(CameraSettings.KEY_SEE_MORE,
- mActivity.getString(R.string.pref_camera_see_more_value_off));
- Toast.makeText(mActivity, R.string.video_quality_4k_disable_SeeMore,
- Toast.LENGTH_LONG).show();
- } else {
- mParameters.set(CameraSettings.KEY_QC_SEE_MORE_MODE, seeMoreMode);
- }
- }
-
mUnsupportedHFRVideoSize = false;
mUnsupportedHFRVideoCodec = false;
mUnsupportedHSRVideoSize = false;
@@ -2502,6 +2482,33 @@ public class VideoModule implements CameraModule,
mUI.overrideSettings(CameraSettings.KEY_QC_VIDEO_TNR_MODE, video_tnr);
}
+ String seeMoreMode = mPreferences.getString(
+ CameraSettings.KEY_SEE_MORE,
+ mActivity.getString(R.string.pref_camera_see_more_default));
+ Log.v(TAG, "See More value =" + seeMoreMode);
+
+ if (isSupported(seeMoreMode,
+ CameraSettings.getSupportedSeeMoreModes(mParameters))) {
+ /* Disable CDS */
+ if ("on".equals(seeMoreMode) && "on".equals(video_cds)) {
+ mParameters.set(CameraSettings.KEY_QC_VIDEO_CDS_MODE, "off");
+ mUI.overrideSettings(CameraSettings.KEY_QC_VIDEO_CDS_MODE, "off");
+ Toast.makeText(mActivity, R.string.disable_CDS_during_SeeMore,
+ Toast.LENGTH_LONG).show();
+ }
+
+ /* Disable TNR */
+ if ("on".equals(seeMoreMode) && "on".equals(video_tnr)) {
+ mParameters.set(CameraSettings.KEY_QC_VIDEO_TNR_MODE, "off");
+ mUI.overrideSettings(CameraSettings.KEY_QC_VIDEO_TNR_MODE, "off");
+ Toast.makeText(mActivity, R.string.disable_TNR_during_SeeMore,
+ Toast.LENGTH_LONG).show();
+ }
+
+ /* Set SeeMore mode */
+ mParameters.set(CameraSettings.KEY_QC_SEE_MORE_MODE, seeMoreMode);
+ }
+
// Set Video HDR.
String videoHDR = mPreferences.getString(
CameraSettings.KEY_VIDEO_HDR,