From 406b18fdb3704a9e9e66cefbc74e7cff55f1947c Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 6 Aug 2019 09:28:46 +0200 Subject: Fix QLEAdvertisingData::setManufacturerData on Android The manufacturer data was not properly set because the related Java function requires a byte[] as second parameter. The equivelent JNI type is [B and not [B]. This caused a crash of the application. Change-Id: Iaa062ed9eb01e03d155583519d3f6a6bc01d72f7 Reviewed-by: Timur Pocheptsov --- src/bluetooth/qlowenergycontroller_android.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/bluetooth/qlowenergycontroller_android.cpp b/src/bluetooth/qlowenergycontroller_android.cpp index 35d943fc..86e6ade7 100644 --- a/src/bluetooth/qlowenergycontroller_android.cpp +++ b/src/bluetooth/qlowenergycontroller_android.cpp @@ -940,7 +940,7 @@ static QAndroidJniObject createJavaAdvertiseData(const QLowEnergyAdvertisingData env->SetByteArrayRegion(nativeData, 0, nativeSize, reinterpret_cast(data.manufacturerData().constData())); builder = builder.callObjectMethod("addManufacturerData", - "(I[B])Landroid/bluetooth/le/AdvertiseData$Builder;", + "(I[B)Landroid/bluetooth/le/AdvertiseData$Builder;", data.manufacturerId(), nativeData); env->DeleteLocalRef(nativeData); -- cgit v1.2.1