summaryrefslogtreecommitdiffstats
path: root/service/jni/com_android_server_wifi_WifiNative.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'service/jni/com_android_server_wifi_WifiNative.cpp')
-rw-r--r--service/jni/com_android_server_wifi_WifiNative.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index a15377308..a387a0c1f 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -899,15 +899,15 @@ static jboolean android_net_wifi_setHotlist(
return false;
}
- if (params.num_ap >
+ if (params.num_bssid >
static_cast<int>(sizeof(params.ap) / sizeof(params.ap[0]))) {
ALOGE("setHotlist array length is too long");
android_errorWriteLog(0x534e4554, "31856351");
return false;
}
- for (int i = 0; i < params.num_ap; i++) {
- jobject objAp = env->GetObjectArrayElement(array, i);
+ for (int i = 0; i < params.num_bssid; i++) {
+ JNIObject<jobject> objAp = helper.getObjectArrayElement(array, i);
JNIObject<jstring> macAddrString = helper.getStringField(objAp, "bssid");
if (macAddrString == NULL) {