Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1917535a authored by Benson Huang's avatar Benson Huang Committed by Nicholas Sauer
Browse files

[FM] FM recording name which contains "%" can not be played in FM

Select "Start Recording" in options menu -> Stop
recording and "Save recording" pops up -> Rename
the recording file to contain "%" -> Save recording
and tap "LISTEN", Saved recording file can not be played
and "Couldn't play the track you requested." displays.

The fix is to encode the record name.

from: https://partner-android-review.googlesource.com/#/c/192398/1



Bug 18849397

Change-Id: I2b58dad093865845fd598483e96775a192946c4c
Signed-off-by: default avatarBenson Huang <benson.huang@mediatek.com>
parent f6b37817
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ public class FmRecordActivity extends Activity implements
        if (recordName != null) {
            intent.setData(Uri.parse("file://" + FmService.getRecordingSdcard()
                    + File.separator + FmRecorder.FM_RECORD_FOLDER + File.separator
                    + recordName + FmRecorder.RECORDING_FILE_EXTENSION));
                    + Uri.encode(recordName) + FmRecorder.RECORDING_FILE_EXTENSION));
        }
        setResult(RESULT_OK, intent);
    }