Loading core/java/android/bluetooth/BluetoothHeadset.java +13 −9 Original line number Diff line number Diff line Loading @@ -626,18 +626,21 @@ public final class BluetoothHeadset implements BluetoothProfile { } /** * Initiates a Virtual Voice Call to the handsfree device (if connected). * Allows the handsfree device to be used for routing non-cellular call audio * Initiates a SCO channel connection with the headset (if connected). * Also initiates a virtual voice call for Handsfree devices as many devices * do not accept SCO audio without a call. * This API allows the handsfree device to be used for routing non-cellular * call audio. * * @param device Remote Bluetooth Device * @return true if successful, false if there was some error. * @hide */ public boolean startVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("startVirtualVoiceCall()"); public boolean startScoUsingVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("startScoUsingVirtualVoiceCall()"); if (mService != null && isEnabled() && isValidDevice(device)) { try { return mService.startVirtualVoiceCall(device); return mService.startScoUsingVirtualVoiceCall(device); } catch (RemoteException e) { Log.e(TAG, e.toString()); } Loading @@ -649,17 +652,18 @@ public final class BluetoothHeadset implements BluetoothProfile { } /** * Terminates an ongoing Virtual Voice Call to the handsfree device (if connected). * Terminates an ongoing SCO connection and the associated virtual * call. * * @param device Remote Bluetooth Device * @return true if successful, false if there was some error. * @hide */ public boolean stopVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("stopVirtualVoiceCall()"); public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("stopScoUsingVirtualVoiceCall()"); if (mService != null && isEnabled() && isValidDevice(device)) { try { return mService.stopVirtualVoiceCall(device); return mService.stopScoUsingVirtualVoiceCall(device); } catch (RemoteException e) { Log.e(TAG, e.toString()); } Loading core/java/android/bluetooth/IBluetoothHeadset.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,8 @@ interface IBluetoothHeadset { boolean setAudioState(in BluetoothDevice device, int state); int getAudioState(in BluetoothDevice device); boolean startVirtualVoiceCall(in BluetoothDevice device); boolean stopVirtualVoiceCall(in BluetoothDevice device); boolean startScoUsingVirtualVoiceCall(in BluetoothDevice device); boolean stopScoUsingVirtualVoiceCall(in BluetoothDevice device); void sendAtCommand(in BluetoothDevice device, String urc); } media/java/android/media/AudioService.java +5 −4 Original line number Diff line number Diff line Loading @@ -721,7 +721,7 @@ public class AudioService extends IAudioService.Stub { if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL) { mBluetoothHeadset.stopVoiceRecognition( mBluetoothHeadsetDevice); mBluetoothHeadset.stopVirtualVoiceCall( mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); } else { clearAllScoClients(mCb, true); Loading Loading @@ -808,7 +808,8 @@ public class AudioService extends IAudioService.Stub { checkScoAudioState(); if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL) { mBluetoothHeadset.stopVoiceRecognition(mBluetoothHeadsetDevice); mBluetoothHeadset.stopVirtualVoiceCall(mBluetoothHeadsetDevice); mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); } else { clearAllScoClients(cb, true); } Loading Loading @@ -1296,10 +1297,10 @@ public class AudioService extends IAudioService.Stub { state == BluetoothHeadset.STATE_AUDIO_CONNECTED && mScoAudioState == SCO_STATE_INACTIVE) { mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; mBluetoothHeadset.startVirtualVoiceCall(mBluetoothHeadsetDevice); mBluetoothHeadset.startScoUsingVirtualVoiceCall(mBluetoothHeadsetDevice); } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED && mScoAudioState == SCO_STATE_ACTIVE_INTERNAL){ mBluetoothHeadset.stopVirtualVoiceCall(mBluetoothHeadsetDevice); mBluetoothHeadset.stopScoUsingVirtualVoiceCall(mBluetoothHeadsetDevice); } } } Loading Loading
core/java/android/bluetooth/BluetoothHeadset.java +13 −9 Original line number Diff line number Diff line Loading @@ -626,18 +626,21 @@ public final class BluetoothHeadset implements BluetoothProfile { } /** * Initiates a Virtual Voice Call to the handsfree device (if connected). * Allows the handsfree device to be used for routing non-cellular call audio * Initiates a SCO channel connection with the headset (if connected). * Also initiates a virtual voice call for Handsfree devices as many devices * do not accept SCO audio without a call. * This API allows the handsfree device to be used for routing non-cellular * call audio. * * @param device Remote Bluetooth Device * @return true if successful, false if there was some error. * @hide */ public boolean startVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("startVirtualVoiceCall()"); public boolean startScoUsingVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("startScoUsingVirtualVoiceCall()"); if (mService != null && isEnabled() && isValidDevice(device)) { try { return mService.startVirtualVoiceCall(device); return mService.startScoUsingVirtualVoiceCall(device); } catch (RemoteException e) { Log.e(TAG, e.toString()); } Loading @@ -649,17 +652,18 @@ public final class BluetoothHeadset implements BluetoothProfile { } /** * Terminates an ongoing Virtual Voice Call to the handsfree device (if connected). * Terminates an ongoing SCO connection and the associated virtual * call. * * @param device Remote Bluetooth Device * @return true if successful, false if there was some error. * @hide */ public boolean stopVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("stopVirtualVoiceCall()"); public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice device) { if (DBG) log("stopScoUsingVirtualVoiceCall()"); if (mService != null && isEnabled() && isValidDevice(device)) { try { return mService.stopVirtualVoiceCall(device); return mService.stopScoUsingVirtualVoiceCall(device); } catch (RemoteException e) { Log.e(TAG, e.toString()); } Loading
core/java/android/bluetooth/IBluetoothHeadset.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -48,8 +48,8 @@ interface IBluetoothHeadset { boolean setAudioState(in BluetoothDevice device, int state); int getAudioState(in BluetoothDevice device); boolean startVirtualVoiceCall(in BluetoothDevice device); boolean stopVirtualVoiceCall(in BluetoothDevice device); boolean startScoUsingVirtualVoiceCall(in BluetoothDevice device); boolean stopScoUsingVirtualVoiceCall(in BluetoothDevice device); void sendAtCommand(in BluetoothDevice device, String urc); }
media/java/android/media/AudioService.java +5 −4 Original line number Diff line number Diff line Loading @@ -721,7 +721,7 @@ public class AudioService extends IAudioService.Stub { if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL) { mBluetoothHeadset.stopVoiceRecognition( mBluetoothHeadsetDevice); mBluetoothHeadset.stopVirtualVoiceCall( mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); } else { clearAllScoClients(mCb, true); Loading Loading @@ -808,7 +808,8 @@ public class AudioService extends IAudioService.Stub { checkScoAudioState(); if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL) { mBluetoothHeadset.stopVoiceRecognition(mBluetoothHeadsetDevice); mBluetoothHeadset.stopVirtualVoiceCall(mBluetoothHeadsetDevice); mBluetoothHeadset.stopScoUsingVirtualVoiceCall( mBluetoothHeadsetDevice); } else { clearAllScoClients(cb, true); } Loading Loading @@ -1296,10 +1297,10 @@ public class AudioService extends IAudioService.Stub { state == BluetoothHeadset.STATE_AUDIO_CONNECTED && mScoAudioState == SCO_STATE_INACTIVE) { mScoAudioState = SCO_STATE_ACTIVE_INTERNAL; mBluetoothHeadset.startVirtualVoiceCall(mBluetoothHeadsetDevice); mBluetoothHeadset.startScoUsingVirtualVoiceCall(mBluetoothHeadsetDevice); } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED && mScoAudioState == SCO_STATE_ACTIVE_INTERNAL){ mBluetoothHeadset.stopVirtualVoiceCall(mBluetoothHeadsetDevice); mBluetoothHeadset.stopScoUsingVirtualVoiceCall(mBluetoothHeadsetDevice); } } } Loading