summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2011-01-20 14:49:53 -0800
committerJaikumar Ganesh <jaikumar@google.com>2011-01-21 15:17:23 -0800
commit75c2701454f4506664d9056988c8ce5fd0ca73ba (patch)
treee09779ec63a360bb686546523e5b34ef11dfbdfd /core/java/android
parent7457b36b92490daa6cd7e346919fad74a4b92eb9 (diff)
downloadframeworks_base-75c2701454f4506664d9056988c8ce5fd0ca73ba.zip
frameworks_base-75c2701454f4506664d9056988c8ce5fd0ca73ba.tar.gz
frameworks_base-75c2701454f4506664d9056988c8ce5fd0ca73ba.tar.bz2
Temporary Changes for certification of SCO.
Bug: 3349475 Change-Id: I555b127a1d9218494cd05c07c9e9f29628f3bc74
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/bluetooth/BluetoothHeadset.java20
-rw-r--r--core/java/android/bluetooth/IBluetoothHeadset.aidl2
2 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index d5b0042..2959fc0 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 e952193..3c6cf77 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);
}