diff options
author | Suman Mukherjee <sumam@codeaurora.org> | 2014-03-27 13:08:38 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-03-27 02:41:44 -0700 |
commit | 1874e960c141d16bebd65174baf11923b0ab053d (patch) | |
tree | 2cbe63dc7815b50fb40a9332020e39a9e2efe2d9 /src/com/android/camera/VideoModule.java | |
parent | 8bb2b9499756af5348e538b7cc70c1e346e94cc6 (diff) | |
download | android_packages_apps_Snap-1874e960c141d16bebd65174baf11923b0ab053d.tar.gz android_packages_apps_Snap-1874e960c141d16bebd65174baf11923b0ab053d.tar.bz2 android_packages_apps_Snap-1874e960c141d16bebd65174baf11923b0ab053d.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.
Change-Id: I42ed3d3d20727ddda1b15c21b3ba85c8c41a82ef
CRs-Fixed: 627373, 627362
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rw-r--r-- | src/com/android/camera/VideoModule.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 1d0c8adc5..2c859dbc9 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -1997,6 +1997,27 @@ public class VideoModule implements CameraModule, mParameters.setVideoHDRMode(videoHDR); } else mParameters.setVideoHDRMode("off"); + + //HFR/HSR recording not supported for DIS and/ TimeLapse option + String hfr = mParameters.getVideoHighFrameRate(); + String hsr = mParameters.get("video-hsr"); + if ( ((hfr != null) && (!hfr.equals("off"))) || + ((hsr != null) && (!hsr.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/HSR selection, turning HFR/HSR off"); + Toast.makeText(mActivity, R.string.error_app_unsupported_hfr_selection, + Toast.LENGTH_LONG).show(); + mParameters.setVideoHighFrameRate("off"); + mParameters.set("video-hsr", "off"); + mUI.overrideSettings(CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE,"disable"); + mUI.initializePopup(mPreferenceGroup); + } + } } @SuppressWarnings("deprecation") private void setCameraParameters() { |