diff options
author | pezhan <pezhan@codeaurora.org> | 2017-01-16 10:12:35 +0800 |
---|---|---|
committer | pezhan <pezhan@codeaurora.org> | 2017-01-16 10:12:35 +0800 |
commit | 0c38495f9f0aae023de5bdfb0ada2f846000278f (patch) | |
tree | 683e388e8d1172c67852a7911382a7bf228327fe /src/com/android/camera/VideoModule.java | |
parent | 3c8acd4f9e99615e9c05c21d96cb995770cec6a5 (diff) | |
download | android_packages_apps_Snap-0c38495f9f0aae023de5bdfb0ada2f846000278f.tar.gz android_packages_apps_Snap-0c38495f9f0aae023de5bdfb0ada2f846000278f.tar.bz2 android_packages_apps_Snap-0c38495f9f0aae023de5bdfb0ada2f846000278f.zip |
SnapdragonCamera:Fix no recording thumbnail when capture during recording.
The default video file name is generated by the start recording timestamp.
Need to use the recording stop timestamp to generate the video file name
to rename previous.Then camera will update the media provider when stop
recording in order to display the new thumbnail in time.
Change-Id: I0d3fd2a66b1a22d3b41c81cf84cca28e77867510
CRs-Fixed: 1104963
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 e651843be..d5351e297 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -1728,6 +1728,12 @@ public class VideoModule implements CameraModule, private void saveVideo() { if (mVideoFileDescriptor == null) { + //use the recording stop timestamp to generate the video's file name. + String videoSourcePath = mVideoFilename; + generateVideoFilename(mProfile.fileFormat); + mCurrentVideoFilename = mVideoFilename; + File sourceFile = new File(videoSourcePath); + sourceFile.renameTo(new File(mCurrentVideoFilename)); File origFile = new File(mCurrentVideoFilename); if (!origFile.exists() || origFile.length() <= 0) { Log.e(TAG, "Invalid file"); |