diff options
| author | Jaikumar Ganesh <jaikumar@google.com> | 2011-09-09 15:19:43 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-09 15:19:43 -0700 |
| commit | 6d172e60bb5c7dcaf1558e875bfbfe8cfe24b073 (patch) | |
| tree | 0789be5b6097295d2bb45b2e2fd65c36f181a52f /core/java/android/server/BluetoothEventLoop.java | |
| parent | 4eb37f8a2cd9c2ed96d7f0742e180e5aca619ccb (diff) | |
| parent | b5d2d4526cd2c0117b7a33b1297ac683c37ac5c7 (diff) | |
Merge "Add error codes for channel disconnection / connection."
Diffstat (limited to 'core/java/android/server/BluetoothEventLoop.java')
| -rw-r--r-- | core/java/android/server/BluetoothEventLoop.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java index e4f2d3229c8e..56da69d4bae7 100644 --- a/core/java/android/server/BluetoothEventLoop.java +++ b/core/java/android/server/BluetoothEventLoop.java @@ -20,6 +20,7 @@ import android.bluetooth.BluetoothA2dp; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHealth; import android.bluetooth.BluetoothInputDevice; import android.bluetooth.BluetoothPan; import android.bluetooth.BluetoothProfile; @@ -974,6 +975,22 @@ class BluetoothEventLoop { } /** + * Called by native code for the async response to a Connect + * method call to org.bluez.Health + * + * @param chanCode The internal id of the channel + * @param result Result code of the operation. + */ + private void onHealthDeviceConnectionResult(int chanCode, int result) { + log ("onHealthDeviceConnectionResult " + chanCode + " " + result); + // Success case gets handled by Property Change signal + if (result != BluetoothHealth.HEALTH_OPERATION_SUCCESS) { + mBluetoothService.onHealthDeviceChannelConnectionError(chanCode, + BluetoothHealth.STATE_CHANNEL_DISCONNECTED); + } + } + + /** * Called by native code on a DeviceDisconnected signal from * org.bluez.NetworkServer. * |
