mirror of
https://gitee.com/openharmony/applications_launcher
synced 2024-11-23 06:50:02 +00:00
commit
264ea16d0b
@ -19,6 +19,7 @@ import { Log } from '../utils/Log';
|
||||
import { CardItemInfo } from '../bean/CardItemInfo';
|
||||
import { CommonConstants } from '../constants/CommonConstants';
|
||||
import { launcherAbilityManager } from './LauncherAbilityManager';
|
||||
import { ResourceManager } from './ResourceManager';
|
||||
|
||||
const TAG = 'FormManager';
|
||||
|
||||
@ -31,6 +32,7 @@ export class FormManager {
|
||||
private readonly CARD_SIZE_2x4: number[] = [4, 2];
|
||||
private readonly CARD_SIZE_4x4: number[] = [4, 4];
|
||||
private readonly CARD_SIZE_6x4: number[] = [6, 4];
|
||||
private resourceManager: ResourceManager = ResourceManager.getInstance();
|
||||
|
||||
private constructor() {
|
||||
}
|
||||
@ -56,13 +58,15 @@ export class FormManager {
|
||||
const cardItemInfoList = new Array<CardItemInfo>();
|
||||
for (const formItem of formList) {
|
||||
const cardItemInfo = new CardItemInfo();
|
||||
let description = await this.resourceManager.getAppNameSync(formItem.descriptionId, formItem.bundleName,
|
||||
formItem.moduleName, formItem.name);
|
||||
cardItemInfo.bundleName = formItem.bundleName;
|
||||
cardItemInfo.abilityName = formItem.abilityName;
|
||||
cardItemInfo.moduleName = formItem.moduleName;
|
||||
cardItemInfo.cardName = formItem.name;
|
||||
cardItemInfo.cardDimension = formItem.defaultDimension;
|
||||
cardItemInfo.area = this.getCardSize(cardItemInfo.cardDimension);
|
||||
cardItemInfo.description = formItem.description;
|
||||
cardItemInfo.description = description;
|
||||
cardItemInfo.formConfigAbility = formItem.formConfigAbility;
|
||||
cardItemInfo.supportDimensions = formItem.supportDimensions;
|
||||
cardItemInfoList.push(cardItemInfo);
|
||||
@ -95,13 +99,15 @@ export class FormManager {
|
||||
const cardItemInfoList = new Array<CardItemInfo>();
|
||||
for (const formItem of formList) {
|
||||
const cardItemInfo = new CardItemInfo();
|
||||
let description = await this.resourceManager.getAppNameSync(formItem.descriptionId, formItem.bundleName,
|
||||
formItem.moduleName, formItem.name);
|
||||
cardItemInfo.bundleName = formItem.bundleName;
|
||||
cardItemInfo.abilityName = formItem.abilityName;
|
||||
cardItemInfo.moduleName = formItem.moduleName;
|
||||
cardItemInfo.cardName = formItem.name;
|
||||
cardItemInfo.cardDimension = formItem.defaultDimension;
|
||||
cardItemInfo.area = this.getCardSize(cardItemInfo.cardDimension);
|
||||
cardItemInfo.description = formItem.description;
|
||||
cardItemInfo.description = description;
|
||||
cardItemInfo.formConfigAbility = formItem.formConfigAbility;
|
||||
cardItemInfo.supportDimensions = formItem.supportDimensions;
|
||||
cardItemInfoList.push(cardItemInfo);
|
||||
@ -164,13 +170,15 @@ export class FormManager {
|
||||
const cardItemInfoList = new Array<CardItemInfo>();
|
||||
for (const formItem of formList) {
|
||||
const cardItemInfo = new CardItemInfo();
|
||||
let description = await this.resourceManager.getAppNameSync(formItem.descriptionId, formItem.bundleName,
|
||||
formItem.moduleName, formItem.name);
|
||||
cardItemInfo.bundleName = formItem.bundleName;
|
||||
cardItemInfo.abilityName = formItem.abilityName;
|
||||
cardItemInfo.moduleName = formItem.moduleName;
|
||||
cardItemInfo.cardName = formItem.name;
|
||||
cardItemInfo.cardDimension = formItem.defaultDimension;
|
||||
cardItemInfo.area = this.getCardSize(cardItemInfo.cardDimension);
|
||||
cardItemInfo.description = formItem.description;
|
||||
cardItemInfo.description = description;
|
||||
cardItemInfo.formConfigAbility = formItem.formConfigAbility;
|
||||
cardItemInfo.supportDimensions = formItem.supportDimensions;
|
||||
cardItemInfoList.push(cardItemInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user