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

Commit 1e595bc2 authored by Pankaj Kanwar's avatar Pankaj Kanwar Committed by Android Git Automerger
Browse files

am 52762ce8: am f99986ee: am 65bfe1ca: Merge "AudioService: cleanup sco audio...

am 52762ce8: am f99986ee: am 65bfe1ca: Merge "AudioService: cleanup sco audio mode upon disconnection." into mnc-dr-dev

* commit '52762ce8':
  AudioService: cleanup sco audio mode upon disconnection.
parents 252044e5 52762ce8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2531,7 +2531,10 @@ public class AudioService extends IAudioService.Stub {
        if (!checkAudioSettingsPermission("setBluetoothScoOn()")) {
            return;
        }
        setBluetoothScoOnInt(on);
    }

    public void setBluetoothScoOnInt(boolean on) {
        if (on) {
            mForcedUseForComm = AudioSystem.FORCE_BT_SCO;
        } else if (mForcedUseForComm == AudioSystem.FORCE_BT_SCO) {
@@ -2892,6 +2895,8 @@ public class AudioService extends IAudioService.Stub {
            mScoAudioState = SCO_STATE_INACTIVE;
            broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
        }
        AudioSystem.setParameters("A2dpSuspended=false");
        setBluetoothScoOnInt(false);
    }

    private void broadcastScoConnectionState(int state) {