am db41880d: Merge "Fix exception in AudioService when no BT Headset is connected." into lmp-mr1-dev
* commit 'db41880dd3259646b9ea43be6d8a91d4adb40122': Fix exception in AudioService when no BT Headset is connected.
This commit is contained in:
@@ -2574,6 +2574,7 @@ public class AudioService extends IAudioService.Stub {
|
|||||||
if (mScoAudioState == SCO_STATE_INACTIVE) {
|
if (mScoAudioState == SCO_STATE_INACTIVE) {
|
||||||
mScoAudioMode = scoAudioMode;
|
mScoAudioMode = scoAudioMode;
|
||||||
if (scoAudioMode == SCO_MODE_UNDEFINED) {
|
if (scoAudioMode == SCO_MODE_UNDEFINED) {
|
||||||
|
if (mBluetoothHeadsetDevice != null) {
|
||||||
mScoAudioMode = new Integer(Settings.Global.getInt(
|
mScoAudioMode = new Integer(Settings.Global.getInt(
|
||||||
mContentResolver,
|
mContentResolver,
|
||||||
"bluetooth_sco_channel_"+
|
"bluetooth_sco_channel_"+
|
||||||
@@ -2582,6 +2583,9 @@ public class AudioService extends IAudioService.Stub {
|
|||||||
if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
|
if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
|
||||||
mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
|
mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
mScoAudioMode = SCO_MODE_RAW;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
|
if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
|
||||||
boolean status = false;
|
boolean status = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user