summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2011-04-27 13:40:04 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-27 13:40:04 -0700
commit27a66070449c91de9177fe6a9ac48381608c517d (patch)
tree6efafcea5db6f5954ba6b9fc93090de48c757d1c /src
parent2ad509b0c2783f1d8d5c3a34c39b028adaf643dc (diff)
parentcb5f20f31da35ad29afc2269f08b14d2d38dd64b (diff)
downloadSoundRecorder-27a66070449c91de9177fe6a9ac48381608c517d.tar.gz
am cb5f20f3: am 7bdedbec: Merge "Added missing duration field to database record insertion."
* commit 'cb5f20f31da35ad29afc2269f08b14d2d38dd64b': Added missing duration field to database record insertion.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/soundrecorder/SoundRecorder.java2
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));