openharmony 鸿蒙 changelogs-ability

2023-02-03 浏览 (686)

元能力子系统ChangeLog

cl.ability.1 SystemAPI使用规则变更

目前元能力提供的system-api在调用时未做系统应用校验,三方应用使用Full版本的SDK就可以使用这些system-api,存在安全隐患,因此在OpenHarmony 4.0.2.1版本开始增加应用身份校验。

变更影响

只有系统应用允许使用system-api,三方应用使用system-api将返回202错误,返回202错误的方式有两种:1.抛异常;2.异步回调

关键接口/组件变更

system-api列表如下所示。

模块名方法返回错误码方式
@ohos.app.ability.abilityManager.d.tsupdateConfiguration(config: Configuration, callback: AsyncCallback): void异步回调
@ohos.app.ability.abilityManager.d.tsupdateConfiguration(config: Configuration): Promise异步回调
@ohos.app.ability.abilityManager.d.tsgetAbilityRunningInfos(): Promise<Array>异步回调
@ohos.app.ability.abilityManager.d.tsgetAbilityRunningInfos(callback: AsyncCallback<Array>): void异步回调
@ohos.app.ability.abilityManager.d.tsgetExtensionRunningInfos(upperLimit: number): Promise<Array>异步回调
@ohos.app.ability.abilityManager.d.tsgetExtensionRunningInfos(upperLimit: number, callback: AsyncCallback<Array>): void异步回调
@ohos.app.ability.abilityManager.d.tsgetTopAbility(): Promise抛异常
@ohos.app.ability.abilityManager.d.tsgetTopAbility(callback: AsyncCallback): void抛异常
@ohos.app.ability.appManager.d.tson(type: "applicationState", observer: ApplicationStateObserver): number异步回调
@ohos.app.ability.appManager.d.tson(type: "applicationState", observer: ApplicationStateObserver, bundleNameList: Array): number异步回调
@ohos.app.ability.appManager.d.tsoff(type: "applicationState", observerId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.appManager.d.tsoff(type: "applicationState", observerId: number): Promise异步回调
@ohos.app.ability.appManager.d.tsgetForegroundApplications(callback: AsyncCallback<Array>): void异步回调
@ohos.app.ability.appManager.d.tsgetForegroundApplications(): Promise<Array>异步回调
@ohos.app.ability.appManager.d.tskillProcessWithAccount(bundleName: string, accountId: number): Promise异步回调
@ohos.app.ability.appManager.d.tskillProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.appManager.d.tskillProcessesByBundleName(bundleName: string): Promise异步回调
@ohos.app.ability.appManager.d.tskillProcessesByBundleName(bundleName: string, callback: AsyncCallback)异步回调
@ohos.app.ability.appManager.d.tsclearUpApplicationData(bundleName: string): Promise异步回调
@ohos.app.ability.appManager.d.tsclearUpApplicationData(bundleName: string, callback: AsyncCallback)异步回调
@ohos.app.ability.missionManager.d.tson(type: "mission", listener: MissionListener): number异步回调
@ohos.app.ability.missionManager.d.tsoff(type: "mission", listenerId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsoff(type: "mission", listenerId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tsgetMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsgetMissionInfo(deviceId: string, missionId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tsgetMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback<Array>): void异步回调
@ohos.app.ability.missionManager.d.tsgetMissionInfos(deviceId: string, numMax: number): Promise<Array>异步回调
@ohos.app.ability.missionManager.d.tsgetMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsgetMissionSnapShot(deviceId: string, missionId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tsgetLowResolutionMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsgetLowResolutionMissionSnapShot(deviceId: string, missionId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tslockMission(missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tslockMission(missionId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tsunlockMission(missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsunlockMission(missionId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tsclearMission(missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsclearMission(missionId: number): Promise异步回调
@ohos.app.ability.missionManager.d.tsclearAllMissions(callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsclearAllMissions(): Promise异步回调
@ohos.app.ability.missionManager.d.tsmoveMissionToFront(missionId: number, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsmoveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCallback): void异步回调
@ohos.app.ability.missionManager.d.tsmoveMissionToFront(missionId: number, options?: StartOptions): Promise异步回调
@ohos.app.ability.quickFixManager.d.tsapplyQuickFix(hapModuleQuickFixFiles: Array, callback: AsyncCallback): void异步回调
@ohos.app.ability.quickFixManager.d.tsapplyQuickFix(hapModuleQuickFixFiles: Array): Promise异步回调
@ohos.app.ability.quickFixManager.d.tsgetApplicationQuickFixInfo(bundleName: string, callback: AsyncCallback): void异步回调
@ohos.app.ability.quickFixManager.d.tsgetApplicationQuickFixInfo(bundleName: string): Promise异步回调
@ohos.app.ability.wantAgent.d.tsgetWant(agent: WantAgent, callback: AsyncCallback): void异步回调
@ohos.app.ability.wantAgent.d.tsgetWant(agent: WantAgent): Promise异步回调
@ohos.app.form.formHost.d.tsdeleteForm(formId: string, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsdeleteForm(formId: string): Promise异步回调
@ohos.app.form.formHost.d.tsreleaseForm(formId: string, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsreleaseForm(formId: string, isReleaseCache: boolean, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsreleaseForm(formId: string, isReleaseCache?: boolean): Promise异步回调
@ohos.app.form.formHost.d.tsrequestForm(formId: string, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsrequestForm(formId: string): Promise异步回调
@ohos.app.form.formHost.d.tscastToNormalForm(formId: string, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tscastToNormalForm(formId: string): Promise异步回调
@ohos.app.form.formHost.d.tsnotifyVisibleForms(formIds: Array, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsnotifyVisibleForms(formIds: Array): Promise异步回调
@ohos.app.form.formHost.d.tsnotifyInvisibleForms(formIds: Array, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsnotifyInvisibleForms(formIds: Array): Promise异步回调
@ohos.app.form.formHost.d.tsenableFormsUpdate(formIds: Array, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsenableFormsUpdate(formIds: Array): Promise异步回调
@ohos.app.form.formHost.d.tsdisableFormsUpdate(formIds: Array, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsdisableFormsUpdate(formIds: Array): Promise异步回调
@ohos.app.form.formHost.d.tsisSystemReady(callback: AsyncCallback): void抛异常
@ohos.app.form.formHost.d.tsisSystemReady(): Promise抛异常
@ohos.app.form.formHost.d.tsgetAllFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void异步回调
@ohos.app.form.formHost.d.tsgetAllFormsInfo(): Promise<Array<formInfo.FormInfo>>异步回调
@ohos.app.form.formHost.d.tsgetFormsInfo(bundleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void异步回调
@ohos.app.form.formHost.d.tsgetFormsInfo(bundleName: string, moduleName: string, callback: AsyncCallback<Array<formInfo.FormInfo>>): void异步回调
@ohos.app.form.formHost.d.tsgetFormsInfo(bundleName: string, moduleName?: string): Promise<Array<formInfo.FormInfo>>异步回调
@ohos.app.form.formHost.d.tsdeleteInvalidForms(formIds: Array, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsdeleteInvalidForms(formIds: Array): Promise异步回调
@ohos.app.form.formHost.d.tsacquireFormState(want: Want, callback: AsyncCallback<formInfo.FormStateInfo>): void异步回调
@ohos.app.form.formHost.d.tsacquireFormState(want: Want): Promise<formInfo.FormStateInfo>异步回调
@ohos.app.form.formHost.d.tson(type: "formUninstall", callback: Callback): void抛异常
@ohos.app.form.formHost.d.tsoff(type: "formUninstall", callback?: Callback): void抛异常
@ohos.app.form.formHost.d.tsnotifyFormsVisible(formIds: Array, isVisible: boolean, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsnotifyFormsVisible(formIds: Array, isVisible: boolean): Promise异步回调
@ohos.app.form.formHost.d.tsnotifyFormsEnableUpdate(formIds: Array, isEnableUpdate: boolean, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsnotifyFormsEnableUpdate(formIds: Array, isEnableUpdate: boolean): Promise异步回调
@ohos.app.form.formHost.d.tsshareForm(formId: string, deviceId: string, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsshareForm(formId: string, deviceId: string): Promise异步回调
@ohos.app.form.formHost.d.tsnotifyFormsPrivacyProtected(formIds: Array, isProtected: boolean, callback: AsyncCallback): void异步回调
@ohos.app.form.formHost.d.tsnotifyFormsPrivacyProtected(formIds: Array, isProtected: boolean): Promise异步回调
@ohos.app.form.formProvider.d.tsrequestPublishForm(want: Want, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback): void异步回调
@ohos.app.form.formProvider.d.tsrequestPublishForm(want: Want, callback: AsyncCallback): void异步回调
@ohos.app.form.formProvider.d.tsrequestPublishForm(want: Want, formBindingData?: formBindingData.FormBindingData): Promise异步回调
@ohos.app.form.formProvider.d.tsisRequestPublishFormSupported(callback: AsyncCallback): void抛异常
@ohos.app.form.formProvider.d.tsisRequestPublishFormSupported(): Promise抛异常
UIAbilityContext.d.tsstartAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tsstartAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tsstartAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise异步回调
UIAbilityContext.d.tsstartAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback): void抛异常
UIAbilityContext.d.tsstartAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void抛异常
UIAbilityContext.d.tsstartAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise抛异常
UIAbilityContext.d.tsstartServiceExtensionAbility(want: Want, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tsstartServiceExtensionAbility(want: Want): Promise异步回调
UIAbilityContext.d.tsstartServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tsstartServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise异步回调
UIAbilityContext.d.tsstopServiceExtensionAbility(want: Want, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tsstopServiceExtensionAbility(want: Want): Promise异步回调
UIAbilityContext.d.tsstopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tsstopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise异步回调
UIAbilityContext.d.tsconnectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number异步回调
UIAbilityContext.d.tssetMissionIcon(icon: image.PixelMap, callback: AsyncCallback): void异步回调
UIAbilityContext.d.tssetMissionIcon(icon: image.PixelMap): Promise异步回调
ServiceExtensionContext.d.tsstartAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void异步回调
ServiceExtensionContext.d.tsstartAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback): void异步回调
ServiceExtensionContext.d.tsstartAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise异步回调
ServiceExtensionContext.d.tsstartServiceExtensionAbility(want: Want, callback: AsyncCallback): void异步回调
ServiceExtensionContext.d.tsstartServiceExtensionAbility(want: Want): Promise异步回调
ServiceExtensionContext.d.tsstartServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void异步回调
ServiceExtensionContext.d.tsstartServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise异步回调
ServiceExtensionContext.d.tsstopServiceExtensionAbility(want: Want, callback: AsyncCallback): void异步回调
ServiceExtensionContext.d.tsstopServiceExtensionAbility(want: Want): Promise异步回调
ServiceExtensionContext.d.tsstopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void异步回调
ServiceExtensionContext.d.tsstopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise异步回调
ServiceExtensionContext.d.tsconnectServiceExtensionAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number异步回调
Context.d.tscreateBundleContext(bundleName: string): Context抛异常
Context.d.tscreateModuleContext(bundleName: string, moduleName: string): Context抛异常
FormExtensionContext.d.tsstartAbility(want: Want, callback: AsyncCallback): void异步回调
FormExtensionContext.d.tsstartAbility(want: Want): Promise异步回调

你可能感兴趣的鸿蒙文章

harmony 鸿蒙web子系统ChangeLog

harmony 鸿蒙蓝牙服务子系统ChangeLog

harmony 鸿蒙分布式数据管理子系统JS API变更Changelog

harmony 鸿蒙文件管理子系统ChangeLog

harmony 鸿蒙全球化子系统ChangeLog

harmony 鸿蒙媒体子系统ChangeLog

harmony 鸿蒙测试子系统ChangeLog

harmony 鸿蒙USB服务子系统ChangeLog

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