1# 包管理子系统ChangeLog 2## cl.bundlemanager.1 包管理@ohos.bundle.d.ts中getAllBundleInfo接口底层实现变更。 3 4@ohos.bundle.d.ts中getAllBundleInfo接口已标记废弃,在targetAPILevel为API9及之后的版本镜像上,返回数据列表为空。 5 6**变更影响**<br> 7升级新版本镜像后,使用@ohos.bundle.d.ts中的getAllBundleInfo的接口调用成功后返回数据列表为空。需要应用调用新的接口@ohos.bundle.bundleManager.d.ts中的getAllBundleInfo。 8 9**关键的接口/组件变更**<br> 10底层实现变更,使用@ohos.bundle.d.ts中的getAllBundleInfo的接口调用成功后返回数据列表为空。 11 12**适配指导**<br> 131. 应用在使用@ohos.bundle.d.ts中getAllBundleInfo接口的地方可以修改为使用@ohos.bundle.bundleManager.d.ts中getAllBundleInfo,新接口使用方法可参考[指南](../../../application-dev/reference/apis/js-apis-bundleManager.md#bundlemanagergetallbundleinfo)。 14```ets 15import bundleManager from '@ohos.bundle.bundleManager'; 16``` 17 18## cl.bundlemanager.2 包管理@ohos.bundle.d.ts中getAllApplicationInfo接口底层实现变更。 19 20@ohos.bundle.d.ts中getAllApplicationInfo接口已标记废弃,在targetAPILevel为API9及之后的版本镜像上,返回数据列表为空。 21 22**变更影响**<br> 23升级新版本镜像后,使用@ohos.bundle.d.ts中的getAllApplicationInfo的接口调用成功后返回数据列表为空。需要应用调用新的接口@ohos.bundle.bundleManager.d.ts中的getAllApplicationInfo。 24 25**关键的接口/组件变更**<br> 26底层实现变更,使用@ohos.bundle.d.ts中的getAllApplicationInfo的接口调用成功后返回数据列表为空。 27 28**适配指导**<br> 291. 应用在使用@ohos.bundle.d.ts中getAllApplicationInfo接口的地方可以修改为使用@ohos.bundle.bundleManager.d.ts中getAllApplicationInfo,新接口使用方法可参考[指南](../../../application-dev/reference/apis/js-apis-bundleManager.md#bundlemanagergetallapplicationinfo)。 30```ets 31import bundleManager from '@ohos.bundle.bundleManager'; 32``` 33 34## cl.bundlemanager.3 包管理@ohos.bundle.bundleManager.d.ts中getAllBundleInfo接口权限变更。 35 36获取应用列表接口需要由用户选择是否同意授权,因此将 37@ohos.bundle.bundleManager.d.ts中getAllBundleInfo接口权限变更为ohos.permission.GET_INSTALLED_BUNDLE_LIST。 38 39**变更影响**<br> 40升级新版本镜像后,使用getAllBundleInfo的接口需要申请新的权限ohos.permission.GET_INSTALLED_BUNDLE_LIST,否则接口会调用失败。 41 42**关键的接口/组件变更**<br> 43@ohos.bundle.bundleManager.d.ts中getAllBundleInfo接口权限变更为ohos.permission.GET_INSTALLED_BUNDLE_LIST。 44 45**适配指导**<br> 461. 应用可以在配置文件中新增申请权限ohos.permission.GET_INSTALLED_BUNDLE_LIST。 472. 该权限为user_grant类型的,安装时默认不会授权,需要应用调用弹框接口由用户选择是否授权或者使用预授权进行授权。 483. 使用弹框授权方式可以参考[向用户申请授权](../../../application-dev/security/accesstoken-guidelines.md#向用户申请授权)。 494. 使用预授权方式可以参考[权限预授权](../../../application-dev/security/accesstoken-guidelines.md#user_grant权限预授权)。 50 51## cl.bundlemanager.4 包管理@ohos.bundle.bundleManager.d.ts中getAllApplicationInfo接口权限变更。 52 53获取应用列表接口需要由用户选择是否同意授权,因此将 54@ohos.bundle.bundleManager.d.ts中getAllApplicationInfo接口权限变更为ohos.permission.GET_INSTALLED_BUNDLE_LIST。 55 56**变更影响**<br> 57升级新版本镜像后,使用getAllApplicationInfo的接口需要申请新的权限ohos.permission.GET_INSTALLED_BUNDLE_LIST,否则接口会调用失败。 58 59**关键的接口/组件变更**<br> 60@ohos.bundle.bundleManager.d.ts中getAllApplicationInfo接口权限变更为ohos.permission.GET_INSTALLED_BUNDLE_LIST。 61 62**适配指导**<br> 631. 应用可以在配置文件中新增申请权限ohos.permission.GET_INSTALLED_BUNDLE_LIST。 642. 该权限为user_grant类型的,安装时默认不会授权,需要应用调用弹框接口由用户选择是否授权或者使用预授权进行授权。 653. 使用弹框授权方式可以参考[向用户申请授权](../../../application-dev/security/accesstoken-guidelines.md#向用户申请授权)。 664. 使用预授权方式可以参考[权限预授权](../../../application-dev/security/accesstoken-guidelines.md#user_grant权限预授权)。 67 68## cl.bundlemanager.5 包管理@ohos.bundle.installer.d.ts中getSpecifiedDistributionType接口移动到@ohos.bundle.bundleManager.d.ts中。 69 70包管理@ohos.bundle.installer.d.ts中getSpecifiedDistributionType接口移动到@ohos.bundle.bundleManager.d.ts中。 71 72**变更影响**<br> 73升级新版本SDK后,包管理@ohos.bundle.installer.d.ts中getSpecifiedDistributionType接口移动到@ohos.bundle.bundleManager.d.ts中。 74 75**关键的接口/组件变更**<br> 76包管理@ohos.bundle.installer.d.ts中getSpecifiedDistributionType接口移动到@ohos.bundle.bundleManager.d.ts中。 77 78**适配指导**<br> 791. 修改导入模块,使用bundleManager中的getSpecifiedDistributionType 80```ets 81import bundleManager form '@ohos.bundle.bundleManager' 82``` 83 84## cl.bundlemanager.6 包管理@ohos.bundle.installer.d.ts中getAdditionalInfo接口移动到@ohos.bundle.bundleManager.d.ts中。 85 86包管理@ohos.bundle.installer.d.ts中getAdditionalInfo接口移动到@ohos.bundle.bundleManager.d.ts中。 87 88**变更影响**<br> 89升级新版本SDK后,包管理@ohos.bundle.installer.d.ts中getAdditionalInfo接口移动到@ohos.bundle.bundleManager.d.ts中。 90 91**关键的接口/组件变更**<br> 92包管理@ohos.bundle.installer.d.ts中getAdditionalInfo接口移动到@ohos.bundle.bundleManager.d.ts中。 93 94**适配指导**<br> 951. 修改导入模块,使用bundleManager中的getAdditionalInfo 96```ets 97import bundleManager form '@ohos.bundle.bundleManager' 98``` 99 100## cl.bundlemanager.7 应用配置文件module.json5中proxyDatas更名为proxyData。 101 102由于命名规范问题,proxyDatas更名为proxyData。 103 104**变更影响**<br> 105升级新版本SDK后,proxyDatas更名为proxyData,应用如果不进行适配,将会编译失败。 106 107**关键的接口/组件变更**<br> 108proxyDatas更名为proxyData。 109 110**适配指导**<br> 111请使用proxyData替换proxyDatas,其内容不需要变更。