diff options
author | Andre Eisenbach <eisenbach@google.com> | 2015-02-05 20:07:50 -0800 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-02-05 20:08:32 -0800 |
commit | 1e3e1ddf939bf71616245e1e100964568053d665 (patch) | |
tree | 932abf0484cbf1553abcd404dd9ad3a4ddcdac22 /jni | |
parent | 9b0177459ddc1412c4e9d44af53a1badb476bdd9 (diff) | |
download | android_packages_apps_Bluetooth-1e3e1ddf939bf71616245e1e100964568053d665.tar.gz android_packages_apps_Bluetooth-1e3e1ddf939bf71616245e1e100964568053d665.tar.bz2 android_packages_apps_Bluetooth-1e3e1ddf939bf71616245e1e100964568053d665.zip |
Add API to check if a Bluetooth connection is encrypted (2/2)
Bug: 19186961
Change-Id: Ied8dbe60995ebe8759c2a4ce21f373b597ed3afe
Diffstat (limited to 'jni')
-rw-r--r-- | 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 ea765b53a..f780364ac 100644 --- 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}, |