mirror of
https://gitee.com/openharmony/applications_permission_manager
synced 2024-11-23 11:19:46 +00:00
权限使用记录资源获取
Signed-off-by: fanchenxuan <fanchenxuan@huawei.com>
This commit is contained in:
parent
1775a19158
commit
0af2525fd8
@ -415,7 +415,7 @@ struct permissionRecordPage {
|
|||||||
DD: date.getDate(),
|
DD: date.getDate(),
|
||||||
NN: date.getHours() >= 12 ? this.strings.afternoon : this.strings.morning,
|
NN: date.getHours() >= 12 ? this.strings.afternoon : this.strings.morning,
|
||||||
HH: date.getHours() >= 12 ? date.getHours() - 12 : date.getHours(),
|
HH: date.getHours() >= 12 ? date.getHours() - 12 : date.getHours(),
|
||||||
mm: date.getMinutes() > 10 ? date.getMinutes() : '0' + date.getMinutes(),
|
mm: date.getMinutes() >= 10 ? date.getMinutes() : '0' + date.getMinutes(),
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const key in config) {
|
for (const key in config) {
|
||||||
@ -524,18 +524,13 @@ struct permissionRecordPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await globalThis.context.resourceManager.getString(info.appInfo.labelResource, (error, value) => {
|
globalThis.allBundleInfo.forEach(bundleInfo => {
|
||||||
if (value == undefined) {
|
if (bundleInfo.bundleName === info.name) {
|
||||||
appInfo.groupName = info.appInfo.label;
|
appInfo.groupName = bundleInfo.label;
|
||||||
} else {
|
appInfo.icon = bundleInfo.icon;
|
||||||
appInfo.groupName = value;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
await globalThis.context.resourceManager.getMediaBase64(info.appInfo.iconResource, (error, value) => {
|
|
||||||
appInfo.icon = value;
|
|
||||||
})
|
|
||||||
|
|
||||||
appInfo.name = info.name;
|
appInfo.name = info.name;
|
||||||
appInfo.api = info.targetVersion;
|
appInfo.api = info.targetVersion;
|
||||||
appInfo.accessTokenId = info.appInfo.accessTokenId;
|
appInfo.accessTokenId = info.appInfo.accessTokenId;
|
||||||
|
Loading…
Reference in New Issue
Block a user