1# 包管理子系统JS API变更 2 3OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,包管理子系统的API变更如下: 4 5## 接口变更 6 7| 模块名 | 类名 | 方法/属性/枚举/常量 | 变更类型 | 8|---|---|---|---| 9| abilityInfo | AbilityInfo | readonly minWindowHeight: number; | 新增 | 10| abilityInfo | AbilityInfo | readonly maxWindowHeight: number; | 新增 | 11| abilityInfo | AbilityInfo | readonly minWindowWidth: number; | 新增 | 12| abilityInfo | AbilityInfo | readonly maxWindowWidth: number; | 新增 | 13| abilityInfo | AbilityInfo | readonly minWindowRatio: number; | 新增 | 14| abilityInfo | AbilityInfo | readonly maxWindowRatio: number; | 新增 | 15| abilityInfo | AbilityInfo | readonly supportWindowMode: Array\<bundle.SupportWindowMode>; | 新增 | 16| bundleInstaller | InstallParam | crowdtestDeadline?: number; | 新增 | 17| bundleInstaller | InstallParam | hashParams?: Array\<HashParam>; | 新增 | 18| bundleInstaller | HashParam | hashValue: string; | 新增 | 19| bundleInstaller | HashParam | moduleName: string; | 新增 | 20| dispatchInfo | DispatchInfo | readonly dispatchAPI: string; | 新增 | 21| dispatchInfo | DispatchInfo | readonly verison: string; | 新增 | 22| hapModuleInfo | HapModuleInfo | readonly hashValue: string; | 新增 | 23| ohos.bundle | bundle | getDisposedStatus(bundleName: string, callback: AsyncCallback\<number>): void;<br>getDisposedStatus(bundleName: string): Promise\<number>; | 新增 | 24| ohos.bundle | bundle | setDisposedStatus(bundleName: string, status: number, callback: AsyncCallback\<void>): void;<br>setDisposedStatus(bundleName: string, status: number): Promise\<void>; | 新增 | 25| ohos.bundle | bundle | getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName: string, callback: AsyncCallback\<Array\<string>>): void;<br>getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName?: string): Promise\<Array\<string>>; | 新增 | 26| ohos.bundle | bundle | getProfileByAbility(moduleName: string, abilityName: string, metadataName: string, callback: AsyncCallback\<Array\<string>>): void;<br>getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise\<Array\<string>>; | 新增 | 27| ohos.bundle | bundle | getDispatcherVersion(callback: AsyncCallback\<DispatchInfo>): void;<br>getDispatcherVersion(): Promise\<DispatchInfo>; | 新增 | 28| ohos.bundle | bundle | getBundlePackInfo(bundleName: string, bundlePackFlag: pack.BundlePackFlag, callback: AsyncCallback\<pack.BundlePackInfo>): void;<br>getBundlePackInfo(bundleName: string, bundlePackFlag: pack.BundlePackFlag): Promise\<pack.BundlePackInfo>; | 新增 | 29| ohos.bundle | SupportWindowMode | FLOATING = 2 | 新增 | 30| ohos.bundle | SupportWindowMode | SPLIT = 1 | 新增 | 31| ohos.bundle | SupportWindowMode | FULL_SCREEN = 0 | 新增 | 32| ohos.bundle | ExtensionAbilityType | ENTERPRISE_ADMIN = 11 | 新增 | 33| ohos.bundle | DisplayOrientation | LOCKED | 新增 | 34| ohos.bundle | DisplayOrientation | AUTO_ROTATION_PORTRAIT_RESTRICTED | 新增 | 35| ohos.bundle | DisplayOrientation | AUTO_ROTATION_LANDSCAPE_RESTRICTED | 新增 | 36| ohos.bundle | DisplayOrientation | AUTO_ROTATION_RESTRICTED | 新增 | 37| ohos.bundle | DisplayOrientation | AUTO_ROTATION_PORTRAIT | 新增 | 38| ohos.bundle | DisplayOrientation | AUTO_ROTATION_LANDSCAPE | 新增 | 39| ohos.bundle | DisplayOrientation | AUTO_ROTATION | 新增 | 40| ohos.bundle | DisplayOrientation | PORTRAIT_INVERTED | 新增 | 41| ohos.bundle | DisplayOrientation | LANDSCAPE_INVERTED | 新增 | 42| ohos.bundle | BundleFlag | GET_APPLICATION_INFO_WITH_CERTIFICATE_FINGERPRINT = 0x00000400 | 新增 | 43| ohos.bundle | BundleFlag | GET_BUNDLE_WITH_HASH_VALUE = 0x00000030 | 新增 | 44| ohos.bundle.defaultAppManager | defaultAppManager | resetDefaultApplication(type: string, userId?: number): Promise\<void>;<br>resetDefaultApplication(type: string, userId: number, callback: AsyncCallback\<void>): void;<br>resetDefaultApplication(type: string, callback: AsyncCallback\<void>): void; | 新增 | 45| ohos.bundle.defaultAppManager | defaultAppManager | setDefaultApplication(type: string, elementName: ElementName, userId?: number): Promise\<void>;<br>setDefaultApplication(type: string, elementName: ElementName, userId: number, callback: AsyncCallback\<void>): void;<br>setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCallback\<void>): void; | 新增 | 46| ohos.bundle.defaultAppManager | defaultAppManager | getDefaultApplication(type: string, userId?: number): Promise\<BundleInfo>;<br>getDefaultApplication(type: string, userId: number, callback: AsyncCallback\<BundleInfo>): void;<br>getDefaultApplication(type: string, callback: AsyncCallback\<BundleInfo>): void; | 新增 | 47| ohos.bundle.defaultAppManager | defaultAppManager | isDefaultApplication(type: string): Promise\<boolean>;<br>isDefaultApplication(type: string, callback: AsyncCallback\<boolean>): void; | 新增 | 48| ohos.bundle.defaultAppManager | ApplicationType | PPT = "PPT" | 新增 | 49| ohos.bundle.defaultAppManager | ApplicationType | EXCEL = "EXCEL" | 新增 | 50| ohos.bundle.defaultAppManager | ApplicationType | WORD = "WORD" | 新增 | 51| ohos.bundle.defaultAppManager | ApplicationType | PDF = "PDF" | 新增 | 52| ohos.bundle.defaultAppManager | ApplicationType | VIDEO = "VIDEO" | 新增 | 53| ohos.bundle.defaultAppManager | ApplicationType | AUDIO = "AUDIO" | 新增 | 54| ohos.bundle.defaultAppManager | ApplicationType | IMAGE = "IMAGE" | 新增 | 55| ohos.bundle.defaultAppManager | ApplicationType | BROWSER = "BROWSER" | 新增 | 56| packInfo | BundlePackFlag | GET_MODULE_SUMMARY = 0x00000004 | 新增 | 57| packInfo | BundlePackFlag | GET_BUNDLE_SUMMARY = 0x00000002 | 新增 | 58| packInfo | BundlePackFlag | GET_PACKAGES = 0x00000001 | 新增 | 59| packInfo | BundlePackFlag | GET_PACK_INFO_ALL = 0x00000000 | 新增 | 60| packInfo | ApiVersion | readonly target: number; | 新增 | 61| packInfo | ApiVersion | readonly compatible: number; | 新增 | 62| packInfo | ApiVersion | readonly releaseType: string; | 新增 | 63| packInfo | Version | readonly code: number; | 新增 | 64| packInfo | Version | readonly name: string; | 新增 | 65| packInfo | Version | readonly minCompatibleVersionCode: number; | 新增 | 66| packInfo | AbilityFormInfo | readonly defaultDimension: number; | 新增 | 67| packInfo | AbilityFormInfo | readonly supportDimensions: Array\<number>; | 新增 | 68| packInfo | AbilityFormInfo | readonly updateDuration: number; | 新增 | 69| packInfo | AbilityFormInfo | readonly scheduledUpdateTime: string; | 新增 | 70| packInfo | AbilityFormInfo | readonly updateEnabled: boolean; | 新增 | 71| packInfo | AbilityFormInfo | readonly type: string; | 新增 | 72| packInfo | AbilityFormInfo | readonly name: string; | 新增 | 73| packInfo | ModuleAbilityInfo | readonly forms: Array\<AbilityFormInfo>; | 新增 | 74| packInfo | ModuleAbilityInfo | readonly visible: boolean; | 新增 | 75| packInfo | ModuleAbilityInfo | readonly label: string; | 新增 | 76| packInfo | ModuleAbilityInfo | readonly name: string; | 新增 | 77| packInfo | ModuleDistroInfo | readonly moduleType: string; | 新增 | 78| packInfo | ModuleDistroInfo | readonly moduleName: string; | 新增 | 79| packInfo | ModuleDistroInfo | readonly installationFree: boolean; | 新增 | 80| packInfo | ModuleDistroInfo | readonly deliveryWithInstall: boolean; | 新增 | 81| packInfo | ModuleDistroInfo | readonly mainAbility: string; | 新增 | 82| packInfo | ModuleConfigInfo | readonly extensionAbilities: Array\<ExtensionAbilities>; | 新增 | 83| packInfo | ModuleConfigInfo | readonly abilities: Array\<ModuleAbilityInfo>; | 新增 | 84| packInfo | ModuleConfigInfo | readonly distro: ModuleDistroInfo; | 新增 | 85| packInfo | ModuleConfigInfo | readonly deviceType: Array\<string>; | 新增 | 86| packInfo | ModuleConfigInfo | readonly apiVersion: ApiVersion; | 新增 | 87| packInfo | ExtensionAbilities | readonly forms: Array\<AbilityFormInfo>; | 新增 | 88| packInfo | ExtensionAbilities | readonly name: string; | 新增 | 89| packInfo | BundleConfigInfo | readonly version: Version; | 新增 | 90| packInfo | BundleConfigInfo | readonly bundleName: string; | 新增 | 91| packInfo | PackageSummary | readonly modules: Array\<ModuleConfigInfo>; | 新增 | 92| packInfo | PackageSummary | readonly app: BundleConfigInfo; | 新增 | 93| packInfo | PackageConfig | readonly deliveryWithInstall: boolean; | 新增 | 94| packInfo | PackageConfig | readonly moduleType: string; | 新增 | 95| packInfo | PackageConfig | readonly name: string; | 新增 | 96| packInfo | PackageConfig | readonly deviceType: Array\<string>; | 新增 | 97| packInfo | BundlePackInfo | readonly summary: PackageSummary; | 新增 | 98| packInfo | BundlePackInfo | readonly packages: Array\<PackageConfig>; | 新增 | 99| shortcutInfo | ShortcutInfo | readonly moduleName?: string; | 新增 | 100| shortcutInfo | ShortcutWant | readonly targetModule: string; | 新增 |