diff options
author | Andre Eisenbach <eisenbach@google.com> | 2015-02-10 00:55:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-02-10 00:55:27 +0000 |
commit | bb1fcdc55f2287009a1b18da9c3d46c163b0d0a4 (patch) | |
tree | e55c164e0636b04a9b03b0114d08c79d793572c5 /jni | |
parent | 0c9266756ae02b643218d6dcd1a73707236bfef2 (diff) | |
parent | 6c384c5927aa0f02c5bda611fc31225447f710e2 (diff) | |
download | android_packages_apps_Bluetooth-bb1fcdc55f2287009a1b18da9c3d46c163b0d0a4.tar.gz android_packages_apps_Bluetooth-bb1fcdc55f2287009a1b18da9c3d46c163b0d0a4.tar.bz2 android_packages_apps_Bluetooth-bb1fcdc55f2287009a1b18da9c3d46c163b0d0a4.zip |
am 6c384c59: am c9d93376: am 1e3e1ddf: Add API to check if a Bluetooth connection is encrypted (2/2)
* commit '6c384c5927aa0f02c5bda611fc31225447f710e2':
Add API to check if a Bluetooth connection is encrypted (2/2)
Diffstat (limited to 'jni')
-rwxr-xr-x | jni/com_android_bluetooth_btservice_AdapterService.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp index fc0424b70..e536125df 100755 --- a/jni/com_android_bluetooth_btservice_AdapterService.cpp +++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp @@ -900,7 +900,7 @@ static jboolean cancelBondNative(JNIEnv* env, jobject obj, jbyteArray address) { return result; } -static jboolean isConnectedNative(JNIEnv* env, jobject obj, jbyteArray address) { +static int getConnectionStateNative(JNIEnv* env, jobject obj, jbyteArray address) { ALOGV("%s:",__FUNCTION__); if (!sBluetoothInterface) return JNI_FALSE; @@ -913,7 +913,7 @@ static jboolean isConnectedNative(JNIEnv* env, jobject obj, jbyteArray address) int ret = sBluetoothInterface->get_connection_state((bt_bdaddr_t *)addr); env->ReleaseByteArrayElements(address, addr, 0); - return (ret != 0 ? JNI_TRUE : JNI_FALSE); + return ret; } static jboolean pinReplyNative(JNIEnv *env, jobject obj, jbyteArray address, jboolean accept, @@ -1231,7 +1231,7 @@ static JNINativeMethod sMethods[] = { {"createBondNative", "([BI)Z", (void*) createBondNative}, {"removeBondNative", "([B)Z", (void*) removeBondNative}, {"cancelBondNative", "([B)Z", (void*) cancelBondNative}, - {"isConnectedNative", "([B)Z", (void*) isConnectedNative}, + {"getConnectionStateNative", "([B)I", (void*) getConnectionStateNative}, {"pinReplyNative", "([BZI[B)Z", (void*) pinReplyNative}, {"sspReplyNative", "([BIZI)Z", (void*) sspReplyNative}, {"getRemoteServicesNative", "([B)Z", (void*) getRemoteServicesNative}, |