summaryrefslogtreecommitdiffstats
path: root/core/java/android/server/BluetoothEventLoop.java
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2011-04-01 16:33:09 -0700
committerJaikumar Ganesh <jaikumar@google.com>2011-06-24 11:31:43 -0700
commit2ea1e85dcb57d17f5782dbafa1d25eb51c630e4b (patch)
tree490a07dffcd15d712020f52d5e446c2cf58ec929 /core/java/android/server/BluetoothEventLoop.java
parent7096b660548a15938b2c2fcfda7aa41ec16c4a72 (diff)
downloadframeworks_base-2ea1e85dcb57d17f5782dbafa1d25eb51c630e4b.zip
frameworks_base-2ea1e85dcb57d17f5782dbafa1d25eb51c630e4b.tar.gz
frameworks_base-2ea1e85dcb57d17f5782dbafa1d25eb51c630e4b.tar.bz2
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
Diffstat (limited to 'core/java/android/server/BluetoothEventLoop.java')
-rw-r--r--core/java/android/server/BluetoothEventLoop.java27
1 files changed, 27 insertions, 0 deletions
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?) - " +