diff options
author | Sven Gothel <[email protected]> | 2020-07-02 03:33:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-07-02 03:33:36 +0200 |
commit | e261da108c8f179a279fd6990cda572aaf75958c (patch) | |
tree | 821d730ece7e654082daf48fd7ac9c610410f118 /java/jni | |
parent | 778e353f81a0e8dbd7228147480a4e516ab020fd (diff) |
Support BDADDR_LE_RANDOM (p1.1): Add missing DBTAdapter.cxx patch for changed DBTDevice.java ctor, added getBLERandomAddressType()
Diffstat (limited to 'java/jni')
-rw-r--r-- | java/jni/direct_bt/DBTAdapter.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/jni/direct_bt/DBTAdapter.cxx b/java/jni/direct_bt/DBTAdapter.cxx index 5adbefbd..734b2276 100644 --- a/java/jni/direct_bt/DBTAdapter.cxx +++ b/java/jni/direct_bt/DBTAdapter.cxx @@ -42,7 +42,7 @@ static const std::string _eirDataTypeSetClassName("org/tinyb/EIRDataTypeSet"); static const std::string _eirDataTypeSetClazzCtorArgs("(I)V"); static const std::string _hciStatusCodeClassName("org/tinyb/HCIStatusCode"); static const std::string _hciStatusCodeClazzGetArgs("(B)Lorg/tinyb/HCIStatusCode;"); -static const std::string _deviceClazzCtorArgs("(JLdirect_bt/tinyb/DBTAdapter;Ljava/lang/String;ILjava/lang/String;J)V"); +static const std::string _deviceClazzCtorArgs("(JLdirect_bt/tinyb/DBTAdapter;Ljava/lang/String;IILjava/lang/String;J)V"); static const std::string _adapterSettingsChangedMethodArgs("(Lorg/tinyb/BluetoothAdapter;Lorg/tinyb/AdapterSettings;Lorg/tinyb/AdapterSettings;Lorg/tinyb/AdapterSettings;J)V"); static const std::string _discoveringChangedMethodArgs("(Lorg/tinyb/BluetoothAdapter;ZZJ)V"); @@ -273,7 +273,9 @@ class JNIAdapterStatusListener : public AdapterStatusListener { const jstring name = from_string_to_jstring(env, device->getName()); java_exception_check_and_throw(env, E_FILE_LINE); jobject tmp_jdevice = env->NewObject(deviceClazzRef.getClass(), deviceClazzCtor, - (jlong)device.get(), JavaGlobalObj::GetObject(adapterObjRef), addr, device->getAddressType(), name, (jlong)timestamp); + (jlong)device.get(), JavaGlobalObj::GetObject(adapterObjRef), addr, + device->getAddressType(), device->getBLERandomAddressType(), + name, (jlong)timestamp); java_exception_check_and_throw(env, E_FILE_LINE); JNIGlobalRef::check(tmp_jdevice, E_FILE_LINE); std::shared_ptr<JavaAnonObj> jDeviceRef1 = device->getJavaObject(); @@ -319,7 +321,9 @@ class JNIAdapterStatusListener : public AdapterStatusListener { const jstring name = from_string_to_jstring(env, device->getName()); java_exception_check_and_throw(env, E_FILE_LINE); jobject tmp_jdevice = env->NewObject(deviceClazzRef.getClass(), deviceClazzCtor, - (jlong)device.get(), JavaGlobalObj::GetObject(adapterObjRef), addr, device->getAddressType(), name, (jlong)timestamp); + (jlong)device.get(), JavaGlobalObj::GetObject(adapterObjRef), addr, + device->getAddressType(), device->getBLERandomAddressType(), + name, (jlong)timestamp); java_exception_check_and_throw(env, E_FILE_LINE); JNIGlobalRef::check(tmp_jdevice, E_FILE_LINE); std::shared_ptr<JavaAnonObj> jDeviceRef1 = device->getJavaObject(); |