summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2015-06-23 14:54:20 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-07-23 19:52:11 -0700
commitbefbc11685ef65c65a4070698ba84b242bfe94f3 (patch)
tree04b7c618814d216a1874676cf56ea4526d550e93 /src
parent52226095665204d8e6d5e3ff6127af25b9512297 (diff)
downloadandroid_packages_apps_Snap-befbc11685ef65c65a4070698ba84b242bfe94f3.tar.gz
android_packages_apps_Snap-befbc11685ef65c65a4070698ba84b242bfe94f3.tar.bz2
android_packages_apps_Snap-befbc11685ef65c65a4070698ba84b242bfe94f3.zip
SnapdragonCamera: honor video duration limit in intent
The video duration limit read from intent is later overwritten by the value from preference. Change the order to honor the intent value. Change-Id: I833b1fbcecbbaeff48ff51144f5e584e91fb1838
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 867561509..9abf539fc 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -805,16 +805,6 @@ public class VideoModule implements CameraModule,
}
}
- // Set video duration limit. The limit is read from the preference,
- // unless it is specified in the intent.
- if (intent.hasExtra(MediaStore.EXTRA_DURATION_LIMIT)) {
- int seconds =
- intent.getIntExtra(MediaStore.EXTRA_DURATION_LIMIT, 0);
- mMaxVideoDurationInMs = 1000 * seconds;
- } else {
- mMaxVideoDurationInMs = CameraSettings.getMaxVideoDuration(mActivity);
- }
-
// Read time lapse recording interval.
String frameIntervalStr = mPreferences.getString(
CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL,
@@ -832,6 +822,14 @@ public class VideoModule implements CameraModule,
mProfile = CamcorderProfile.get(mCameraId, quality);
getDesiredPreviewSize();
qcomReadVideoPreferences();
+
+ // Set video duration limit. The limit is read from the preference,
+ // unless it is specified in the intent.
+ if (intent.hasExtra(MediaStore.EXTRA_DURATION_LIMIT)) {
+ int seconds =
+ intent.getIntExtra(MediaStore.EXTRA_DURATION_LIMIT, 0);
+ mMaxVideoDurationInMs = 1000 * seconds;
+ }
mPreferenceRead = true;
}