diff options
| author | 2011-01-21 15:43:42 -0800 | |
|---|---|---|
| committer | 2011-01-21 15:43:42 -0800 | |
| commit | c4cc3ea48add3b7a63a1a97fc3a4c89b24217604 (patch) | |
| tree | 55711cfeb7e0d7424af65f934279cfe4d8c9da08 | |
| parent | 75a0e44831d08d9cbfec9f150be4e78b2d1aabf5 (diff) | |
| parent | 75c2701454f4506664d9056988c8ce5fd0ca73ba (diff) | |
Merge "Temporary Changes for certification of SCO." into honeycomb
| -rw-r--r-- | core/java/android/bluetooth/BluetoothHeadset.java | 20 | ||||
| -rw-r--r-- | core/java/android/bluetooth/IBluetoothHeadset.aidl | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index d5b004201001..2959fc02d57c 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -670,6 +670,26 @@ public final class BluetoothHeadset implements BluetoothProfile { return false; } + /** + * Send a AT command message to the headset. + * @param device Remote Bluetooth Device + * @param cmd The String to send. + * @hide + */ + public void sendAtCommand(BluetoothDevice device, String command) { + if (DBG) log("sendAtCommand()"); + if (mService != null && isEnabled() && isValidDevice(device)) { + try { + mService.sendAtCommand(device, command); + } 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())); + } + } + private ServiceConnection mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { if (DBG) Log.d(TAG, "Proxy object connected"); diff --git a/core/java/android/bluetooth/IBluetoothHeadset.aidl b/core/java/android/bluetooth/IBluetoothHeadset.aidl index e9521939ef85..3c6cf7711333 100644 --- a/core/java/android/bluetooth/IBluetoothHeadset.aidl +++ b/core/java/android/bluetooth/IBluetoothHeadset.aidl @@ -50,4 +50,6 @@ interface IBluetoothHeadset { boolean startVirtualVoiceCall(in BluetoothDevice device); boolean stopVirtualVoiceCall(in BluetoothDevice device); + + void sendAtCommand(in BluetoothDevice device, String urc); } |