harmony(鸿蒙)JS API Changes of the Bundle Management Framework

2022-08-09 浏览 (813)

JS API Changes of the Bundle Management Framework

The table below lists the APIs changes of the bundle management framework in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.

API Changes

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
shortcutInfoShortcutInforeadonly labelId: number;Added
shortcutInfoShortcutInforeadonly iconId: number;Added
launcherAbilityInfoLauncherAbilityInforeadonly installTime : number;Added
launcherAbilityInfoLauncherAbilityInforeadonly userId: number;Added
launcherAbilityInfoLauncherAbilityInforeadonly iconId: number;Added
launcherAbilityInfoLauncherAbilityInforeadonly labelId: number;Added
launcherAbilityInfoLauncherAbilityInforeadonly elementName : ElementName;Added
launcherAbilityInfoLauncherAbilityInforeadonly applicationInfo: ApplicationInfo;Added
bundleInfoBundleInforeadonly reqPermissionStates: Array<number>;Added
bundleInfoBundleInforeadonly hapModuleInfos: Array<HapModuleInfo>;Added
bundleInfoBundleInforeadonly abilityInfos: Array<AbilityInfo>;Added
abilityInfoAbilityInforeadonly enabled: boolean;Added
abilityInfoAbilityInforeadonly metaData: Array<CustomizeData>;Added
ohos.zlibzlibunzipFile(inFile:string, outFile:string, options: Options): Promise<void>;Added
ohos.zlibzlibzipFile(inFile:string, outFile:string, options: Options): Promise<void>;Added
ohos.zlibOptionsstrategy?: CompressStrategy;Added
ohos.zlibOptionsmemLevel?: MemLevel;Added
ohos.zlibOptionslevel?: CompressLevel;Added
ohos.zlibMemLevelMEM_LEVEL_DEFAULT = 8Added
ohos.zlibMemLevelMEM_LEVEL_MAX = 9Added
ohos.zlibMemLevelMEM_LEVEL_MIN = 1Added
ohos.zlibCompressStrategyCOMPRESS_STRATEGY_FIXED = 4Added
ohos.zlibCompressStrategyCOMPRESS_STRATEGY_RLE = 3Added
ohos.zlibCompressStrategyCOMPRESS_STRATEGY_HUFFMAN_ONLY = 2Added
ohos.zlibCompressStrategyCOMPRESS_STRATEGY_FILTERED = 1Added
ohos.zlibCompressStrategyCOMPRESS_STRATEGY_DEFAULT_STRATEGY = 0Added
ohos.zlibCompressLevelCOMPRESS_LEVEL_DEFAULT_COMPRESSION = -1Added
ohos.zlibCompressLevelCOMPRESS_LEVEL_BEST_COMPRESSION = 9Added
ohos.zlibCompressLevelCOMPRESS_LEVEL_BEST_SPEED = 1Added
ohos.zlibCompressLevelCOMPRESS_LEVEL_NO_COMPRESSION = 0Added
ohos.zlibErrorCodeERROR_CODE_ERRNO = -1Added
ohos.zlibErrorCodeERROR_CODE_OK = 0Added
ohos.bundlebundleisApplicationEnabled(bundleName: string, callback: AsyncCallback<boolean>): void;
isApplicationEnabled(bundleName: string): Promise<boolean>;
Added
ohos.bundlebundleisAbilityEnabled(info: AbilityInfo, callback: AsyncCallback<boolean>): void;
isAbilityEnabled(info: AbilityInfo): Promise<boolean>;
Added
ohos.bundlebundlegetAbilityIcon(bundleName: string, abilityName: string, callback: AsyncCallback<image.PixelMap>): void;
getAbilityIcon(bundleName: string, abilityName: string): Promise<image.PixelMap>;
Added
ohos.bundlebundlegetAbilityLabel(bundleName: string, abilityName: string, callback: AsyncCallback<string>): void;
getAbilityLabel(bundleName: string, abilityName: string): Promise<string>;
Added
ohos.bundlebundlegetNameForUid(uid: number, callback: AsyncCallback<string>) : void
getNameForUid(uid: number) : Promise<string>;
Added
ohos.bundlebundlegetAbilityInfo(bundleName: string, abilityName: string, callback: AsyncCallback<AbilityInfo>): void;
getAbilityInfo(bundleName: string, abilityName: string): Promise<AbilityInfo>;
Added
ohos.bundleInstallErrorCodeSTATUS_UNINSTALL_PERMISSION_DENIED = 0x45Added
ohos.bundleInstallErrorCodeSTATUS_INSTALL_PERMISSION_DENIED = 0x44Added
ohos.bundleInstallErrorCodeSTATUS_GRANT_REQUEST_PERMISSIONS_FAILED = 0x43Added
ohos.bundleInstallErrorCodeSTATUS_FAILED_NO_SPACE_LEFT = 0x42Added
ohos.bundleInstallErrorCodeSTATUS_RECOVER_FAILURE_INVALID = 0x0DAdded
ohos.bundleBundleOptionsuserId?: number;Added
ohos.bundleColorModeLIGHT_MODE = 1Added
ohos.bundleColorModeDARK_MODE = 0Added
ohos.bundleColorModeAUTO_MODE = -1Added
ohos.bundleBundleFlagGET_APPLICATION_INFO_WITH_DISABLE = 0x00000200Added
ohos.bundleBundleFlagGET_ABILITY_INFO_WITH_DISABLE = 0x00000100Added
ohos.bundleBundleFlagGET_ABILITY_INFO_SYSTEMAPP_ONLY = 0x00000080Added
ohos.bundleBundleFlagGET_APPLICATION_INFO_WITH_METADATA = 0x00000040Added
ohos.bundleBundleFlagGET_ABILITY_INFO_WITH_METADATA = 0x00000020Added
ohos.bundleBundleFlagGET_ALL_APPLICATION_INFO = 0xFFFF0000Added
ohos.bundleBundleFlagGET_BUNDLE_WITH_REQUESTED_PERMISSION = 0x00000010Added
ohos.bundleBundleFlagGET_ABILITY_INFO_WITH_APPLICATION = 0x00000004Added
ohos.bundleBundleFlagGET_ABILITY_INFO_WITH_PERMISSION = 0x00000002Added

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Updates (OpenHarmony 3.1 Beta -> OpenHarmony 3.1 Release)

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the Accessibility Subsystem

harmony(鸿蒙)JS API Changes of the Account Subsystem

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Power Management Subsystem

harmony(鸿蒙)JS API Changes of the Communication Subsystem

harmony(鸿蒙)JS API Changes of the Utils Subsystem

harmony(鸿蒙)JS API Changes of the DFX Subsystem

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/0133c8e85ab2411291193acf9e78f53d