summaryrefslogtreecommitdiffstats
path: root/FMRecord
diff options
context:
space:
mode:
authorAyaz Ahmad <aahmad@codeaurora.org>2013-12-17 13:11:39 +0530
committerAyaz Ahmad <aahmad@codeaurora.org>2013-12-26 09:48:18 +0530
commit19246817eaff7a7606502f102e385109e38305f6 (patch)
tree3ae43aa2bfa8257992076a1a729d5496dda54912 /FMRecord
parent01a783c4f3e39ae855bc68d43af86595ac72ab1c (diff)
downloadandroid_hardware_qcom_fm-19246817eaff7a7606502f102e385109e38305f6.tar.gz
android_hardware_qcom_fm-19246817eaff7a7606502f102e385109e38305f6.tar.bz2
android_hardware_qcom_fm-19246817eaff7a7606502f102e385109e38305f6.zip
fmrecord: Use proper media type
FM recorded files does not show up when searched by artist/album/song. Use correct audio file type to save recorded file in media database. Change-Id: I19717de6a0bab45d3392d01bfc738327ca12798b CRs-Fixed: 543865
Diffstat (limited to 'FMRecord')
-rw-r--r--FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java b/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
index 4ca4645..fc0fc21 100644
--- a/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
+++ b/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
@@ -93,6 +93,7 @@ public class FMRecordingService extends Service {
private int clientPid = -1;
private String clientProcessName = "";
private BroadcastReceiver mSdcardUnmountReceiver = null;
+ private String mAudioType = "audio/*";
public void onCreate() {
@@ -271,6 +272,7 @@ public class FMRecordingService extends Service {
mRecorder.setAudioSource(MediaRecorder.AudioSource.FM_RX);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
+ mAudioType = "audio/3gpp";
} catch (RuntimeException exception) {
Log.d(TAG, "RuntimeException while settings");
mRecorder.reset();
@@ -404,7 +406,7 @@ public class FMRecordingService extends Service {
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.MIME_TYPE, "AUDIO_AAC_MP4");
+ cv.put(MediaStore.Audio.Media.MIME_TYPE, mAudioType);
cv.put(MediaStore.Audio.Media.ARTIST,
res.getString(R.string.audio_db_artist_name));
cv.put(MediaStore.Audio.Media.ALBUM,