diff options
author | Albert Mojir <albert.mojir@sonyericsson.com> | 2011-03-21 14:59:10 +0100 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-06-02 10:30:49 -0700 |
commit | efc1d16374955f04d713c770ab47d90d190afe83 (patch) | |
tree | 34d81f7b4a6cbc5c742d1f084c5d54b06f274b31 /core/jni | |
parent | 108a61cac5b7d6b8d6ce4dfca367888b94bf7ef9 (diff) | |
download | frameworks_base-efc1d16374955f04d713c770ab47d90d190afe83.zip frameworks_base-efc1d16374955f04d713c770ab47d90d190afe83.tar.gz frameworks_base-efc1d16374955f04d713c770ab47d90d190afe83.tar.bz2 |
Bluetooth: correcting return value from cancelDiscovery
BluetoothAdapter.cancelDiscovery was previously always
returning false.
Change-Id: Ic1fd134d4b710438d95c5b8ca009104529dd1bf5
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android_server_BluetoothService.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/jni/android_server_BluetoothService.cpp b/core/jni/android_server_BluetoothService.cpp index 5c6958a..ac75634 100644 --- a/core/jni/android_server_BluetoothService.cpp +++ b/core/jni/android_server_BluetoothService.cpp @@ -250,15 +250,15 @@ done: #endif } -static void stopDiscoveryNative(JNIEnv *env, jobject object) { - LOGV("%s", __FUNCTION__); +static jboolean stopDiscoveryNative(JNIEnv *env, jobject object) { + LOGV(__FUNCTION__); #ifdef HAVE_BLUETOOTH DBusMessage *msg = NULL; DBusMessage *reply = NULL; DBusError err; const char *name; - jstring ret; native_data_t *nat; + jboolean ret = JNI_FALSE; dbus_error_init(&err); @@ -288,11 +288,16 @@ static void stopDiscoveryNative(JNIEnv *env, jobject object) { } else { LOG_AND_FREE_DBUS_ERROR_WITH_MSG(&err, msg); } + goto done; } + ret = JNI_TRUE; done: if (msg) dbus_message_unref(msg); if (reply) dbus_message_unref(reply); + return ret; +#else + return JNI_FALSE; #endif } |