未验证 提交 54304361 编写于 作者: O openharmony_ci 提交者: Gitee

!21164 修正一些描述矛盾的点

Merge pull request !21164 from CoderAdo/master
......@@ -96,8 +96,8 @@ isWifiActive(): boolean
import wifi from '@ohos.wifi';
try {
let isActivate = wifi.isActivate();
console.info("isActivate:" + isActivate);
let isWifiActive = wifi.isWifiActive();
console.info("isWifiActive:" + isWifiActive);
}catch(error){
console.error("failed:" + JSON.stringify(error));
}
......@@ -2463,7 +2463,7 @@ off(type: "p2pDeviceChange", callback?: Callback<WifiP2pDevice>): void
import wifi from '@ohos.wifi';
var recvP2pDeviceChangeFunc = result => {
console.info("Receive recv p2p device change event: " + result);
console.info("Receive p2p device change event: " + result);
}
// Register event
......@@ -2513,7 +2513,7 @@ off(type: "p2pPeerDeviceChange", callback?: Callback<WifiP2pDevice[]>): vo
import wifi from '@ohos.wifi';
var recvP2pPeerDeviceChangeFunc = result => {
console.info("Receive recv p2p peer device change event: " + result);
console.info("Receive p2p peer device change event: " + result);
}
// Register event
......@@ -2563,7 +2563,7 @@ off(type: "p2pPersistentGroupChange", callback?: Callback<void>): void
import wifi from '@ohos.wifi';
var recvP2pPersistentGroupChangeFunc = result => {
console.info("Receive recv p2p persistent group change event: " + result);
console.info("Receive p2p persistent group change event: " + result);
}
// Register event
......@@ -2621,7 +2621,7 @@ off(type: "p2pDiscoveryChange", callback?: Callback<number>): void
import wifi from '@ohos.wifi';
var recvP2pDiscoveryChangeFunc = result => {
console.info("Receive recv p2p discovery change event: " + result);
console.info("Receive p2p discovery change event: " + result);
}
// Register event
......
......@@ -13,7 +13,7 @@ import wifiManager from '@ohos.wifiManager';
## wifi.enableWifi<sup>9+</sup>
enableWifi(): void
enableWifi(): boolean
使能WLAN。
......@@ -51,7 +51,7 @@ enableWifi(): void
## wifi.disableWifi<sup>9+</sup>
disableWifi(): void
disableWifi(): boolean
去使能WLAN。
......@@ -117,8 +117,8 @@ isWifiActive(): boolean
import wifiManager from '@ohos.wifiManager';
try {
let isActivate = wifiManager.isActivate();
console.info("isActivate:" + isActivate);
let isWifiActive = wifiManager.isWifiActive();
console.info("isWifiActive:" + isWifiActive);
}catch(error){
console.error("failed:" + JSON.stringify(error));
}
......@@ -126,7 +126,7 @@ isWifiActive(): boolean
## wifi.scan<sup>9+</sup>
scan(): void
scan(): boolean
启动WLAN扫描。
......@@ -1641,6 +1641,12 @@ isBandTypeSupported(bandType: WifiBandType): boolean
| -------- | -------- | -------- | -------- |
| bandType | WifiBandType | 是 | Wifi 频段类型。 |
**返回值:**
| **类型** | **说明** |
| -------- | -------- |
| boolean | true:支持,&nbsp;false:不支持。 |
**错误码:**
以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)
......@@ -1674,6 +1680,12 @@ get5GChannelList(): Array&lt;number&gt;
**系统能力:** SystemCapability.Communication.WiFi.STA
**返回值:**
| **类型** | **说明** |
| -------- | -------- |
| &nbsp;Array&lt;number&gt; | 设备支持的5G信道列表。 |
**错误码:**
以下错误码的详细介绍请参见[WIFI错误码](../errorcodes/errorcode-wifi.md)
......@@ -3342,7 +3354,7 @@ off(type: "p2pDeviceChange", callback?: Callback&lt;WifiP2pDevice&gt;): void
import wifiManager from '@ohos.wifiManager';
var recvP2pDeviceChangeFunc = result => {
console.info("Receive recv p2p device change event: " + result);
console.info("Receive p2p device change event: " + result);
}
// Register event
......@@ -3407,7 +3419,7 @@ off(type: "p2pPeerDeviceChange", callback?: Callback&lt;WifiP2pDevice[]&gt;): vo
import wifiManager from '@ohos.wifiManager';
var recvP2pPeerDeviceChangeFunc = result => {
console.info("Receive recv p2p peer device change event: " + result);
console.info("Receive p2p peer device change event: " + result);
}
// Register event
......@@ -3472,7 +3484,7 @@ off(type: "p2pPersistentGroupChange", callback?: Callback&lt;void&gt;): void
import wifiManager from '@ohos.wifiManager';
var recvP2pPersistentGroupChangeFunc = result => {
console.info("Receive recv p2p persistent group change event: " + result);
console.info("Receive p2p persistent group change event: " + result);
}
// Register event
......@@ -3544,7 +3556,7 @@ off(type: "p2pDiscoveryChange", callback?: Callback&lt;number&gt;): void
import wifiManager from '@ohos.wifiManager';
var recvP2pDiscoveryChangeFunc = result => {
console.info("Receive recv p2p discovery change event: " + result);
console.info("Receive p2p discovery change event: " + result);
}
// Register event
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册