mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-26 20:50:48 +00:00
!125 reason获取粒度修改为module
Merge pull request !125 from fanchenxuan/master-
This commit is contained in:
commit
2e4911867e
@ -207,7 +207,9 @@ struct mediaDocumentItem {
|
||||
permissions.forEach(permission => {
|
||||
info.reqPermissionDetails.forEach(reqPermissionDetail => {
|
||||
if (reqPermissionDetail.name == permission) {
|
||||
let context = globalThis.context.createBundleContext(routerData);
|
||||
console.info("reqPermissionDetail: " + JSON.stringify(reqPermissionDetail));
|
||||
let permissionDetail: any = reqPermissionDetail;
|
||||
let context = globalThis.context.createModuleContext(routerData, permissionDetail.moduleName);
|
||||
context.resourceManager.getString(reqPermissionDetail.reasonId).then(value => {
|
||||
if (value !== undefined && !hasReason) {
|
||||
this.reason = this.reason.replace(this.resource.period, this.resource.comma);
|
||||
|
@ -440,7 +440,8 @@ struct PermissionDialog {
|
||||
if (this.reqPerms.indexOf(permission) != -1) {
|
||||
this.bundleInfo.reqPermissionDetails.forEach(reqPermissionDetail => {
|
||||
if (reqPermissionDetail.name == permission) {
|
||||
let context = globalThis.extensionContext.createBundleContext(bundleName);
|
||||
Log.info("reqPermissionDetail: " + JSON.stringify(reqPermissionDetail));
|
||||
let context = globalThis.extensionContext.createModuleContext(bundleName, reqPermissionDetail.moduleName);
|
||||
context.resourceManager.getString(reqPermissionDetail.reasonId, (err, value) => {
|
||||
if (value !== undefined && !group.hasReason) {
|
||||
group.description = group.description.replace(this.resource.period, this.resource.comma);
|
||||
|
Loading…
Reference in New Issue
Block a user