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

!6034 hisysevent js接口权限修改

Merge pull request !6034 from chenxuihui/monthly_20221018
......@@ -577,6 +577,22 @@ describe('HiAppEventApiTest', function () {
done();
}
});
HiAppEvent.write(HiAppEvent.Event.DISTRIBUTED_SERVICE_START, HiAppEvent.EventType.BEHAVIOR,
{[HiAppEvent.Param.USER_ID]: 'serviceStart', [HiAppEvent.Param.DISTRIBUTED_SERVICE_NAME]: 'HiAppEvent',
[HiAppEvent.Param.DISTRIBUTED_SERVICE_INSTANCE_ID]: 100},
(err, value) => {
console.log('HiAppEvent into json-callback');
if (err) {
console.error(`HiAppEvent json-callback-error code=${err.code}`);
expect().assertFail();
done();
} else {
console.log(`HiAppEvent json-callback-success value=${value}`);
expect(value == 0).assertTrue();
done();
}
});
console.info('testHiAppEventApi25 end')
})
......
......@@ -14,6 +14,15 @@
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{
"type": "ShellKit",
"run-command": [
"setenforce 0"
],
"teardown-command": [
"setenforce 1"
]
}
]
}
\ No newline at end of file
......@@ -16,7 +16,7 @@
"package": "ohos.acts.hiviewdfx.hisysevent.function",
"name": ".entry",
"deviceType": [
"default",
"default",
"phone"
],
"distro": {
......@@ -24,6 +24,11 @@
"moduleName": "entry",
"moduleType": "entry"
},
"reqPermissions": [
{
"name": "ohos.permission.READ_DFX_SYSEVENT"
}
],
"abilities": [
{
"skills": [
......@@ -91,4 +96,4 @@
"mainAbility": ".MainAbility",
"srcPath": ""
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册