桌面显示分层图标

Signed-off-by: lanpangzii <herunsong2@h-partners.com>
This commit is contained in:
lanpangzii 2024-11-22 18:37:49 +08:00
parent bbda98a584
commit df85df183b

View File

@ -80,7 +80,7 @@ export class ResourceManager {
let imageDescriptor: DrawableDescriptor = (resMgr.getDrawableDescriptor(Number(iconId), undefined));
let value: image.PixelMap = imageDescriptor.getPixelMap();
if (imageDescriptor instanceof LayeredDrawableDescriptor) {
Log.showDebug(TAG, `updateIconCache layered iconValue:${JSON.stringify(value)}`);
Log.showDebug(TAG, 'updateIconCache layered icon');
this.setAppResourceCache(cacheKey, KEY_ICON, value);
} else {
let moduleContext = globalThis.desktopContext.createModuleContext(bundleName, moduleName);
@ -90,7 +90,7 @@ export class ResourceManager {
await moduleContext.resourceManager
.getMediaBase64(iconId)
.then((value) => {
Log.showDebug(TAG, `updateIconCache iconValue:${value}`);
Log.showDebug(TAG, 'updateIconCache normal icon');
if (value != null) {
this.setAppResourceCache(cacheKey, KEY_ICON, value);
}