diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2011-08-31 15:36:05 -0700 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-09-08 15:17:17 -0700 |
commit | eb9d34630f74d0260690287f2df57c0cd3d7ba1d (patch) | |
tree | c32b2e59540e97130c8bef912c59246474e68a47 /core/jni/android_server_BluetoothService.cpp | |
parent | 9fefa3c716e9c8d7dfb6c851c91e37e37732a955 (diff) | |
download | frameworks_base-eb9d34630f74d0260690287f2df57c0cd3d7ba1d.zip frameworks_base-eb9d34630f74d0260690287f2df57c0cd3d7ba1d.tar.gz frameworks_base-eb9d34630f74d0260690287f2df57c0cd3d7ba1d.tar.bz2 |
Make Bluetooth Health APIs public.
Fix a few bugs:
a) Pass a integer token to identify the channel.
b) Close fds in case of errors.
Change-Id: I2046787be5008769435f2f72a5bd67c19b749da0
Diffstat (limited to 'core/jni/android_server_BluetoothService.cpp')
-rw-r--r-- | core/jni/android_server_BluetoothService.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/jni/android_server_BluetoothService.cpp b/core/jni/android_server_BluetoothService.cpp index 819449a..292047b 100644 --- a/core/jni/android_server_BluetoothService.cpp +++ b/core/jni/android_server_BluetoothService.cpp @@ -1659,6 +1659,7 @@ static jobject getChannelFdNative(JNIEnv *env, jobject object, jstring channelPa if (fileDesc == NULL) { // FileDescriptor constructor has thrown an exception releaseChannelFdNative(env, object, channelPath); + close(fd); return NULL; } @@ -1667,7 +1668,7 @@ static jobject getChannelFdNative(JNIEnv *env, jobject object, jstring channelPa if (parcelFileDesc == NULL) { // ParcelFileDescriptor constructor has thrown an exception releaseChannelFdNative(env, object, channelPath); - LOGE("---Parcel File Desc is null"); + close(fd); return NULL; } |