summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/services/callrecorder/CallRecorderService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/services/callrecorder/CallRecorderService.java b/src/com/android/services/callrecorder/CallRecorderService.java
index 2df222dca..4d53ec790 100644
--- a/src/com/android/services/callrecorder/CallRecorderService.java
+++ b/src/com/android/services/callrecorder/CallRecorderService.java
@@ -51,7 +51,7 @@ public class CallRecorderService extends Service {
private static final String AUDIO_SOURCE_PROPERTY = "persist.call_recording.src";
- private SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMddHHmmssSSS");
+ private SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyMMdd_HHmmssSSS");
private int mDefaultEncoder;
@@ -68,7 +68,7 @@ public class CallRecorderService extends Service {
@Override
public boolean startRecording(String phoneNumber, long creationTime)
throws RemoteException {
- String fileName = generateFilename();
+ String fileName = generateFilename(phoneNumber);
mCurrentRecording = new CallRecording(phoneNumber, creationTime,
fileName, System.currentTimeMillis());
return startRecordingInternal(mCurrentRecording.getFile());
@@ -201,13 +201,13 @@ public class CallRecorderService extends Service {
return mState;
}
- private String generateFilename() {
+ private String generateFilename(String number) {
String timestamp = DATE_FORMAT.format(new Date());
int audioFormat = getAudioFormat();
if (audioFormat == MediaRecorder.OutputFormat.AMR_WB){
- return "callrecorder_" + timestamp + ".amr";
+ return number + "_" + timestamp + ".amr";
} else {
- return "callrecorder_" + timestamp + ".m4a ";
+ return number + "_" + timestamp + ".m4a ";
}
}