diff options
Diffstat (limited to 'src/com/android/soundrecorder/SoundRecorder.java')
-rw-r--r-- | src/com/android/soundrecorder/SoundRecorder.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/soundrecorder/SoundRecorder.java b/src/com/android/soundrecorder/SoundRecorder.java index 76712b8..14a896d 100644 --- a/src/com/android/soundrecorder/SoundRecorder.java +++ b/src/com/android/soundrecorder/SoundRecorder.java @@ -602,6 +602,7 @@ public class SoundRecorder extends Activity SimpleDateFormat formatter = new SimpleDateFormat( res.getString(R.string.audio_db_title_format)); String title = formatter.format(date); + long sampleLengthMillis = mRecorder.sampleLength() * 1000L; // Lets label the recorded audio file as NON-MUSIC so that the file // won't be displayed automatically, except for in the playlist. @@ -611,6 +612,7 @@ public class SoundRecorder extends Activity cv.put(MediaStore.Audio.Media.DATA, file.getAbsolutePath()); cv.put(MediaStore.Audio.Media.DATE_ADDED, (int) (current / 1000)); cv.put(MediaStore.Audio.Media.DATE_MODIFIED, (int) (modDate / 1000)); + cv.put(MediaStore.Audio.Media.DURATION, sampleLengthMillis); cv.put(MediaStore.Audio.Media.MIME_TYPE, mRequestedType); cv.put(MediaStore.Audio.Media.ARTIST, res.getString(R.string.audio_db_artist_name)); |