Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3ec6645b
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3ec6645b
编写于
7月 12, 2023
作者:
史
史晓晓
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[分布式硬件DM]添加系统权限校验changelog说明
Signed-off-by:
N
史晓晓
<
shixiaoxiao.30044129@huawei.com
>
上级
266d98ec
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
58 addition
and
0 deletion
+58
-0
zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.2/changelogs-device_manager.md
...angelogs/OpenHarmony_4.0.8.2/changelogs-device_manager.md
+58
-0
未找到文件。
zh-cn/release-notes/changelogs/OpenHarmony_4.0.8.2/changelogs-device_manager.md
浏览文件 @
3ec6645b
...
...
@@ -13,6 +13,7 @@
| ------------------------- | ------------------- | ------------------------------------------------------------ | -------- |
| @ohos.distributedHardware.deviceManager | deviceManager |
**function**
release(): void | ohos.permission.ACCESS_SERVICE_DM |
| @ohos.distributedHardware.deviceManager | deviceManager |
**function**
getTrustedDeviceListSync(): Array
<
DeviceInfo
>
| ohos.permission.ACCESS_SERVICE_DM |
| @ohos.distributedHardware.deviceManager | deviceManager |
**function**
getTrustedDeviceListSync(isRefresh: boolean): Array
<DeviceInfo>
; | ohos.permission.ACCESS_SERVICE_DM |
| @ohos.distributedHardware.deviceManager | deviceManager |
**function**
getTrustedDeviceList(callback:AsyncCallback
<
Array
<
DeviceInfo
>>
): void | ohos.permission.ACCESS_SERVICE_DM |
| @ohos.distributedHardware.deviceManager | deviceManager |
**function**
getTrustedDeviceList(): Promise
<
Array
<
DeviceInfo
>>
| ohos.permission.ACCESS_SERVICE_DM |
| @ohos.distributedHardware.deviceManager | deviceManager |
**function**
getLocalDeviceInfoSync(): DeviceInfo | ohos.permission.ACCESS_SERVICE_DM |
...
...
@@ -50,3 +51,60 @@
**适配指导**
调用以上接口,需要申请相应的权限才能正常调用。
## cl.device_manager.2 所有接口进行系统接口权限校验
从Opeharmonny 4.0.8.2版本开始,所有接口进行系统接口权限校验。
**变更影响**
非系统应用无法调用系统接口,如调用方为非系统应用或未申请SystemApi相关权限,将无法调用接口。
**关键的接口/组件变更**
所有接口均进行系统接口权限校验,接口明细如下:
| 接口、枚举或变量名 | 类型 | 是否为SystemApi |
| -------- | -------- | ------- |
| createDeviceManager(bundleName: string, callback: AsyncCallback
<DeviceManager>
): void; | interface | 是 |
| release(): void | interface | 是 |
| getTrustedDeviceListSync(): Array
<
DeviceInfo
>
| interface | 是 |
| getTrustedDeviceListSync(isRefresh: boolean): Array
<DeviceInfo>
; | interface | 是 |
| getTrustedDeviceList(callback:AsyncCallback
<
Array
<
DeviceInfo
>>
): void | interface | 是 |
| getTrustedDeviceList(): Promise
<
Array
<
DeviceInfo
>>
| interface | 是 |
| getLocalDeviceInfoSync(): DeviceInfo | interface | 是 |
| getLocalDeviceInfo(callback:AsyncCallback
<
DeviceInfo
>
): void | interface | 是 |
| getLocalDeviceInfo(): Promise
<
DeviceInfo
>
| interface | 是 |
| getDeviceInfo(networkId: string, callback:AsyncCallback
<
DeviceInfo
>
): void | interface | 是 |
| getDeviceInfo(networkId: string): Promise
<
DeviceInfo
>
| interface | 是 |
| startDeviceDiscovery(subscribeInfo: SubscribeInfo): void | interface | 是 |
| startDeviceDiscovery(subscribeInfo: SubscribeInfo, filterOptions?: string): void | interface | 是 |
| stopDeviceDiscovery(subscribeId: number): void | interface | 是 |
| publishDeviceDiscovery(publishInfo: PublishInfo): void | interface | 是 |
| unPublishDeviceDiscovery(publishId: number): void | interface | 是 |
| authenticateDevice(deviceInfo: DeviceInfo, authParam: AuthParam, callback: AsyncCallback
<
{deviceId: string, pinToken ?: number}
>
): void |interface | 是 |
| unAuthenticateDevice(deviceInfo: DeviceInfo): void | interface | 是 |
| verifyAuthInfo(authInfo: AuthInfo, callback: AsyncCallback
<
{deviceId: string, level: number}
>
): void | interface | 是 |
| setUserOperation(operateAction: number, params: string): void | interface | 是 |
| requestCredentialRegisterInfo(requestInfo: string, callback: AsyncCallback
<
{registerInfo: string}
>
): void; | interface | 是 |
| importCredential(credentialInfo: string, callback: AsyncCallback
<
{resultInfo: string}
>
): void; | interface | 是 |
| deleteCredential(queryInfo: string, callback: AsyncCallback
<
{resultInfo: string}
>
): void; | interface | 是 |
| on(type: 'uiStateChange', callback: Callback
<
{ param: string}
>
): void; | interface | 是 |
| off(type: 'uiStateChange', callback?: Callback
<
{ param: string}
>
): void; | interface | 是 |
| on(type: 'deviceStateChange', callback: Callback
<
{ action: DeviceStateChangeAction, device: DeviceInfo }
>
): void | interface | 是 |
| off(type: 'deviceStateChange', callback?: Callback
<
{ action: DeviceStateChangeAction, device: DeviceInfo }
>
): void | interface | 是 |
| on(type: 'deviceFound', callback: Callback
<
{ subscribeId: number, device: DeviceInfo }
>
): void | interface | 是 |
| off(type: 'deviceFound', callback?: Callback
<
{ subscribeId: number, device: DeviceInfo }
>
): void | interface | 是 |
| on(type: 'discoverFail', callback: Callback
<
{ subscribeId: number, reason: number }
>
): void | interface | 是 |
| off(type: 'discoverFail', callback?: Callback
<
{ subscribeId: number, reason: number }
>
): void | interface | 是 |
| on(type: 'publishSuccess', callback: Callback
<
{ publishId: number }
>
): void | interface | 是 |
| off(type: 'publishSuccess', callback?: Callback
<
{ publishId: number }
>
): void | interface | 是 |
| on(type: 'publishFail', callback: Callback
<
{ publishId: number, reason: number }
>
): void | interface | 是 |
| off(type: 'publishFail', callback?: Callback
<
{ publishId: number, reason: number }
>
): void | interface | 是 |
| on(type: 'serviceDie', callback: () =
>
void): void | interface | 是 |
| off(type: 'serviceDie', callback?: () =
>
void): void | interface | 是 |
**适配指导**
调用以上接口,调用方需要为系统应用或申请SystemApi相关权限。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录