diff options
author | Suman Mukherjee <sumam@codeaurora.org> | 2014-03-27 13:08:38 +0530 |
---|---|---|
committer | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2014-10-20 22:25:17 +0000 |
commit | d1a6002bb9cfc4fcf62c887e186d0c18ff1e816c (patch) | |
tree | db9b11723b6c933915d5a68eaec995764bcd1d29 | |
parent | 7c9c58454caf1b0b6ef2f00b7c12503f8b56b763 (diff) | |
download | android_packages_apps_Camera2-d1a6002bb9cfc4fcf62c887e186d0c18ff1e816c.tar.gz android_packages_apps_Camera2-d1a6002bb9cfc4fcf62c887e186d0c18ff1e816c.tar.bz2 android_packages_apps_Camera2-d1a6002bb9cfc4fcf62c887e186d0c18ff1e816c.zip |
Camera: Block DIS and Timelapse for HFR
DIS and Timelapse is not supported for HFR scenario.
If user'll start recording with timelapse or DIS with HFR
then crash observed from lower layer.
Fix Made: User'll be notified that HFR/HSR selection is not allowed
for TimeLapse and/ DIS mode. After that, HFR selection will be set to
off and the option will be disabled. It'll not be vice versa as
DIS/TimeLapse has higher priority than HFR for their existance in
primary popup rather than being in secondary.
[mikeioannina]: removed HSR code
Change-Id: I42ed3d3d20727ddda1b15c21b3ba85c8c41a82ef
CRs-Fixed: 627373, 627362
-rw-r--r-- | res/values/qcomstrings.xml | 3 | ||||
-rw-r--r-- | src/com/android/camera/VideoModule.java | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml index b61bd7530..aa83bb8ed 100644 --- a/res/values/qcomstrings.xml +++ b/res/values/qcomstrings.xml @@ -108,6 +108,9 @@ <string name="pref_camera_redeyereduction_title">Red eye reduction</string> <string name="pref_camera_redeyereduction_default" translatable="false">disable</string> + <!-- The message is shown in toast when the app encounters an unsupported selection for HFR/HSR mode --> + <string name="error_app_unsupported_hfr_selection">HFR is not supported when video stabilization or time lapse is on</string> + <!-- The message is shown in dialog when the app encounters an unsupported resolution for HFR mode --> <string name="error_app_unsupported_hfr">HFR is not supported for selected resolution</string> diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 9958ed81c..6fb6f35d6 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -2113,6 +2113,24 @@ public class VideoModule implements CameraModule, mParameters.setVideoHDRMode(videoHDR); } else mParameters.setVideoHDRMode("off"); + + //HFR recording not supported for DIS and/ TimeLapse option + String hfr = mParameters.getVideoHighFrameRate(); + if ((hfr != null) && (!hfr.equals("off"))) { + // Read time lapse recording interval. + String frameIntervalStr = mPreferences.getString( + CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL, + mActivity.getString(R.string.pref_video_time_lapse_frame_interval_default)); + int timeLapseInterval = Integer.parseInt(frameIntervalStr); + if ((timeLapseInterval != 0) || (disMode.equals("enable")) ) { + Log.v(TAG,"DIS/Time Lapse ON for HFR selection, turning HFR off"); + Toast.makeText(mActivity, R.string.error_app_unsupported_hfr_selection, + Toast.LENGTH_LONG).show(); + mParameters.setVideoHighFrameRate("off"); + mUI.overrideSettings(CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE,"disable"); + mUI.initializePopup(mPreferenceGroup); + } + } } @SuppressWarnings("deprecation") private void setCameraParameters() { |