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

Commit 22beb512 authored by Nicholas Sauer's avatar Nicholas Sauer Committed by Android Git Automerger
Browse files

am b83abf76: am 5323940b: Merge "[FM] There is no sound output after resuming...

am b83abf76: am 5323940b: Merge "[FM] There is no sound output after resuming playing when FM is over BT" into lmp-mr1-dev

* commit 'b83abf76':
  [FM] There is no sound output after resuming playing when FM is over BT
parents 866a761d b83abf76
Loading
Loading
Loading
Loading
+10 −13
Original line number Diff line number Diff line
@@ -385,11 +385,9 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan

    private synchronized void startRender() {
        Log.d(TAG, "startRender " + AudioSystem.getForceUse(FOR_PROPRIETARY));
        // Stop old AudioRecord and create a new AudioRecord
        // when plugging out and then plugging in wired headset.
        // Otherwise, reading data from old AudioRecord will be blocked.
        if (AudioSystem.getForceUse(FOR_PROPRIETARY) ==
                AudioSystem.FORCE_SPEAKER && mIsSpeakerUsed) {

       // need to create new audio record and audio play back track,
       // because input/output device may be changed.
       if (mAudioRecord != null) {
           mAudioRecord.stop();
       }
@@ -397,7 +395,6 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan
           mAudioTrack.stop();
       }
       initAudioRecordSink();
        }

        mIsRender = true;
        synchronized (mRenderLock) {