diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-11-02 13:08:17 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-11-02 13:08:17 -0800 |
commit | e9334daf4ca0d08def4f5baae11bb7803beabe78 (patch) | |
tree | 3083c0a6580fb344b6eaffb227203b90afbc8782 /src/com/android/camera/VideoModule.java | |
parent | 6c20d314ec43be447e9a2bfb17e96452d996a18b (diff) | |
parent | 7c7446d8eff8191441405aad4506b2bb5d1f8e63 (diff) | |
download | android_packages_apps_Snap-e9334daf4ca0d08def4f5baae11bb7803beabe78.tar.gz android_packages_apps_Snap-e9334daf4ca0d08def4f5baae11bb7803beabe78.tar.bz2 android_packages_apps_Snap-e9334daf4ca0d08def4f5baae11bb7803beabe78.zip |
Merge "Camera2: Fix video duration is wrong issue"
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rwxr-xr-x | src/com/android/camera/VideoModule.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 651a3e3a6..c05577fed 100755 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -1464,7 +1464,11 @@ public class VideoModule implements CameraModule, private void saveVideo() { if (mVideoFileDescriptor == null) { - long duration = SystemClock.uptimeMillis() - mRecordingStartTime + mRecordingTotalTime; + long duration = 0L; + if (mMediaRecorderPausing == false) + duration = SystemClock.uptimeMillis() - mRecordingStartTime + mRecordingTotalTime; + else + duration = mRecordingTotalTime; if (duration > 0) { if (mCaptureTimeLapse) { duration = getTimeLapseVideoLength(duration); @@ -1791,6 +1795,7 @@ public class VideoModule implements CameraModule, UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA, fail ? UsageStatistics.ACTION_CAPTURE_FAIL : UsageStatistics.ACTION_CAPTURE_DONE, "Video", + mMediaRecorderPausing ? mRecordingTotalTime : SystemClock.uptimeMillis() - mRecordingStartTime + mRecordingTotalTime); mStopRecPending = false; return fail; |