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

Commit 8bf069be authored by AlexandrKozlovskiy's avatar AlexandrKozlovskiy Committed by Nolen Johnson
Browse files

FmService: Fix a crash when the record permission is requested

Recreation Steps:
1. Install and open the FM Radio app.
2. You will get a dialog, which allows the record permission for FM Radio app.
3. After granting this permission the app will crash.

Change-Id: I4ceb82a157c3560a712f82921cd2ea45eb9e798a
parent e1affed7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -410,7 +410,9 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan
       // need to create new audio record and audio play back track,
       // because input/output device may be changed.
       if (mAudioRecord != null) {
           if (mAudioRecord.getRecordingState() == AudioRecord.RECORDSTATE_RECORDING) {
               mAudioRecord.stop();
           }
           mAudioRecord.release();
           mAudioRecord = null;
       }