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

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

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

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

* commit '5323940b':
  [FM] There is no sound output after resuming playing when FM is over BT
parents 7a5879cb 5323940b
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) {