提交 0992be39 编写于 作者: @ @shi-xiaoxiao-iris

[设备管理]修改检视意见

Signed-off-by: N@shi-xiaoxiao-iris <shixiaoxiao2@huawei.com>
上级 ecea57fa
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
**关键接口/组件变更** **关键接口/组件变更**
在以下接口增加错误码处理:
- createDeviceManager(bundleName: string, callback: AsyncCallback&lt;DeviceManager&gt;): void; - createDeviceManager(bundleName: string, callback: AsyncCallback&lt;DeviceManager&gt;): void;
- release(): void; - release(): void;
- getTrustedDeviceListSync(): Array&lt;DeviceInfo&gt; - getTrustedDeviceListSync(): Array&lt;DeviceInfo&gt;
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
异步接口以getTrustedDeviceList为例,示例代码如下: 异步接口以getTrustedDeviceList为例,示例代码如下:
```js ```ts
import account_osAccount from "@ohos.distributedHardware.deviceManager" import account_osAccount from "@ohos.distributedHardware.deviceManager"
dmInstance.getTrustedDeviceList((err, data) => { dmInstance.getTrustedDeviceList((err, data) => {
console.log("getTrustedDeviceList err: " + JSON.stringify(err)); console.log("getTrustedDeviceList err: " + JSON.stringify(err));
...@@ -72,7 +73,7 @@ try { ...@@ -72,7 +73,7 @@ try {
同步接口以startDeviceDiscovery为例,示例代码如下: 同步接口以startDeviceDiscovery为例,示例代码如下:
```js ```ts
// 生成发现标识,随机数确保每次调用发现接口的标识不一致 // 生成发现标识,随机数确保每次调用发现接口的标识不一致
var subscribeId = Math.floor(Math.random() * 10000 + 1000); var subscribeId = Math.floor(Math.random() * 10000 + 1000);
var subscribeInfo = { var subscribeInfo = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册