Fix jni crash when get field of adType
The type of field 'ad_type' in com.android.bluetooth.gatt.ScanFilterQueue.Entry is int.
Test: Use eng version to verity.
Change-Id: Ieee0496d790ab14d86439fdadc330540bedd3ebc
Signed-off-by: weidengke <weidengke@xiaomi.com>
diff --git a/android/app/jni/com_android_bluetooth_gatt.cpp b/android/app/jni/com_android_bluetooth_gatt.cpp
index 03517fc..d553e79 100644
--- a/android/app/jni/com_android_bluetooth_gatt.cpp
+++ b/android/app/jni/com_android_bluetooth_gatt.cpp
@@ -1714,7 +1714,7 @@
curr.company_mask = env->GetIntField(current.get(), companyMaskFid);
- curr.ad_type = env->GetByteField(current.get(), adTypeFid);
+ curr.ad_type = env->GetIntField(current.get(), adTypeFid);
ScopedLocalRef<jbyteArray> data(
env, (jbyteArray)env->GetObjectField(current.get(), dataFid));