From 078457ee158a120dae668125719d83cca23a95dd Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Mon, 1 Sep 2025 10:59:01 +0800 Subject: [PATCH] fix recordData Signed-off-by: zhangzezhong --- ...@ohos.app.ability.AtomicServiceOptions.ets | 2 +- ...ohos.app.ability.InsightIntentExecutor.ets | 24 +++++++++---------- .../ets/@ohos.app.ability.OpenLinkOptions.ets | 4 ++-- ....app.ability.UIExtensionContentSession.ets | 16 ++++++------- frameworks/ets/ets/@ohos.app.ability.Want.ets | 2 +- .../ets/@ohos.app.ability.insightIntent.ets | 4 ++-- .../@ohos.app.ability.insightIntentDriver.ets | 2 +- .../ets/ets/@ohos.app.ability.wantAgent.ets | 4 ++-- frameworks/ets/ets/application/CustomData.ets | 4 ++-- .../ets/ets/application/UIAbilityContext.ets | 10 ++++---- frameworks/ets/ets/wantAgent/triggerInfo.ets | 8 +++---- .../ets/ets/wantAgent/wantAgentInfo.ets | 8 +++---- 12 files changed, 44 insertions(+), 44 deletions(-) diff --git a/frameworks/ets/ets/@ohos.app.ability.AtomicServiceOptions.ets b/frameworks/ets/ets/@ohos.app.ability.AtomicServiceOptions.ets index 93b3c416704..3cd0dea4410 100644 --- a/frameworks/ets/ets/@ohos.app.ability.AtomicServiceOptions.ets +++ b/frameworks/ets/ets/@ohos.app.ability.AtomicServiceOptions.ets @@ -18,5 +18,5 @@ import { RecordData } from '@ohos.base'; export default class AtomicServiceOptions extends StartOptions { flags?: int; - parameters?: RecordData; + parameters?: Record; } \ No newline at end of file diff --git a/frameworks/ets/ets/@ohos.app.ability.InsightIntentExecutor.ets b/frameworks/ets/ets/@ohos.app.ability.InsightIntentExecutor.ets index 2cf3376ec9b..74b5ec0da52 100644 --- a/frameworks/ets/ets/@ohos.app.ability.InsightIntentExecutor.ets +++ b/frameworks/ets/ets/@ohos.app.ability.InsightIntentExecutor.ets @@ -29,9 +29,9 @@ export default class InsightIntentExecutor { public native nativeOnExecuteResult(data: insightIntent.ExecuteResult): void; - public callOnExecuteInUIAbilityForegroundMode(name: string, param: Record, + public callOnExecuteInUIAbilityForegroundMode(name: string, param: Record, pageLoader: window.WindowStage): insightIntent.ExecuteResult { - let p = this.onExecuteInUIAbilityForegroundMode(name, param as RecordData, pageLoader); + let p = this.onExecuteInUIAbilityForegroundMode(name, param, pageLoader); if (p instanceof Promise) { this.isOnExecuteInUIAbilityForegroundModeAsync = true; p.then((result: insightIntent.ExecuteResult): void => { @@ -45,9 +45,9 @@ export default class InsightIntentExecutor { } } - public callOnExecuteInUIAbilityBackgroundMode(name: string, param: Record): + public callOnExecuteInUIAbilityBackgroundMode(name: string, param: Record): insightIntent.ExecuteResult { - let p = this.onExecuteInUIAbilityBackgroundMode(name, param as RecordData); + let p = this.onExecuteInUIAbilityBackgroundMode(name, param); if (p instanceof Promise) { this.isOnExecuteInUIAbilityBackgroundModeAsync = true; p.then((result: insightIntent.ExecuteResult): void => { @@ -61,9 +61,9 @@ export default class InsightIntentExecutor { } } - public callOnExecuteInUIExtensionAbility(name: string, param: Record, + public callOnExecuteInUIExtensionAbility(name: string, param: Record, pageLoader: UIExtensionContentSession): insightIntent.ExecuteResult { - let p = this.onExecuteInUIExtensionAbility(name, param as RecordData, pageLoader); + let p = this.onExecuteInUIExtensionAbility(name, param, pageLoader); if (p instanceof Promise) { this.isOnExecuteInUIExtensionAbilityAsync = true; p.then((result: insightIntent.ExecuteResult): void => { @@ -77,9 +77,9 @@ export default class InsightIntentExecutor { } } - public callOnExecuteInServiceExtensionAbility(name: string, param: Record): + public callOnExecuteInServiceExtensionAbility(name: string, param: Record): insightIntent.ExecuteResult { - let p = this.onExecuteInServiceExtensionAbility(name, param as RecordData); + let p = this.onExecuteInServiceExtensionAbility(name, param); if (p instanceof Promise) { this.isOnExecuteInServiceExtensionAbilityAsync = true; p.then((result: insightIntent.ExecuteResult): void => { @@ -93,25 +93,25 @@ export default class InsightIntentExecutor { } } - onExecuteInUIAbilityForegroundMode(name: string, param: RecordData, pageLoader: window.WindowStage): + onExecuteInUIAbilityForegroundMode(name: string, param: Record, pageLoader: window.WindowStage): insightIntent.ExecuteResult | Promise { let ret: insightIntent.ExecuteResult = {code: 0}; return ret; } - onExecuteInUIAbilityBackgroundMode(name: string, param: RecordData): + onExecuteInUIAbilityBackgroundMode(name: string, param: Record): insightIntent.ExecuteResult | Promise { let ret: insightIntent.ExecuteResult = {code: 0}; return ret; } - onExecuteInUIExtensionAbility(name: string, param: RecordData, pageLoader: UIExtensionContentSession): + onExecuteInUIExtensionAbility(name: string, param: Record, pageLoader: UIExtensionContentSession): insightIntent.ExecuteResult | Promise { let ret: insightIntent.ExecuteResult = {code: 0}; return ret; } - onExecuteInServiceExtensionAbility(name: string, param: RecordData): + onExecuteInServiceExtensionAbility(name: string, param: Record): insightIntent.ExecuteResult | Promise { let ret: insightIntent.ExecuteResult = {code: 0}; return ret; diff --git a/frameworks/ets/ets/@ohos.app.ability.OpenLinkOptions.ets b/frameworks/ets/ets/@ohos.app.ability.OpenLinkOptions.ets index 683e8cd532c..6299db81749 100644 --- a/frameworks/ets/ets/@ohos.app.ability.OpenLinkOptions.ets +++ b/frameworks/ets/ets/@ohos.app.ability.OpenLinkOptions.ets @@ -17,10 +17,10 @@ import { RecordData } from '@ohos.base'; export default interface OpenLinkOptions { appLinkingOnly?: boolean; - parameters?: RecordData; + parameters?: Record; } class OpenLinkOptionsImpl implements OpenLinkOptions { appLinkingOnly?: boolean|undefined; - parameters?: RecordData|undefined; + parameters?: Record|undefined; } diff --git a/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets b/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets index 41b871e991c..bb7fe873a25 100644 --- a/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets +++ b/frameworks/ets/ets/@ohos.app.ability.UIExtensionContentSession.ets @@ -51,7 +51,7 @@ export default class UIExtensionContentSession { } this.registerCleaner(this.nativeContextSession) } - native nativeSendData(data: Record): void; + native nativeSendData(data: Record): void; native loadContent(path: string, storage?: LocalStorage): void; native setWindowBackgroundColor(color: string): void; native getUIExtensionHostWindowProxy(): uiExtensionHost.UIExtensionHostWindowProxy; @@ -60,11 +60,11 @@ export default class UIExtensionContentSession { native nativeSetReceiveDataForResultCallback(callback: (data: Record) => Record): void; native terminateSelfSync(callback:AsyncCallbackWrapper): void; native terminateSelfWithResultSync(parameter: AbilityResult, callback:AsyncCallbackWrapper): void; - private native nativeStartAbilityByTypeSync(type: string, wantParam: Record, startCallback: AbilityStartCallback): BusinessError; + private native nativeStartAbilityByTypeSync(type: string, wantParam: Record, startCallback: AbilityStartCallback): BusinessError; native nativeSetWindowPrivacyMode(isPrivacyMode: boolean, callback:AsyncCallbackWrapper): void; - sendData(data: RecordData): void { - this.nativeSendData(data as Record); + sendData(data: Record): void { + this.nativeSendData(data); } setReceiveDataCallback(callback: (data: Record) => void): void { @@ -121,10 +121,10 @@ export default class UIExtensionContentSession { return p; } - startAbilityByType(type: string, wantParam: RecordData, startCallback: AbilityStartCallback, + startAbilityByType(type: string, wantParam: Record, startCallback: AbilityStartCallback, callback: AsyncCallback): void { let p1 = taskpool.execute((): BusinessError => { - return this.nativeStartAbilityByTypeSync(type, wantParam as Record, startCallback); + return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); p1.then((e: NullishType) => { let retError = e as BusinessError; @@ -138,11 +138,11 @@ export default class UIExtensionContentSession { }); } - startAbilityByType(type: string, wantParam: RecordData, + startAbilityByType(type: string, wantParam: Record, startCallback: AbilityStartCallback): Promise { let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { let p1 = taskpool.execute((): BusinessError => { - return this.nativeStartAbilityByTypeSync(type, wantParam as Record, startCallback); + return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); p1.then((e: NullishType) => { let retError = e as BusinessError; diff --git a/frameworks/ets/ets/@ohos.app.ability.Want.ets b/frameworks/ets/ets/@ohos.app.ability.Want.ets index 8e926a2357f..0eb0cec5513 100644 --- a/frameworks/ets/ets/@ohos.app.ability.Want.ets +++ b/frameworks/ets/ets/@ohos.app.ability.Want.ets @@ -399,7 +399,7 @@ export default class Want { type?: string; flags?: int; action?: string; - parameters?: RecordData; + parameters?: Record; entities?: Array; moduleName?: string; readonly fds?: Record; diff --git a/frameworks/ets/ets/@ohos.app.ability.insightIntent.ets b/frameworks/ets/ets/@ohos.app.ability.insightIntent.ets index 1667a11434d..2e2a225bf35 100644 --- a/frameworks/ets/ets/@ohos.app.ability.insightIntent.ets +++ b/frameworks/ets/ets/@ohos.app.ability.insightIntent.ets @@ -28,14 +28,14 @@ namespace insightIntent { export interface ExecuteResult { code: int; - result?: RecordData; + result?: Record; uris?: Array; flags?: int; } export class ExecuteResultInner implements ExecuteResult{ code: int; - result?: RecordData; + result?: Record; uris?: Array; flags?: int; } diff --git a/frameworks/ets/ets/@ohos.app.ability.insightIntentDriver.ets b/frameworks/ets/ets/@ohos.app.ability.insightIntentDriver.ets index 9400c228a80..57542888df3 100644 --- a/frameworks/ets/ets/@ohos.app.ability.insightIntentDriver.ets +++ b/frameworks/ets/ets/@ohos.app.ability.insightIntentDriver.ets @@ -28,7 +28,7 @@ export default namespace insightIntentDriver { moduleName: string; abilityName: string; insightIntentName: string; - insightIntentParam: RecordData; + insightIntentParam: Record; executeMode: insightIntent.ExecuteMode; displayId?: long; uris?: Array; diff --git a/frameworks/ets/ets/@ohos.app.ability.wantAgent.ets b/frameworks/ets/ets/@ohos.app.ability.wantAgent.ets index 92014f47253..8a153dac7ae 100644 --- a/frameworks/ets/ets/@ohos.app.ability.wantAgent.ets +++ b/frameworks/ets/ets/@ohos.app.ability.wantAgent.ets @@ -323,7 +323,7 @@ namespace wantAgent { want: Want; finalCode: int; finalData: string; - extraInfo?: RecordData; + extraInfo?: Record; } class CompleteDataImpl implements CompleteData { @@ -331,7 +331,7 @@ namespace wantAgent { public want: Want; public finalCode: int; public finalData: string; - public extraInfo?: RecordData; + public extraInfo?: Record; } export type TriggerInfo = _TriggerInfo; diff --git a/frameworks/ets/ets/application/CustomData.ets b/frameworks/ets/ets/application/CustomData.ets index 2f1a7d3dbd1..d657fae1e50 100644 --- a/frameworks/ets/ets/application/CustomData.ets +++ b/frameworks/ets/ets/application/CustomData.ets @@ -15,9 +15,9 @@ import { RecordData } from '@ohos.base'; export default interface CustomData { - data: RecordData; + data: Record; } class CustomDataInner implements CustomData { - public data: RecordData = {}; + public data: Record = {}; } \ No newline at end of file diff --git a/frameworks/ets/ets/application/UIAbilityContext.ets b/frameworks/ets/ets/application/UIAbilityContext.ets index 87d95d25f5b..df5a451dd7f 100644 --- a/frameworks/ets/ets/application/UIAbilityContext.ets +++ b/frameworks/ets/ets/application/UIAbilityContext.ets @@ -134,7 +134,7 @@ export default class UIAbilityContext extends Context { private native nativeChangeAbilityVisibility(isShow: boolean, callback: AsyncCallbackWrapper): void; - private native nativeStartAbilityByTypeSync(type: string, wantParam: Record, + private native nativeStartAbilityByTypeSync(type: string, wantParam: Record, startCallback: AbilityStartCallback): BusinessError; private native nativeSetAbilityInstanceInfo(label: string, icon: image.PixelMap, callback: AsyncCallbackWrapper): void; @@ -460,10 +460,10 @@ export default class UIAbilityContext extends Context { this.nativeSetColorMode(colorMode); } - startAbilityByType(type: string, wantParam: RecordData, startCallback: AbilityStartCallback, + startAbilityByType(type: string, wantParam: Record, startCallback: AbilityStartCallback, callback: AsyncCallback): void { let p1 = taskpool.execute((): BusinessError => { - return this.nativeStartAbilityByTypeSync(type, wantParam as Record, startCallback); + return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); p1.then((e: NullishType) => { let retError = e as BusinessError; @@ -511,11 +511,11 @@ hideAbility(): Promise { return p; } - startAbilityByType(type: string, wantParam: RecordData, + startAbilityByType(type: string, wantParam: Record, startCallback: AbilityStartCallback): Promise { let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { let p1 = taskpool.execute((): BusinessError => { - return this.nativeStartAbilityByTypeSync(type, wantParam as Record, startCallback); + return this.nativeStartAbilityByTypeSync(type, wantParam, startCallback); }); p1.then((e: NullishType) => { let retError = e as BusinessError; diff --git a/frameworks/ets/ets/wantAgent/triggerInfo.ets b/frameworks/ets/ets/wantAgent/triggerInfo.ets index dc098bf13ff..c19d4dc550d 100644 --- a/frameworks/ets/ets/wantAgent/triggerInfo.ets +++ b/frameworks/ets/ets/wantAgent/triggerInfo.ets @@ -21,8 +21,8 @@ export interface TriggerInfo { code: number; want?: Want; permission?: string; - extraInfo?: RecordData; - extraInfos?: RecordData; + extraInfo?: Record; + extraInfos?: Record; startOptions?: StartOptions; } @@ -30,7 +30,7 @@ class TriggerInfoImpl implements TriggerInfo { public code: number; public want?: Want; public permission?: string; - public extraInfo?: RecordData; - public extraInfos?: RecordData; + public extraInfo?: Record; + public extraInfos?: Record; public startOptions?: StartOptions; } diff --git a/frameworks/ets/ets/wantAgent/wantAgentInfo.ets b/frameworks/ets/ets/wantAgent/wantAgentInfo.ets index d1f23ac97c6..ce2f86ee508 100644 --- a/frameworks/ets/ets/wantAgent/wantAgentInfo.ets +++ b/frameworks/ets/ets/wantAgent/wantAgentInfo.ets @@ -23,8 +23,8 @@ export interface WantAgentInfo { actionType?: abilityWantAgent.OperationType; requestCode: number; actionFlags?: Array; - extraInfo?: RecordData; - extraInfos?: RecordData; + extraInfo?: Record; + extraInfos?: Record; } class WantAgentInfoImpl implements WantAgentInfo { @@ -32,8 +32,8 @@ class WantAgentInfoImpl implements WantAgentInfo { public actionType?: abilityWantAgent.OperationType; public requestCode: number; public actionFlags?: Array; - public extraInfo?: RecordData; - public extraInfos?: RecordData; + public extraInfo?: Record; + public extraInfos?: Record; constructor(wants: Array) { this.wants = wants; -- Gitee