修改 framework/opt/net/wifi/service/java/com/android/server/wifi/WifiStateMachine.java
case CMD_START_CONNECT: /* connect command coming from auto-join */ netId = message.arg1; int uid = message.arg2; bssid = (String) message.obj; synchronized (mWifiReqCountLock) { if (!hasConnectionRequests()) { if (mNetworkAgent == null) { loge("CMD_START_CONNECT but no requests and not connected," + " bailing"); //break; } else if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) { loge("CMD_START_CONNECT but no requests and connected, but app " + "does not have sufficient permissions, bailing"); //break; } } }
屏蔽掉 break ,让连接操作继续执行。