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

Commit db41880d authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android (Google) Code Review
Browse files

Merge "Fix exception in AudioService when no BT Headset is connected." into lmp-mr1-dev

parents ba9836d9 570cc530
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -2574,6 +2574,7 @@ public class AudioService extends IAudioService.Stub {
                            if (mScoAudioState == SCO_STATE_INACTIVE) {
                                mScoAudioMode = scoAudioMode;
                                if (scoAudioMode == SCO_MODE_UNDEFINED) {
                                    if (mBluetoothHeadsetDevice != null) {
                                        mScoAudioMode = new Integer(Settings.Global.getInt(
                                                                mContentResolver,
                                                                "bluetooth_sco_channel_"+
@@ -2582,6 +2583,9 @@ public class AudioService extends IAudioService.Stub {
                                        if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
                                            mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
                                        }
                                    } else {
                                        mScoAudioMode = SCO_MODE_RAW;
                                    }
                                }
                                if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
                                    boolean status = false;