Loading core/java/android/bluetooth/BluetoothAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -628,7 +628,7 @@ public final class BluetoothAdapter { public boolean cancelDiscovery() { if (getState() != STATE_ON) return false; try { mService.cancelDiscovery(); return mService.cancelDiscovery(); } catch (RemoteException e) {Log.e(TAG, "", e);} return false; } Loading core/jni/android_server_BluetoothService.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -242,15 +242,15 @@ done: #endif } static void stopDiscoveryNative(JNIEnv *env, jobject object) { 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); Loading Loading @@ -280,11 +280,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 } Loading core/tests/coretests/src/android/bluetooth/BluetoothTestUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -613,8 +613,7 @@ public class BluetoothTestUtils extends Assert { return; } // TODO: put assertTrue() around cancelDiscovery() once it starts returning true. adapter.cancelDiscovery(); assertTrue(adapter.cancelDiscovery()); long s = System.currentTimeMillis(); while (System.currentTimeMillis() - s < CANCEL_DISCOVERY_TIMEOUT) { Loading Loading
core/java/android/bluetooth/BluetoothAdapter.java +1 −1 Original line number Diff line number Diff line Loading @@ -628,7 +628,7 @@ public final class BluetoothAdapter { public boolean cancelDiscovery() { if (getState() != STATE_ON) return false; try { mService.cancelDiscovery(); return mService.cancelDiscovery(); } catch (RemoteException e) {Log.e(TAG, "", e);} return false; } Loading
core/jni/android_server_BluetoothService.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -242,15 +242,15 @@ done: #endif } static void stopDiscoveryNative(JNIEnv *env, jobject object) { 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); Loading Loading @@ -280,11 +280,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 } Loading
core/tests/coretests/src/android/bluetooth/BluetoothTestUtils.java +1 −2 Original line number Diff line number Diff line Loading @@ -613,8 +613,7 @@ public class BluetoothTestUtils extends Assert { return; } // TODO: put assertTrue() around cancelDiscovery() once it starts returning true. adapter.cancelDiscovery(); assertTrue(adapter.cancelDiscovery()); long s = System.currentTimeMillis(); while (System.currentTimeMillis() - s < CANCEL_DISCOVERY_TIMEOUT) { Loading