diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2015-10-18 16:41:36 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-18 16:41:36 -0700 |
commit | c91d9131112704ed4c3069d56ac517f62e170ef7 (patch) | |
tree | a77f10e3459b2fd7363027196d5afc4ef4bd0e95 /src/com/android/camera/VideoModule.java | |
parent | 9cff63324624898ae377cdf681bb02d0e54c8310 (diff) | |
parent | f211beed5b921a1f0053fa256f073c4b26be9d74 (diff) | |
download | android_packages_apps_Snap-c91d9131112704ed4c3069d56ac517f62e170ef7.tar.gz android_packages_apps_Snap-c91d9131112704ed4c3069d56ac517f62e170ef7.tar.bz2 android_packages_apps_Snap-c91d9131112704ed4c3069d56ac517f62e170ef7.zip |
Merge "SnapdragonCamera: limit video file size on SD card"
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rw-r--r-- | src/com/android/camera/VideoModule.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 3f6454ed8..9651d8e67 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -97,6 +97,8 @@ public class VideoModule implements CameraModule, private static final int SCREEN_DELAY = 2 * 60 * 1000; + private static final int SDCARD_SIZE_LIMIT = 4000 * 1024 * 1024; + private static final long SHUTTER_BUTTON_TIMEOUT = 0L; // 0ms /** @@ -1413,6 +1415,10 @@ public class VideoModule implements CameraModule, maxFileSize = requestedSizeLimit; } + if (Storage.isSaveSDCard() && maxFileSize > SDCARD_SIZE_LIMIT) { + maxFileSize = SDCARD_SIZE_LIMIT; + } + try { mMediaRecorder.setMaxFileSize(maxFileSize); } catch (RuntimeException exception) { |