Loading framework/java/android/bluetooth/BluetoothHeadset.java +22 −0 Original line number Diff line number Diff line Loading @@ -766,6 +766,28 @@ public final class BluetoothHeadset implements BluetoothProfile { return false; } /** * Force SCO audio to be opened regardless any other restrictions * * @param forced Whether or not SCO audio connection should be forced: * True to force SCO audio * False to use SCO audio in normal manner * @hide */ public void setForceScoAudio(boolean forced) { if (VDBG) log("setForceScoAudio " + String.valueOf(forced)); if (mService != null && isEnabled()) { try { mService.setForceScoAudio(forced); } catch (RemoteException e) { Log.e(TAG, e.toString()); } } else { Log.w(TAG, "Proxy not attached to service"); if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable())); } } /** * Check if Bluetooth SCO audio is connected. * Loading framework/java/android/bluetooth/IBluetoothHeadset.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ interface IBluetoothHeadset { boolean disconnectAudio(); void setAudioRouteAllowed(boolean allowed); boolean getAudioRouteAllowed(); void setForceScoAudio(boolean forced); boolean startScoUsingVirtualVoiceCall(in BluetoothDevice device); boolean stopScoUsingVirtualVoiceCall(in BluetoothDevice device); void phoneStateChanged(int numActive, int numHeld, int callState, String number, int type); Loading Loading
framework/java/android/bluetooth/BluetoothHeadset.java +22 −0 Original line number Diff line number Diff line Loading @@ -766,6 +766,28 @@ public final class BluetoothHeadset implements BluetoothProfile { return false; } /** * Force SCO audio to be opened regardless any other restrictions * * @param forced Whether or not SCO audio connection should be forced: * True to force SCO audio * False to use SCO audio in normal manner * @hide */ public void setForceScoAudio(boolean forced) { if (VDBG) log("setForceScoAudio " + String.valueOf(forced)); if (mService != null && isEnabled()) { try { mService.setForceScoAudio(forced); } catch (RemoteException e) { Log.e(TAG, e.toString()); } } else { Log.w(TAG, "Proxy not attached to service"); if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable())); } } /** * Check if Bluetooth SCO audio is connected. * Loading
framework/java/android/bluetooth/IBluetoothHeadset.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ interface IBluetoothHeadset { boolean disconnectAudio(); void setAudioRouteAllowed(boolean allowed); boolean getAudioRouteAllowed(); void setForceScoAudio(boolean forced); boolean startScoUsingVirtualVoiceCall(in BluetoothDevice device); boolean stopScoUsingVirtualVoiceCall(in BluetoothDevice device); void phoneStateChanged(int numActive, int numHeld, int callState, String number, int type); Loading