diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2010-06-07 14:09:49 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-06-07 14:09:49 -0700 |
commit | a8c2514eddd39eb1d486d7bfa616178c45f2adea (patch) | |
tree | c7d737b379983a930a20af150bc5a2247191636f /core | |
parent | e50ab5f94c61d6884d7544c982f471661c2fbe32 (diff) | |
parent | 740e39be6af3e366a4b82c030b5ea67ab144b42a (diff) | |
download | frameworks_base-a8c2514eddd39eb1d486d7bfa616178c45f2adea.zip frameworks_base-a8c2514eddd39eb1d486d7bfa616178c45f2adea.tar.gz frameworks_base-a8c2514eddd39eb1d486d7bfa616178c45f2adea.tar.bz2 |
Merge "Pass BluetoothDevice to the Bluetooth Headset calls." into kraken
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/bluetooth/BluetoothHeadset.java | 8 | ||||
-rw-r--r-- | core/java/android/bluetooth/IBluetoothHeadset.aidl | 4 | ||||
-rw-r--r-- | core/java/android/server/BluetoothService.java | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index 9d633fe..4a91a8c 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -189,11 +189,11 @@ public final class BluetoothHeadset { * @return One of the STATE_ return codes, or STATE_ERROR if this proxy * object is currently not connected to the Headset service. */ - public int getState() { + public int getState(BluetoothDevice device) { if (DBG) log("getState()"); if (mService != null) { try { - return mService.getState(); + return mService.getState(device); } catch (RemoteException e) {Log.e(TAG, e.toString());} } else { Log.w(TAG, "Proxy not attached to service"); @@ -271,11 +271,11 @@ public final class BluetoothHeadset { * be made asynchornous. Returns false if this proxy object is * not currently connected to the Headset service. */ - public boolean disconnectHeadset() { + public boolean disconnectHeadset(BluetoothDevice device) { if (DBG) log("disconnectHeadset()"); if (mService != null) { try { - mService.disconnectHeadset(); + mService.disconnectHeadset(device); return true; } catch (RemoteException e) {Log.e(TAG, e.toString());} } else { diff --git a/core/java/android/bluetooth/IBluetoothHeadset.aidl b/core/java/android/bluetooth/IBluetoothHeadset.aidl index 57a9c06..d96f0ca 100644 --- a/core/java/android/bluetooth/IBluetoothHeadset.aidl +++ b/core/java/android/bluetooth/IBluetoothHeadset.aidl @@ -24,10 +24,10 @@ import android.bluetooth.BluetoothDevice; * {@hide} */ interface IBluetoothHeadset { - int getState(); + int getState(in BluetoothDevice device); BluetoothDevice getCurrentHeadset(); boolean connectHeadset(in BluetoothDevice device); - void disconnectHeadset(); + void disconnectHeadset(in BluetoothDevice device); boolean isConnected(in BluetoothDevice device); boolean startVoiceRecognition(); boolean stopVoiceRecognition(); diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index fc40770..6720145 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -1858,7 +1858,7 @@ public class BluetoothService extends IBluetooth.Stub { // Rather not do this from here, but no-where else and I need this // dump pw.println("\n--Headset Service--"); - switch (headset.getState()) { + switch (headset.getState(headset.getCurrentHeadset())) { case BluetoothHeadset.STATE_DISCONNECTED: pw.println("getState() = STATE_DISCONNECTED"); break; |