harmony 鸿蒙窗口子系统变更说明

  • 2025-06-16
  • 浏览 (2)

窗口子系统变更说明

cl.window.1 OH_NativeWindowManager_RegisterKeyEventFilter接口注册的回调事件中,回调函数参数Input_KeyEvent注入变更

访问级别

公开接口

变更原因

修复回调函数注入Input_KeyEvent结构体的Input_KeyEventAction字段时,注入值无法匹配枚举的bug。变更前注入Input_KeyEventAction的值为1、2、3分别对应取消(KEY_ACTION_CANCEL)、按下(KEY_ACTION_DOWN)和抬起(KEY_ACTION_UP)三种行为,与枚举中定义的0(KEY_ACTION_CANCEL)、1(KEY_ACTION_DOWN)、2(KEY_ACTION_UP)不匹配。

变更影响

该变更为不兼容变更。
变更前,注入Input_KeyEvent中的Input_KeyEventAction为1、2、3,无法匹配枚举。
变更后,注入Input_KeyEvent中的Input_KeyEventAction为0、1、2,匹配枚举。

起始API Level

API 12

变更发生版本

从OpenHarmony 5.0.0.38 版本开始。

变更的接口/组件

OH_NativeWindowManager_RegisterKeyEventFilter接口中,回调函数OH_NativeWindowManager_KeyEventFilter的注入实现。

适配指导

注入行为bug修复,开发者之前用code作硬编码需要改为对应的Input_KeyEventAction枚举。

cl.window.2 startAbility/openLink锁屏时限制拉起行为

访问级别

公开接口

变更原因

锁屏时对任意拉起应用的行为增加限制。

变更影响

该变更为不兼容变更。
变更前:锁屏时可调用startAbility/openLink接口正常拉起应用并正常保持应用窗口为前台状态。
变更后:锁屏时调用startAbility/openLink接口拉起应用时,当应用窗口到前台状态时会被窗口管理阻止进而关闭窗口和应用。

起始API Level

6

变更发生版本

从OpenHarmony SDK 5.0.0.71版本开始。

变更的接口/组件

startAbility/openLink

涉及相关接口:
UIAbilityContext: - startAbility(want: Want, options?: StartOptions) - startAbility(want: Want, callback: AsyncCallback<void>) - startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startAbilityByCall(want: Want) - startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>) - startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>) - startAbilityForResult(want: Want, options?: StartOptions) - startAbilityAsCaller(want: Want, options?: StartOptions) - startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions) - startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback<AbilityResult>) - startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>) - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions) - startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>) - startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>) - startRecentAbility(want: Want, options?: StartOptions) - startRecentAbility(want: Want, callback: AsyncCallback<void>) - startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startAbilityByCallWithAccount(want: Want, accountId: number) - startAbilityAsCaller(want: Want, callback: AsyncCallback<void>) - openLink(link: string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>)

ServiceExtensionContext: - startAbility(want: Want, options?: StartOptions) - startAbility(want: Want, callback: AsyncCallback<void>) - startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions) - startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>) - startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>) - startAbilityByCall(want: Want) - startAbilityAsCaller(want: Want, options?: StartOptions) - startAbilityAsCaller(want: Want, callback: AsyncCallback<void>) - startAbilityAsCaller(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startRecentAbility(want: Want, options?: StartOptions) - startRecentAbility(want: Want, callback: AsyncCallback<void>) - startRecentAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startAbilityByCallWithAccount(want: Want, accountId: number) - openLink(link:string, options?: OpenLinkOptions)

UIExtensionContext: - startAbility(want: Want, options?: StartOptions) - startAbility(want: Want, callback: AsyncCallback<void>) - startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>) - startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>) - startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>) - startAbilityForResult(want: Want, options?: StartOptions) - startAbilityForResultAsCaller(want: Want, options?: StartOptions) - openLink(link:string, options?: OpenLinkOptions, callback?: AsyncCallback<AbilityResult>) - openAtomicService(appId: string, options?: AtomicServiceOptions)

AbilityDelegator: - startAbility(want: Want, callback: AsyncCallback<void>)

InsightIntentContext: - startAbility(want: Want, callback: AsyncCallback<void>)

FeatureAbility: - startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>) - startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>)

StaticSubscriberExtensionContext: - startAbility(want: Want, callback: AsyncCallback<void>)

InputMethodExtensionContext: - startAbility(want: Want)

AccessibilityExtensionContext: - startAbility(want: Want)

FormExtensionContext: - startAbility(want: Want, callback: AsyncCallback<void>)

WindowExtensionContext: - startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>)

适配指导

锁屏时取消对相关接口的调用,否则会关闭被拉起的应用。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Arkts子系统变更说明

harmony 鸿蒙ArkUI子系统Changelog

harmony 鸿蒙全局资源调度子系统Changelog

harmony 鸿蒙分布式数据管理子系统ChangeLog

harmony 鸿蒙输入法子系统Changelog

harmony 鸿蒙媒体子系统Changelog

harmony 鸿蒙多模输入子系统变更说明

harmony 鸿蒙网络子系统Changelog

harmony 鸿蒙应用变更说明

harmony 鸿蒙文件子系统变更说明

0  赞