提交 df56f0e4 编写于 作者: 杜庆泉's avatar 杜庆泉

修复connnect wifi 链接处理逻辑

上级 aa3f49c0
......@@ -598,6 +598,19 @@ export function offGetWifiList(callback : UTSCallback) {
export function connectWifi(option : WifiConnectOption) {
if (option.maunal == true) {
// 指定了手动模式
let manunalIntent = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);
UTSAndroid.getUniActivity()!.startActivity(manunalIntent);
result.errCode = 0
result.errMsg = "connectWifi:ok"
option.success?.(result)
option.complete?.(result)
return
}
var result : UniWifiResult = {
errCode: 12000,
errMsg: "connectWifi:fail:not invoke startWifi",
......@@ -612,18 +625,7 @@ export function connectWifi(option : WifiConnectOption) {
return
}
if (option.maunal == true) {
// 指定了手动模式
let manunalIntent = new Intent(android.provider.Settings.ACTION_WIFI_SETTINGS);
UTSAndroid.getUniActivity()!.startActivity(manunalIntent);
result.errCode = 0
result.errMsg = "connectWifi:ok"
option.success?.(result)
option.complete?.(result)
return
}
// 执行后续的逻辑
let scanWifiInfo : AndroidUniWifiInfo | null = null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册