Commit bf0955ad authored by Conley Owens's avatar Conley Owens Committed by Android Git Automerger
Browse files

am 27a66070: am cb5f20f3: am 7bdedbec: Merge "Added missing duration field to...

am 27a66070: am cb5f20f3: am 7bdedbec: Merge "Added missing duration field to database record insertion."

* commit '27a66070':
  Added missing duration field to database record insertion.
parents b663127a 27a66070
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment