From 97824acb66feec4b1de9c3c678a89ec3ef6ee36c Mon Sep 17 00:00:00 2001 From: nadlabak Date: Sat, 29 Dec 2012 22:33:02 +0100 Subject: [PATCH] call recording: fix filename for numbers containing asterisk Change-Id: Iddbc7d24ce9c9baf8a0ee50181f300483b0b2efc --- src/com/android/phone/PhoneUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java index 53dde6b37..319c55582 100644 --- a/src/com/android/phone/PhoneUtils.java +++ b/src/com/android/phone/PhoneUtils.java @@ -2132,7 +2132,8 @@ static void startRecording(String address, String inOut) { // name recording filename based on call data Calendar cl = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd-HHmmss-("); - String newRecordingName = dirName + "/" + sdf.format(cl.getTime()) + address + ")-" + inOut + ".m4a"; + String newRecordingName = dirName + "/" + sdf.format(cl.getTime()) + + address.replace("*","x") + ")-" + inOut + ".m4a"; recording.renameTo(new File(newRecordingName)); recorder.setOutputFile(newRecordingName); try {