Loading media/java/android/media/AudioService.java +3 −19 Original line number Original line Diff line number Diff line Loading @@ -2233,12 +2233,8 @@ public class AudioService extends IAudioService.Stub { } } if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { boolean status; boolean status; if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.connectAudio(); } else { status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } if (status) { if (status) { mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; } else { } else { Loading @@ -2262,12 +2258,8 @@ public class AudioService extends IAudioService.Stub { if (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL) { if (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL) { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { boolean status; boolean status; if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.disconnectAudio(); } else { status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } if (!status) { if (!status) { mScoAudioState = SCO_STATE_INACTIVE; mScoAudioState = SCO_STATE_INACTIVE; broadcastScoConnectionState( broadcastScoConnectionState( Loading Loading @@ -2443,20 +2435,12 @@ public class AudioService extends IAudioService.Stub { switch (mScoAudioState) { switch (mScoAudioState) { case SCO_STATE_ACTIVATE_REQ: case SCO_STATE_ACTIVATE_REQ: mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.connectAudio(); } else { status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } break; break; case SCO_STATE_DEACTIVATE_REQ: case SCO_STATE_DEACTIVATE_REQ: if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.disconnectAudio(); } else { status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } break; break; case SCO_STATE_DEACTIVATE_EXT_REQ: case SCO_STATE_DEACTIVATE_EXT_REQ: status = mBluetoothHeadset.stopVoiceRecognition( status = mBluetoothHeadset.stopVoiceRecognition( Loading Loading
media/java/android/media/AudioService.java +3 −19 Original line number Original line Diff line number Diff line Loading @@ -2233,12 +2233,8 @@ public class AudioService extends IAudioService.Stub { } } if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { boolean status; boolean status; if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.connectAudio(); } else { status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } if (status) { if (status) { mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; } else { } else { Loading @@ -2262,12 +2258,8 @@ public class AudioService extends IAudioService.Stub { if (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL) { if (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL) { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) { boolean status; boolean status; if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.disconnectAudio(); } else { status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } if (!status) { if (!status) { mScoAudioState = SCO_STATE_INACTIVE; mScoAudioState = SCO_STATE_INACTIVE; broadcastScoConnectionState( broadcastScoConnectionState( Loading Loading @@ -2443,20 +2435,12 @@ public class AudioService extends IAudioService.Stub { switch (mScoAudioState) { switch (mScoAudioState) { case SCO_STATE_ACTIVATE_REQ: case SCO_STATE_ACTIVATE_REQ: mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.connectAudio(); } else { status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( status = mBluetoothHeadset.startScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } break; break; case SCO_STATE_DEACTIVATE_REQ: case SCO_STATE_DEACTIVATE_REQ: if (mScoAudioMode == SCO_MODE_RAW) { status = mBluetoothHeadset.disconnectAudio(); } else { status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); mBluetoothHeadsetDevice); } break; break; case SCO_STATE_DEACTIVATE_EXT_REQ: case SCO_STATE_DEACTIVATE_EXT_REQ: status = mBluetoothHeadset.stopVoiceRecognition( status = mBluetoothHeadset.stopVoiceRecognition( Loading