From 2ea1e85dcb57d17f5782dbafa1d25eb51c630e4b Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Fri, 1 Apr 2011 16:33:09 -0700 Subject: Implement APIs for Bluetooth Health profile. This first patch implements all the APIs. The APIs wil be made public soon. The data specification API will be submited in another patchset. Change-Id: I2462683b7e07380e2c42474b0036b34d03b4bed1 --- core/java/android/server/BluetoothEventLoop.java | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'core/java/android/server/BluetoothEventLoop.java') diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java index e72aaa7..a220007 100644 --- a/core/java/android/server/BluetoothEventLoop.java +++ b/core/java/android/server/BluetoothEventLoop.java @@ -989,6 +989,33 @@ class BluetoothEventLoop { BluetoothPan.LOCAL_NAP_ROLE); } + /** + * Called by native code on a PropertyChanged signal from + * org.bluez.HealthDevice. + * + * @param devicePath the object path of the remote device + * @param propValues Properties (Name-Value) of the Health Device. + */ + private void onHealthDevicePropertyChanged(String devicePath, String[] propValues) { + log("Health Device : Name of Property is: " + propValues[0] + " Value:" + propValues[1]); + mBluetoothService.onHealthDevicePropertyChanged(devicePath, propValues[1]); + } + + /** + * Called by native code on a ChannelCreated/Deleted signal from + * org.bluez.HealthDevice. + * + * @param devicePath the object path of the remote device + * @param channelPath the path of the health channel. + * @param exists Boolean to indicate if the channel was created or deleted. + */ + private void onHealthDeviceChannelChanged(String devicePath, String channelPath, + boolean exists) { + log("Health Device : devicePath: " + devicePath + ":channelPath:" + channelPath + + ":exists" + exists); + mBluetoothService.onHealthDeviceChannelChanged(devicePath, channelPath, exists); + } + private void onRestartRequired() { if (mBluetoothService.isEnabled()) { Log.e(TAG, "*** A serious error occurred (did bluetoothd crash?) - " + -- cgit v1.1