diff --git a/api/@ohos.ability.errorCode.d.ts b/api/@ohos.ability.errorCode.d.ts
index bf6f1e727c9e094263d2a2759a2b13e80e4951d6..83418a702bb201adf2f760c34ef91791292029a8 100644
--- a/api/@ohos.ability.errorCode.d.ts
+++ b/api/@ohos.ability.errorCode.d.ts
@@ -23,14 +23,16 @@
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 6
+ * @since arkts {'1.1':'6', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export enum ErrorCode {
/**
* Permission denied.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 6
+ * @since arkts {'1.1':'6', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
PERMISSION_DENY = -3,
@@ -38,7 +40,8 @@ export enum ErrorCode {
* Ability not found.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 6
+ * @since arkts {'1.1':'6', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
ABILITY_NOT_FOUND = -2,
@@ -46,7 +49,8 @@ export enum ErrorCode {
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 6
+ * @since arkts {'1.1':'6', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
INVALID_PARAMETER = -1,
@@ -54,7 +58,8 @@ export enum ErrorCode {
* No error.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 6
+ * @since arkts {'1.1':'6', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
NO_ERROR = 0
}
diff --git a/api/@ohos.app.ability.Ability.d.ts b/api/@ohos.app.ability.Ability.d.ts
index 5c7161352dc0b708532ac2df525341ce198b56bd..64786d80b512b74f541644aefa09e1c4ead93478 100644
--- a/api/@ohos.app.ability.Ability.d.ts
+++ b/api/@ohos.app.ability.Ability.d.ts
@@ -18,10 +18,8 @@
* @kit AbilityKit
*/
-/*** if arkts 1.1 */
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import { Configuration } from './@ohos.app.ability.Configuration';
-/*** endif */
/**
* The class of an ability.
@@ -39,7 +37,7 @@ import { Configuration } from './@ohos.app.ability.Configuration';
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
-export default class Ability {
+declare class Ability {
/**
* Called when the system configuration is updated.
*
@@ -55,7 +53,8 @@ export default class Ability {
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @atomicservice
- * @since 11
+ * @since arkts{'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onConfigurationUpdate(newConfig: Configuration): void;
@@ -78,7 +77,10 @@ export default class Ability {
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @atomicservice
- * @since 11
+ * @since arkts{'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onMemoryLevel(level: AbilityConstant.MemoryLevel): void;
}
+
+export default Ability;
\ No newline at end of file
diff --git a/api/@ohos.app.ability.AbilityConstant.d.ts b/api/@ohos.app.ability.AbilityConstant.d.ts
index 7cb205beed24e2286e4b9ffa2ae4071cc98ed116..6e9cebcddabd7725cf9a169b1a81fc81e0857e84 100644
--- a/api/@ohos.app.ability.AbilityConstant.d.ts
+++ b/api/@ohos.app.ability.AbilityConstant.d.ts
@@ -204,14 +204,14 @@ declare namespace AbilityConstant {
/**
* ID of the process where the ability is running when it exits last time.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- pid: number;
+ pid: int;
/**
* Name of the process.
@@ -228,26 +228,26 @@ declare namespace AbilityConstant {
/**
* UID of the application.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* Specific reason for the last exit of the ability.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- exitSubReason: number;
+ exitSubReason: int;
/**
* Reason why the process was killed.
@@ -264,38 +264,38 @@ declare namespace AbilityConstant {
/**
* RSS value of the process.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- rss: number;
+ rss: int;
/**
* PSS value of the process.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- pss: number;
+ pss: int;
/**
* Exact time when the ability last exits.
*
- * @type { number }
+ * @type { long }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- timestamp: number;
+ timestamp: long;
/**
* The process state when the process exits.
diff --git a/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts b/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts
index 18504ab7ef9499cfcdad1748bbb21574adb66679..2bcbc1885c28151f6e50321272f74ee1ce7866be 100644
--- a/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts
+++ b/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts
@@ -18,6 +18,7 @@
* @kit AbilityKit
*/
+/*** if arkts 1.1 */
/**
* The application state change callback.
*
@@ -43,6 +44,39 @@
* @since 18
*/
export default class ApplicationStateChangeCallback {
+/*** endif */
+
+/*** if arkts 1.2 */
+/**
+ * The application state change callback.
+ *
+ * @typedef ApplicationStateChangeCallback
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @StageModelOnly
+ * @since 10
+ */
+/**
+ * The application state change callback.
+ *
+ * @typedef ApplicationStateChangeCallback
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @StageModelOnly
+ * @atomicservice
+ * @since 11
+ */
+/**
+ * The application state change callback.
+ *
+ * @typedef ApplicationStateChangeCallback
+ * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
+ * @StageModelOnly
+ * @crossplatform
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+declare interface ApplicationStateChangeCallback {
+/*** endif */
/**
* Called back when the state of the application changes to foreground.
*
@@ -65,7 +99,8 @@ export default class ApplicationStateChangeCallback {
* @StageModelOnly
* @crossplatform
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onApplicationForeground(): void;
@@ -91,7 +126,12 @@ export default class ApplicationStateChangeCallback {
* @StageModelOnly
* @crossplatform
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onApplicationBackground(): void;
}
+
+/*** if arkts 1.2 */
+export default ApplicationStateChangeCallback;
+/*** endif */
\ No newline at end of file
diff --git a/api/@ohos.app.ability.AtomicServiceOptions.d.ts b/api/@ohos.app.ability.AtomicServiceOptions.d.ts
index ed9c8f152617cf89f62e041ec8977d6c005276e3..f2752ca671e607913f352adca86d24bea02658a2 100644
--- a/api/@ohos.app.ability.AtomicServiceOptions.d.ts
+++ b/api/@ohos.app.ability.AtomicServiceOptions.d.ts
@@ -28,19 +28,21 @@ import StartOptions from './@ohos.app.ability.StartOptions';
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export default class AtomicServiceOptions extends StartOptions {
/**
* The options of the flags in this AtomicServiceOptions.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- flags?: number;
+ flags?: int;
/**
* The description of the WantParams object in an AtomicServiceOptions
@@ -49,7 +51,8 @@ export default class AtomicServiceOptions extends StartOptions {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
parameters?: Record;
diff --git a/api/@ohos.app.ability.Configuration.d.ts b/api/@ohos.app.ability.Configuration.d.ts
index e8139c14bc5cfb41c8e5788bb1948de0cb78e1d2..94322a7f338c7a43467efbac407e0cfaded4da79 100644
--- a/api/@ohos.app.ability.Configuration.d.ts
+++ b/api/@ohos.app.ability.Configuration.d.ts
@@ -164,13 +164,13 @@ export interface Configuration {
/**
* Indicates the displayId of the current device.
*
- * @type { ?number }
+ * @type { ?long }
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- displayId?: number;
+ displayId?: long;
/**
* Indicates whether a pointer type device has connected.
@@ -211,25 +211,25 @@ export interface Configuration {
/**
* Indicates the font size scale.
*
- * @type { ?number }
+ * @type { ?double }
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- fontSizeScale?: number;
+ fontSizeScale?: double;
/**
* Indicates the font weight scale.
*
- * @type { ?number }
+ * @type { ?double }
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- fontWeightScale?: number;
+ fontWeightScale?: double;
/**
* Indicates the mobile country code.
diff --git a/api/@ohos.app.ability.EnvironmentCallback.d.ts b/api/@ohos.app.ability.EnvironmentCallback.d.ts
index 7eaea804e905e5eeac25c1362c9b40743843305f..9f5a4b9013c2287b8169a418a834a043fbc281ed 100644
--- a/api/@ohos.app.ability.EnvironmentCallback.d.ts
+++ b/api/@ohos.app.ability.EnvironmentCallback.d.ts
@@ -21,6 +21,7 @@
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import { Configuration } from './@ohos.app.ability.Configuration';
+/*** if arkts 1.1 */
/**
* The environment callback.
*
@@ -35,6 +36,27 @@ import { Configuration } from './@ohos.app.ability.Configuration';
* @since 11
*/
export default class EnvironmentCallback {
+/*** endif */
+
+/*** if arkts 1.2 */
+/**
+ * The environment callback.
+ *
+ * @typedef EnvironmentCallback
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 9
+ */
+/**
+ * The environment callback.
+ *
+ * @typedef EnvironmentCallback
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+declare interface EnvironmentCallback {
+/*** endif */
/**
* Called when the system configuration is updated.
*
@@ -50,7 +72,8 @@ export default class EnvironmentCallback {
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onConfigurationUpdated(config: Configuration): void;
@@ -71,7 +94,12 @@ export default class EnvironmentCallback {
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onMemoryLevel(level: AbilityConstant.MemoryLevel): void;
}
+
+/*** if arkts 1.2 */
+export default EnvironmentCallback;
+/*** endif */
\ No newline at end of file
diff --git a/api/@ohos.app.ability.InsightIntentContext.d.ts b/api/@ohos.app.ability.InsightIntentContext.d.ts
index 89e087146f0fe30a9a60e21849c2ada767e3b3e0..d60333a7279cc3735f0d4dd6327c022ebb92ac56 100644
--- a/api/@ohos.app.ability.InsightIntentContext.d.ts
+++ b/api/@ohos.app.ability.InsightIntentContext.d.ts
@@ -57,7 +57,8 @@ declare class InsightIntentContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbility(want: Want, callback: AsyncCallback): void;
@@ -87,7 +88,8 @@ declare class InsightIntentContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbility(want: Want): Promise;
}
diff --git a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts
index 9fb19d970b90c60f6b803e15176137b68f65b738..11b9aeb82a3a4d20fe94efb04a4c85635cb6dcc9 100644
--- a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts
+++ b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts
@@ -72,7 +72,7 @@ declare class ServiceExtensionAbility {
* Called back when a service extension is started.
*
* @param { Want } want - Indicates the want of service extension to start.
- * @param { number } startId - Indicates the number of times the service extension has been started.
+ * @param { int } startId - Indicates the number of times the service extension has been started.
* The {@code startId} is incremented by 1 every time the service extension is started.
* For example, if the service extension has been started for six times.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
@@ -81,7 +81,7 @@ declare class ServiceExtensionAbility {
* @since arkts {'1.1':'9', '1.2':'20'}
* @arkts 1.1&1.2
*/
- onRequest(want: Want, startId: number): void;
+ onRequest(want: Want, startId: int): void;
/**
* Called back when a service extension is first connected to an ability.
@@ -169,7 +169,8 @@ declare class ServiceExtensionAbility {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @StageModelOnly
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onDump(params: Array): Array;
}
diff --git a/api/@ohos.app.ability.ShareExtensionAbility.d.ts b/api/@ohos.app.ability.ShareExtensionAbility.d.ts
index 8f6013e83d1fe3e7e1f6bb1905b2b6f267276e7b..bcedcbbf4420e44ff6bc7b85163c1f2394018cdd 100644
--- a/api/@ohos.app.ability.ShareExtensionAbility.d.ts
+++ b/api/@ohos.app.ability.ShareExtensionAbility.d.ts
@@ -26,7 +26,8 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
* @extends UIExtensionAbility
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export default class ShareExtensionAbility extends UIExtensionAbility {
}
\ No newline at end of file
diff --git a/api/@ohos.app.ability.StartOptions.d.ts b/api/@ohos.app.ability.StartOptions.d.ts
index 662b8f961f7c778673842f49d8fb00e704150497..fa2ed142893f8f0259389b9d78aec0b63dfd8b85 100644
--- a/api/@ohos.app.ability.StartOptions.d.ts
+++ b/api/@ohos.app.ability.StartOptions.d.ts
@@ -48,13 +48,13 @@ export default class StartOptions {
* {@link ohos.app.ability.AbilityConstant#WindowMode.WINDOW_MODE_SPLIT_SECONDARY} are
* valid only in intra-app redirection scenarios.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- windowMode?: number;
+ windowMode?: int;
/**
* The type of displayId
@@ -67,14 +67,14 @@ export default class StartOptions {
/**
* The type of displayId
*
- * @type { ?number }
+ * @type { ?long }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- displayId?: number;
+ displayId?: long;
/**
* The target ability with animation or without
@@ -90,46 +90,46 @@ export default class StartOptions {
/**
* The left position of window rectangle
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- windowLeft?: number;
+ windowLeft?: int;
/**
* The top position of window rectangle
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- windowTop?: number;
+ windowTop?: int;
/**
* The width of window rectangle
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- windowWidth?: number;
+ windowWidth?: int;
/**
* The height of window rectangle
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- windowHeight?: number;
+ windowHeight?: int;
/**
* Indicates the cold startup window is focused.
@@ -205,46 +205,46 @@ export default class StartOptions {
/**
* The min width of window rectangle.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts{ '1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
- minWindowWidth?: number;
+ minWindowWidth?: int;
/**
* The min height of window rectangle.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts{ '1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
- minWindowHeight?: number;
+ minWindowHeight?: int;
/**
* The max width of window rectangle.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts{ '1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
- maxWindowWidth?: number;
+ maxWindowWidth?: int;
/**
* The max height of window rectangle.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since arkts{ '1.1':'17','1.2':'20'}
* @arkts 1.1&1.2
*/
- maxWindowHeight?: number;
+ maxWindowHeight?: int;
/**
* The completion handler of StartAbility.
diff --git a/api/@ohos.app.ability.UIAbility.d.ts b/api/@ohos.app.ability.UIAbility.d.ts
index 0f6b0cc85f1d5fca88808914a80d3012d258835d..2f55f337818f15d2f5a7e1d3b1c3038c33c56da9 100644
--- a/api/@ohos.app.ability.UIAbility.d.ts
+++ b/api/@ohos.app.ability.UIAbility.d.ts
@@ -640,6 +640,7 @@ declare class UIAbility extends Ability {
* @stagemodelonly
* @atomicservice
* @since 20
+ * @arkts 1.1&1.2
*/
onWillForeground(): void;
@@ -658,6 +659,7 @@ declare class UIAbility extends Ability {
* @stagemodelonly
* @atomicservice
* @since 20
+ * @arkts 1.1&1.2
*/
onDidForeground(): void;
@@ -704,6 +706,7 @@ declare class UIAbility extends Ability {
* @stagemodelonly
* @atomicservice
* @since 20
+ * @arkts 1.1&1.2
*/
onWillBackground(): void;
@@ -721,6 +724,7 @@ declare class UIAbility extends Ability {
* @stagemodelonly
* @atomicservice
* @since 20
+ * @arkts 1.1&1.2
*/
onDidBackground(): void;
@@ -823,7 +827,8 @@ declare class UIAbility extends Ability {
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onDump(params: Array): Array;
diff --git a/api/@ohos.app.ability.UIExtensionContentSession.d.ts b/api/@ohos.app.ability.UIExtensionContentSession.d.ts
index 8f9f41357a03236a59e4d0d3d10c8bcd15b9d098..4a0bd9c5612d8ecbca991e55d71f9e405806806e 100644
--- a/api/@ohos.app.ability.UIExtensionContentSession.d.ts
+++ b/api/@ohos.app.ability.UIExtensionContentSession.d.ts
@@ -19,7 +19,6 @@
*/
/*** if arkts 1.1 */
-import type AbilityStartCallback from './application/AbilityStartCallback';
import type Want from './@ohos.app.ability.Want';
import type StartOptions from './@ohos.app.ability.StartOptions';
import type uiExtension from './@ohos.arkui.uiExtension';
@@ -27,6 +26,7 @@ import type { AbilityResult } from './ability/abilityResult';
/*** endif */
import type { AsyncCallback } from './@ohos.base';
import type uiExtensionHost from './@ohos.uiExtensionHost';
+import type AbilityStartCallback from './application/AbilityStartCallback';
/*** if arkts 1.2 */
import { AbilityResult } from './ability/abilityResult';
import { LocalStorage } from '@ohos.arkui.stateManagement';
@@ -587,7 +587,8 @@ declare class UIExtensionContentSession {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityByType(type: string, wantParam: Record,
abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void;
@@ -626,7 +627,8 @@ declare class UIExtensionContentSession {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityByType(type: string, wantParam: Record,
abilityStartCallback: AbilityStartCallback): Promise;
diff --git a/api/@ohos.app.ability.Want.d.ts b/api/@ohos.app.ability.Want.d.ts
index ae262892e81296f6f3d3ab4e9df5b957d738e20d..fe3987542078d8d82f0ae2e1269da7def5a0c9e4 100644
--- a/api/@ohos.app.ability.Want.d.ts
+++ b/api/@ohos.app.ability.Want.d.ts
@@ -358,12 +358,12 @@ export default class Want {
* You can obtain the FD from fs.open. When the FD is no longer needed, you must call fs.close to destroy the FD in a
* timely manner to prevent FD leakage.
*
- * @type { ?Record }
+ * @type { ?Record }
* @readonly
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since arkts {'1.1':'15', '1.2':'20'}
* @arkts 1.1&1.2
*/
- readonly fds?: Record;
+ readonly fds?: Record;
}
diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts
index ad7c405cd42591525ae79545115a978980321f7e..9128ec2daa2192f1f90d53142ac062caa1e7a516 100644
--- a/api/@ohos.app.ability.abilityManager.d.ts
+++ b/api/@ohos.app.ability.abilityManager.d.ts
@@ -20,16 +20,17 @@
import { AsyncCallback } from './@ohos.base';
import { ElementName } from './bundleManager/ElementName';
+import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo';
+import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo';
+import Context from './application/Context';
/*** if arkts 1.1 */
import { AbilityResult } from './ability/abilityResult';
import { Configuration } from './@ohos.app.ability.Configuration';
-import Context from './application/Context';
-import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo';
-import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo';
import * as _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver';
import * as _AbilityStateData from './application/AbilityStateData';
/*** endif */
/*** if arkts 1.2 */
+import _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver';
import _AbilityStateData from './application/AbilityStateData';
/*** endif */
@@ -55,14 +56,16 @@ declare namespace abilityManager {
*
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export enum AbilityState {
/**
* Ability is initialized.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
INITIAL = 0,
@@ -70,7 +73,8 @@ declare namespace abilityManager {
* Ability is in the state of getting focus.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
FOCUS = 2,
@@ -78,7 +82,8 @@ declare namespace abilityManager {
* Ability is in the foreground state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
FOREGROUND = 9,
@@ -86,7 +91,8 @@ declare namespace abilityManager {
* Ability is in the background state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
BACKGROUND = 10,
@@ -94,7 +100,8 @@ declare namespace abilityManager {
* Ability is in the process of scheduling at the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
FOREGROUNDING = 11,
@@ -102,7 +109,8 @@ declare namespace abilityManager {
* Ability is in the process of scheduling in the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
BACKGROUNDING = 12
}
@@ -114,7 +122,8 @@ declare namespace abilityManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export enum UserStatus {
/**
@@ -123,7 +132,8 @@ declare namespace abilityManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
ASSERT_TERMINATE = 0,
@@ -133,7 +143,8 @@ declare namespace abilityManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
ASSERT_CONTINUE = 1,
@@ -143,7 +154,8 @@ declare namespace abilityManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
ASSERT_RETRY = 2
}
@@ -192,7 +204,8 @@ declare namespace abilityManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function on(type: 'abilityForegroundState', observer: AbilityForegroundStateObserver): void;
@@ -209,7 +222,8 @@ declare namespace abilityManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function off(type: 'abilityForegroundState', observer?: AbilityForegroundStateObserver): void;
@@ -255,7 +269,8 @@ declare namespace abilityManager {
* @returns { Promise> } Returns the array of AbilityRunningInfo.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function getAbilityRunningInfos(): Promise>;
@@ -272,7 +287,8 @@ declare namespace abilityManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function getAbilityRunningInfos(callback: AsyncCallback>): void;
@@ -281,7 +297,7 @@ declare namespace abilityManager {
* obtain information about the current extension.
*
* @permission ohos.permission.GET_RUNNING_INFO
- * @param { number } upperLimit - Get the maximum limit of the number of messages.
+ * @param { int } upperLimit - Get the maximum limit of the number of messages.
* @returns { Promise> } Returns the array of ExtensionRunningInfo.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
@@ -289,16 +305,17 @@ declare namespace abilityManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getExtensionRunningInfos(upperLimit: number): Promise>;
+ function getExtensionRunningInfos(upperLimit: int): Promise>;
/**
* If you apply for permission, you can obtain information about all extensions. If you do not apply, you can only
* obtain information about the current extension.
*
* @permission ohos.permission.GET_RUNNING_INFO
- * @param { number } upperLimit - Get the maximum limit of the number of messages.
+ * @param { int } upperLimit - Get the maximum limit of the number of messages.
* @param { AsyncCallback> } callback - The callback is used to return the array of
* ExtensionRunningInfo.
* @throws { BusinessError } 202 - Not system application.
@@ -307,9 +324,10 @@ declare namespace abilityManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void;
+ function getExtensionRunningInfos(upperLimit: int, callback: AsyncCallback>): void;
/**
* Get the top ability information of the display.
@@ -475,7 +493,8 @@ declare namespace abilityManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @StageModelOnly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function isEmbeddedOpenAllowed(context: Context, appId: string): Promise;
@@ -554,7 +573,8 @@ declare namespace abilityManager {
*
* @typedef { _AbilityRunningInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export type AbilityRunningInfo = _AbilityRunningInfo;
@@ -577,14 +597,14 @@ declare namespace abilityManager {
*/
export type AbilityStateData = _AbilityStateData;
-
/**
* The class of an extension running information.
*
* @typedef { _ExtensionRunningInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export type ExtensionRunningInfo = _ExtensionRunningInfo;
@@ -597,6 +617,17 @@ declare namespace abilityManager {
* @since 11
*/
export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver.default;
+
+ /**
+ * The ability foreground state observer.
+ *
+ * @typedef { _AbilityForegroundStateObserver }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi
+ * @since 20
+ * @arkts 1.2
+ */
+ export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver;
}
export default abilityManager;
diff --git a/api/@ohos.app.ability.appManager.d.ts b/api/@ohos.app.ability.appManager.d.ts
index 4fa135881501bdb6b5258f6b67f65f4c37570eb0..ca187b1cb65ad64b7da7ace72966acc23efceb12 100644
--- a/api/@ohos.app.ability.appManager.d.ts
+++ b/api/@ohos.app.ability.appManager.d.ts
@@ -26,14 +26,19 @@ import { RunningMultiAppInfo as _RunningMultiAppInfo } from './application/Runni
import * as _ApplicationStateObserver from './application/ApplicationStateObserver';
import type * as _AppForegroundStateObserver from './application/AppForegroundStateObserver';
import * as _AbilityStateData from './application/AbilityStateData';
-import * as _AppStateData from './application/AppStateData';
+import * as _AppStateData from './application/AppStateData';
import type * as _ProcessData from './application/ProcessData';
import * as _AbilityFirstFrameStateObserver from './application/AbilityFirstFrameStateObserver';
import * as _AbilityFirstFrameStateData from './application/AbilityFirstFrameStateData';
/*** endif */
/*** if arkts 1.2 */
+import _ApplicationStateObserver from './application/ApplicationStateObserver';
import _AbilityStateData from './application/AbilityStateData';
import _AppStateData from './application/AppStateData';
+import _ProcessData from './application/ProcessData';
+import _AppForegroundStateObserver from './application/AppForegroundStateObserver';
+import { AbilityFirstFrameStateObserver as _AbilityFirstFrameStateObserver } from './application/AbilityFirstFrameStateObserver';
+import { AbilityFirstFrameStateData as _AbilityFirstFrameStateData } from './application/AbilityFirstFrameStateData';
/*** endif */
/**
@@ -88,7 +93,8 @@ declare namespace appManager {
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
STATE_ACTIVE,
@@ -239,7 +245,8 @@ declare namespace appManager {
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export enum KeepAliveAppType {
/**
@@ -247,7 +254,8 @@ declare namespace appManager {
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
ALL = 0,
@@ -256,7 +264,8 @@ declare namespace appManager {
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
THIRD_PARTY = 1,
@@ -265,7 +274,8 @@ declare namespace appManager {
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
SYSTEM = 2
}
@@ -275,7 +285,8 @@ declare namespace appManager {
* @enum { number }
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export enum KeepAliveSetter {
/**
@@ -283,7 +294,8 @@ declare namespace appManager {
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
SYSTEM = 0,
@@ -292,7 +304,8 @@ declare namespace appManager {
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
USER = 1
}
@@ -303,7 +316,8 @@ declare namespace appManager {
* @typedef KeepAliveBundleInfo
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface KeepAliveBundleInfo {
/**
@@ -312,7 +326,8 @@ declare namespace appManager {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
bundleName: string;
@@ -322,7 +337,8 @@ declare namespace appManager {
* @type { KeepAliveAppType }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
type: KeepAliveAppType;
@@ -332,7 +348,8 @@ declare namespace appManager {
* @type { KeepAliveSetter }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
setter: KeepAliveSetter;
@@ -363,15 +380,16 @@ declare namespace appManager {
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - applicationState.
* @param { ApplicationStateObserver } observer - The application state observer.
- * @returns { number } Returns the number code of the observer.
+ * @returns { int } Returns the number code of the observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function on(type: 'applicationState', observer: ApplicationStateObserver): number;
+ function on(type: 'applicationState', observer: ApplicationStateObserver): int;
/**
* Register application state observer.
@@ -380,15 +398,16 @@ declare namespace appManager {
* @param { 'applicationState' } type - applicationState.
* @param { ApplicationStateObserver } observer - The application state observer.
* @param { Array } bundleNameList - The list of bundleName. The max length is 128.
- * @returns { number } Returns the number code of the observer.
+ * @returns { int } Returns the number code of the observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array): number;
+ function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array): int;
/**
* Register app foreground or background state observer.
@@ -403,7 +422,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function on(type: 'appForegroundState', observer: AppForegroundStateObserver): void;
@@ -421,7 +441,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function on(type: 'abilityFirstFrameState', observer: AbilityFirstFrameStateObserver, bundleName?: string): void;
@@ -430,32 +451,34 @@ declare namespace appManager {
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - applicationState.
- * @param { number } observerId - Indicates the number code of the observer.
+ * @param { int } observerId - Indicates the number code of the observer.
* @param { AsyncCallback } callback - The callback of off.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 15
+ * @since arkts {'1.1':'15', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function off(type: 'applicationState', observerId: number, callback: AsyncCallback): void;
+ function off(type: 'applicationState', observerId: int, callback: AsyncCallback): void;
/**
* Unregister application state observer.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - applicationState.
- * @param { number } observerId - Indicates the number code of the observer.
+ * @param { int } observerId - Indicates the number code of the observer.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function off(type: 'applicationState', observerId: number): Promise;
+ function off(type: 'applicationState', observerId: int): Promise;
/**
* Unregister app foreground or background state observer.
@@ -470,7 +493,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function off(type: 'appForegroundState', observer?: AppForegroundStateObserver): void;
@@ -487,7 +511,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function off(type: 'abilityFirstFrameState', observer?: AbilityFirstFrameStateObserver): void;
@@ -545,7 +570,7 @@ declare namespace appManager {
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES
* or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
* @param { string } bundleName - The process bundle name.
- * @param { number } accountId - The account id.
+ * @param { int } accountId - The account id.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -554,9 +579,10 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function killProcessWithAccount(bundleName: string, accountId: number): Promise;
+ function killProcessWithAccount(bundleName: string, accountId: int): Promise;
/**
* Kill process with account.
@@ -564,9 +590,9 @@ declare namespace appManager {
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES
* or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
* @param { string } bundleName - The process bundle name.
- * @param { number } accountId - The account id.
+ * @param { int } accountId - The account id.
* @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared.
- * @param { number } [appIndex] - The application index.
+ * @param { int } [appIndex] - The application index.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -574,9 +600,10 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function killProcessWithAccount(bundleName: string, accountId: number, clearPageStack: boolean, appIndex?: number):
+ function killProcessWithAccount(bundleName: string, accountId: int, clearPageStack: boolean, appIndex?: int):
Promise;
/**
@@ -601,7 +628,7 @@ declare namespace appManager {
* @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES
* or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES
* @param { string } bundleName - The process bundle name.
- * @param { number } accountId - The account id.
+ * @param { int } accountId - The account id.
* @param { AsyncCallback } callback - The callback of killProcessWithAccount.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -610,9 +637,10 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void;
+ function killProcessWithAccount(bundleName: string, accountId: int, callback: AsyncCallback): void;
/**
* Is user running in stability test.
@@ -633,7 +661,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function isRunningInStabilityTest(callback: AsyncCallback): void;
@@ -652,7 +681,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function isRunningInStabilityTest(): Promise;
@@ -684,7 +714,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function killProcessesByBundleName(bundleName: string): Promise;
@@ -694,15 +725,16 @@ declare namespace appManager {
* @permission ohos.permission.KILL_APP_PROCESSES or ohos.permission.CLEAN_BACKGROUND_PROCESSES
* @param { string } bundleName - bundle name.
* @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared.
- * @param { number } [appIndex] - The index of clone app.
+ * @param { int } [appIndex] - The index of clone app.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: number): Promise;
+ function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: int): Promise;
/**
* Kill processes by bundle name
@@ -785,7 +817,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function isRamConstrainedDevice(): Promise;
@@ -808,7 +841,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function isRamConstrainedDevice(callback: AsyncCallback): void;
@@ -823,13 +857,14 @@ declare namespace appManager {
/**
* Get the memory size of the application
*
- * @returns { Promise } Returns the application memory size.
+ * @returns { Promise } Returns the application memory size.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getAppMemorySize(): Promise;
+ function getAppMemorySize(): Promise;
/**
* Get the memory size of the application
@@ -844,15 +879,16 @@ declare namespace appManager {
/**
* Get the memory size of the application
*
- * @param { AsyncCallback } callback - The callback is used to return the application memory size.
+ * @param { AsyncCallback } callback - The callback is used to return the application memory size.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getAppMemorySize(callback: AsyncCallback): void;
+ function getAppMemorySize(callback: AsyncCallback): void;
/**
* If you apply for permission, you can obtain information about all running processes.
@@ -889,7 +925,8 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function getRunningProcessInformationByBundleType(
bundleType: bundleManager.BundleType): Promise>;
@@ -925,7 +962,7 @@ declare namespace appManager {
*
* @permission ohos.permission.GET_RUNNING_INFO
* @param { string } bundleName - Indicates the bundle name of the shared bundle.
- * @param { number } versionCode - Indicates the version code of the shared bundle.
+ * @param { long } versionCode - Indicates the version code of the shared bundle.
* @returns { Promise } Returns the shared bundle running result. The result is true if running, false otherwise.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -934,16 +971,17 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function isSharedBundleRunning(bundleName: string, versionCode: number): Promise;
+ function isSharedBundleRunning(bundleName: string, versionCode: long): Promise;
/**
* Check whether the shared bundle is running.
*
* @permission ohos.permission.GET_RUNNING_INFO
* @param { string } bundleName - Indicates the bundle name of the shared bundle.
- * @param { number } versionCode - Indicates the version code of the shared bundle.
+ * @param { long } versionCode - Indicates the version code of the shared bundle.
* @param { AsyncCallback } callback - The callback of checking the shared bundle running result.
* The result is true if running, false otherwise.
* @throws { BusinessError } 201 - Permission denied.
@@ -953,39 +991,42 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback): void;
+ function isSharedBundleRunning(bundleName: string, versionCode: long, callback: AsyncCallback): void;
/**
* Obtains memory usage of one process by its pid.
*
- * @param { number } pid - Indicates the pid of the process.
- * @returns { Promise } Returns the memory usage of the process in KB.
+ * @param { int } pid - Indicates the pid of the process.
+ * @returns { Promise } Returns the memory usage of the process in KB.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getProcessMemoryByPid(pid: number): Promise;
+ function getProcessMemoryByPid(pid: int): Promise;
/**
* Obtains memory usage of one process by its pid.
*
- * @param { number } pid - Indicates the pid of the process.
- * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result.
+ * @param { int } pid - Indicates the pid of the process.
+ * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getProcessMemoryByPid(pid: number, callback: AsyncCallback): void;
+ function getProcessMemoryByPid(pid: int, callback: AsyncCallback): void;
/**
* Obtains the process information list of running processes that belong to a specific bundle of current user.
@@ -1007,7 +1048,7 @@ declare namespace appManager {
* Obtains the process information list of running processes that belong to a specific bundle and specific user ID.
*
* @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to.
- * @param { number } userId - Indicates the user ID of the application to which the processes belong to.
+ * @param { int } userId - Indicates the user ID of the application to which the processes belong to.
* @param { AsyncCallback> } callback - Indicates the callback of getting process information by bundleName result.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
@@ -1018,7 +1059,7 @@ declare namespace appManager {
* @since arkts {'1.1':'10', '1.2':'20'}
* @arkts 1.1&1.2
*/
- function getRunningProcessInfoByBundleName(bundleName: string, userId: number, callback: AsyncCallback>): void;
+ function getRunningProcessInfoByBundleName(bundleName: string, userId: int, callback: AsyncCallback>): void;
/**
* Obtains the process information list of running processes that belong to a specific bundle of current user.
@@ -1040,7 +1081,7 @@ declare namespace appManager {
* Obtains the process information list of running processes that belong to a specific bundle and specific user ID.
*
* @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to.
- * @param { number } userId - Indicates the user ID of the application to which the processes belong to.
+ * @param { int } userId - Indicates the user ID of the application to which the processes belong to.
* @returns { Promise> } Returns a list of process information.
* @throws { BusinessError } 202 - Permission denied, non-system app called system api.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
@@ -1051,7 +1092,7 @@ declare namespace appManager {
* @since arkts {'1.1':'10', '1.2':'20'}
* @arkts 1.1&1.2
*/
- function getRunningProcessInfoByBundleName(bundleName: string, userId: number): Promise>;
+ function getRunningProcessInfoByBundleName(bundleName: string, userId: int): Promise>;
/**
* Check whether the bundle is running.
@@ -1093,9 +1134,9 @@ declare namespace appManager {
*
* @permission ohos.permission.PRELOAD_APPLICATION
* @param { string } bundleName - The bundle name of the application to preload.
- * @param { number } userId - Indicates the user identification.
+ * @param { int } userId - Indicates the user identification.
* @param { PreloadMode } mode - Preload application mode.
- * @param { number } [appIndex] - The index of application clone.
+ * @param { int } [appIndex] - The index of application clone.
* @returns { Promise } Returns the result of preloadApplication.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 202 - Not system application.
@@ -1106,9 +1147,10 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function preloadApplication(bundleName: string, userId: number, mode: PreloadMode, appIndex?: number): Promise;
+ function preloadApplication(bundleName: string, userId: int, mode: PreloadMode, appIndex?: int): Promise;
/**
* Get all running multi app info by bundleName
@@ -1135,7 +1177,7 @@ declare namespace appManager {
*
* @permission ohos.permission.GET_RUNNING_INFO
* @param { string } bundleName - Indicates the bundle name of the bundle.
- * @param { number } [appCloneIndex] - app clone index
+ * @param { int } [appCloneIndex] - app clone index
* @returns { Promise } Returns the bundle running result. The result is true if running, false otherwise.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
@@ -1143,9 +1185,10 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function isAppRunning(bundleName: string, appCloneIndex?: number): Promise;
+ function isAppRunning(bundleName: string, appCloneIndex?: int): Promise;
/**
* Clear up application data by bundle name
@@ -1188,7 +1231,7 @@ declare namespace appManager {
*
* @permission ohos.permission.GET_RUNNING_INFO
* @param { string } bundleName - bundle name.
- * @returns { Promise> } Returns the list of pid.
+ * @returns { Promise> } Returns the list of pid.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
@@ -1198,16 +1241,17 @@ declare namespace appManager {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getSupportedProcessCachePids(bundleName : string): Promise>;
+ function getSupportedProcessCachePids(bundleName : string): Promise>;
/**
* Set keep alive for the specified bundle.
*
* @permission ohos.permission.MANAGE_APP_KEEP_ALIVE
* @param { string } bundleName - bundle name.
- * @param { number } userId - user id.
+ * @param { int } userId - user id.
* @param { boolean } enable - flag indicates whether the bundle should be kept alive.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
@@ -1222,16 +1266,17 @@ declare namespace appManager {
* @throws { BusinessError } 16300010 - The target application is not attached to the status bar.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function setKeepAliveForBundle(bundleName: string, userId: number, enable: boolean): Promise;
+ function setKeepAliveForBundle(bundleName: string, userId: int, enable: boolean): Promise;
/**
* Get keep-alive bundle information.
*
* @permission ohos.permission.MANAGE_APP_KEEP_ALIVE
* @param { KeepAliveAppType } type - type of keep-alive apps to be quried.
- * @param { number } [userId] - user id.
+ * @param { int } [userId] - user id.
* @returns { Promise> } Returns the list of KeepAliveBundleInfo.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -1241,9 +1286,10 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getKeepAliveBundles(type: KeepAliveAppType, userId?: number): Promise>;
+ function getKeepAliveBundles(type: KeepAliveAppType, userId?: int): Promise>;
/**
* Set keep alive for the specified app service extension.
@@ -1285,7 +1331,7 @@ declare namespace appManager {
* Kill processes in batch.
*
* @permission ohos.permission.KILL_APP_PROCESSES
- * @param { Array } pids - The pids of the processes.
+ * @param { Array } pids - The pids of the processes.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -1295,9 +1341,10 @@ declare namespace appManager {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function killProcessesInBatch(pids: Array): Promise;
+ function killProcessesInBatch(pids: Array): Promise;
/**
* The ability or extension state data.
@@ -1308,6 +1355,16 @@ declare namespace appManager {
*/
export type AbilityStateData = _AbilityStateData.default;
+ /**
+ * The ability or extension state data.
+ *
+ * @typedef { _AbilityStateData }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.2
+ */
+ export type AbilityStateData = _AbilityStateData;
+
/**
* The application state data.
*
@@ -1336,6 +1393,16 @@ declare namespace appManager {
*/
export type ApplicationStateObserver = _ApplicationStateObserver.default;
+ /**
+ * The application state observer.
+ *
+ * @typedef { _ApplicationStateObserver }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.2
+ */
+ export type ApplicationStateObserver = _ApplicationStateObserver;
+
/**
* The application foreground state observer.
*
@@ -1346,6 +1413,17 @@ declare namespace appManager {
*/
export type AppForegroundStateObserver = _AppForegroundStateObserver.default;
+ /**
+ * The application foreground state observer.
+ *
+ * @typedef { _AppForegroundStateObserver }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi
+ * @since 20
+ * @arkts 1.2
+ */
+ export type AppForegroundStateObserver = _AppForegroundStateObserver;
+
/**
* The class of a process information.
*
@@ -1372,6 +1450,16 @@ declare namespace appManager {
*/
export type ProcessData = _ProcessData.default;
+ /**
+ * The application state data.
+ *
+ * @typedef { _ProcessData }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.2
+ */
+ export type ProcessData = _ProcessData;
+
/**
* The ability first frame state observer.
*
@@ -1382,6 +1470,17 @@ declare namespace appManager {
*/
export type AbilityFirstFrameStateObserver = _AbilityFirstFrameStateObserver.default;
+ /**
+ * The ability first frame state observer.
+ *
+ * @typedef { _AbilityFirstFrameStateObserver }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi
+ * @since 20
+ * @arkts 1.2
+ */
+ export type AbilityFirstFrameStateObserver = _AbilityFirstFrameStateObserver;
+
/**
* The class of an ability first frame state data.
*
@@ -1392,6 +1491,17 @@ declare namespace appManager {
*/
export type AbilityFirstFrameStateData = _AbilityFirstFrameStateData.default;
+ /**
+ * The class of an ability first frame state data.
+ *
+ * @typedef { _AbilityFirstFrameStateData }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi
+ * @since 20
+ * @arkts 1.2
+ */
+ export type AbilityFirstFrameStateData = _AbilityFirstFrameStateData;
+
/**
* The class of running multi app information.
*
diff --git a/api/@ohos.app.ability.application.d.ts b/api/@ohos.app.ability.application.d.ts
index ebe37b1f6813fcf0dcc2665477069cc32c27b12b..ecc700a11956e6e86571159113cc937171e8eb91 100644
--- a/api/@ohos.app.ability.application.d.ts
+++ b/api/@ohos.app.ability.application.d.ts
@@ -123,7 +123,8 @@ declare namespace application {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export function getApplicationContext(): ApplicationContext;
diff --git a/api/@ohos.app.ability.common.d.ts b/api/@ohos.app.ability.common.d.ts
index f26a6a6e5fddb4f3e5bf38a447b585155274612e..757cea8daf4d7669d3356d22b4fb94ef30720987 100644
--- a/api/@ohos.app.ability.common.d.ts
+++ b/api/@ohos.app.ability.common.d.ts
@@ -30,9 +30,6 @@ import * as _ExtensionContext from './application/ExtensionContext';
import * as _FormExtensionContext from './application/FormExtensionContext';
import * as _ServiceExtensionContext from './application/ServiceExtensionContext';
import * as _EventHub from './application/EventHub';
-import { PacMap as _PacMap } from './ability/dataAbilityHelper';
-import type _AbilityStartCallback from './application/AbilityStartCallback';
-import { ConnectOptions as _ConnectOptions } from './ability/connectOptions';
import type * as _VpnExtensionContext from './application/VpnExtensionContext';
import type { AutoStartupCallback as _AutoStartupCallback } from './application/AutoStartupCallback';
import type { AutoStartupInfo as _AutoStartupInfo } from './application/AutoStartupInfo';
@@ -42,19 +39,23 @@ import * as _UIServiceExtensionContext from './application/UIServiceExtensionCon
import * as _UIServiceProxy from './application/UIServiceProxy';
import * as _UIServiceHostProxy from './application/UIServiceHostProxy';
import * as _UIServiceExtensionConnectCallback from './application/UIServiceExtensionConnectCallback';
-import * as _AppServiceExtensionContext from './application/AppServiceExtensionContext';
+import { PacMap as _PacMap } from './ability/dataAbilityHelper';
/*** endif */
-import { AbilityResult as _AbilityResult } from './ability/abilityResult';
/*** if arkts 1.2 */
import _UIAbilityContext from './application/UIAbilityContext';
import type _UIExtensionContext from './application/UIExtensionContext';
import _AbilityStageContext from './application/AbilityStageContext';
import _ApplicationContext from './application/ApplicationContext';
+import _BaseContext from './application/BaseContext';
import _Context from './application/Context';
import _ExtensionContext from './application/ExtensionContext';
+import _FormExtensionContext from './application/FormExtensionContext';
import _ServiceExtensionContext from './application/ServiceExtensionContext';
+import _EventHub from './application/EventHub';
/*** endif */
-
+import { AbilityResult as _AbilityResult } from './ability/abilityResult';
+import type _AbilityStartCallback from './application/AbilityStartCallback';
+import { ConnectOptions as _ConnectOptions } from './ability/connectOptions';
/**
* This module provides application context classes and common data structures.
*
@@ -229,6 +230,19 @@ declare namespace common {
* @since 11
*/
export type BaseContext = _BaseContext.default;
+
+ /**
+ * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode.
+ *
+ * @typedef { _BaseContext }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @stagemodelonly
+ * @crossplatform
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+ export type BaseContext = _BaseContext;
/**
* The base context of an ability or an application. It allows access to
@@ -324,6 +338,20 @@ declare namespace common {
*/
export type FormExtensionContext = _FormExtensionContext.default;
+ /**
+ * The context of form extension. It allows access to
+ * formExtension-specific resources.
+ *
+ * @typedef { _FormExtensionContext }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @stagemodelonly
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+ export type FormExtensionContext = _FormExtensionContext;
+
+
/**
* The context of service extension. It allows access to
* serviceExtension-specific resources.
@@ -376,6 +404,19 @@ declare namespace common {
*/
export type EventHub = _EventHub.default;
+ /**
+ * The event center of a context, support the subscription and publication of events.
+ *
+ * @typedef { _EventHub }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @stagemodelonly
+ * @crossplatform
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+ export type EventHub = _EventHub;
+
/**
* Defines a PacMap object for storing a series of values.
*
@@ -418,7 +459,8 @@ declare namespace common {
* @typedef { _ConnectOptions }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export type ConnectOptions = _ConnectOptions;
@@ -464,7 +506,8 @@ declare namespace common {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export type AbilityStartCallback = _AbilityStartCallback;
diff --git a/api/@ohos.app.ability.dataUriUtils.d.ts b/api/@ohos.app.ability.dataUriUtils.d.ts
index cdaa9b52b135b9d5efffc9347310c0c801681255..63ba6905b878f18f1a47ad8d4f3d40879e8bffe1 100644
--- a/api/@ohos.app.ability.dataUriUtils.d.ts
+++ b/api/@ohos.app.ability.dataUriUtils.d.ts
@@ -23,7 +23,8 @@
*
* @namespace dataUriUtils
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
declare namespace dataUriUtils {
/**
@@ -34,7 +35,8 @@ declare namespace dataUriUtils {
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function getId(uri: string): number;
@@ -47,7 +49,8 @@ declare namespace dataUriUtils {
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function attachId(uri: string, id: number): string;
@@ -59,7 +62,8 @@ declare namespace dataUriUtils {
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function deleteId(uri: string): string;
@@ -72,7 +76,8 @@ declare namespace dataUriUtils {
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function updateId(uri: string, id: number): string;
}
diff --git a/api/@ohos.app.ability.dialogRequest.d.ts b/api/@ohos.app.ability.dialogRequest.d.ts
index 275dc2f4173f94a9545c8bc955d6e3d6143af656..4ca57d51207bc0be6744c40ca2bcf7f1cc7da34e 100644
--- a/api/@ohos.app.ability.dialogRequest.d.ts
+++ b/api/@ohos.app.ability.dialogRequest.d.ts
@@ -18,7 +18,7 @@
* @kit AbilityKit
*/
- /*** if arkts 1.1 */
+/*** if arkts 1.1 */
import Want from './@ohos.app.ability.Want';
/*** endif */
diff --git a/api/@ohos.app.ability.insightIntent.d.ts b/api/@ohos.app.ability.insightIntent.d.ts
index c8f75ce1d14eba4cf3b5c1c8ec002ac1902b6776..0937b499060c3a0f1aaa9e5af5ac810410fea73b 100644
--- a/api/@ohos.app.ability.insightIntent.d.ts
+++ b/api/@ohos.app.ability.insightIntent.d.ts
@@ -101,14 +101,14 @@ declare namespace insightIntent {
/**
* Indicates result code.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- code: number;
+ code: int;
/**
* Indicates execute result.
@@ -141,14 +141,14 @@ declare namespace insightIntent {
* {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}|
* {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- flags?: number;
+ flags?: int;
}
/**
diff --git a/api/@ohos.app.ability.insightIntentDriver.d.ts b/api/@ohos.app.ability.insightIntentDriver.d.ts
index f3f76353810889b6e3a28a91c52162fb1517a681..a39325f844a4799368fbd2202d1ddc576a4f0ee4 100644
--- a/api/@ohos.app.ability.insightIntentDriver.d.ts
+++ b/api/@ohos.app.ability.insightIntentDriver.d.ts
@@ -120,14 +120,14 @@ declare namespace insightIntentDriver {
/**
* Indicates the display Id, only works when executeMode is UIAbility foreground.
*
- * @type { ?number }
+ * @type { ?long }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @StageModelOnly
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- displayId?: number;
+ displayId?: long;
/**
* Indicates the URIs will be authorized to the insight intent executor.
@@ -148,14 +148,14 @@ declare namespace insightIntentDriver {
* {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}|
* {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}.
*
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
* @since arkts {'1.1':'18', '1.2':'20'}
* @arkts 1.1&1.2
*/
- flags?: number;
+ flags?: int;
}
/**
diff --git a/api/@ohos.app.ability.missionManager.d.ts b/api/@ohos.app.ability.missionManager.d.ts
index d7a1be6b8d7fa83a051009bca53d83e33b3084d9..36a47ddd11d838987a38cb1aacc9d9b7acd393fa 100644
--- a/api/@ohos.app.ability.missionManager.d.ts
+++ b/api/@ohos.app.ability.missionManager.d.ts
@@ -20,9 +20,11 @@
import { AsyncCallback } from './@ohos.base';
import { MissionInfo as _MissionInfo } from './application/MissionInfo';
+/*** if arkts 1.1 */
import { MissionListener as _MissionListener } from './application/MissionListener';
import { MissionSnapshot as _MissionSnapshot } from './application/MissionSnapshot';
import StartOptions from './@ohos.app.ability.StartOptions';
+/*** endif */
/**
* This module provides the capability to manage abilities and obtaining system task information.
@@ -30,7 +32,8 @@ import StartOptions from './@ohos.app.ability.StartOptions';
* @namespace missionManager
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
declare namespace missionManager {
/**
@@ -91,7 +94,7 @@ declare namespace missionManager {
*
* @permission ohos.permission.MANAGE_MISSIONS
* @param { string } deviceId - Indicates the device to be queried.
- * @param { number } missionId - Indicates mission id to be queried.
+ * @param { int } missionId - Indicates mission id to be queried.
* @param { AsyncCallback } callback - The callback is used to return the MissionInfo of the given id.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -99,16 +102,17 @@ declare namespace missionManager {
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void;
+ function getMissionInfo(deviceId: string, missionId: int, callback: AsyncCallback): void;
/**
* Get the missionInfo with the given missionId.
*
* @permission ohos.permission.MANAGE_MISSIONS
* @param { string } deviceId - Indicates the device to be queried.
- * @param { number } missionId - Indicates mission id to be queried.
+ * @param { int } missionId - Indicates mission id to be queried.
* @returns { Promise } Returns the MissionInfo of the given id.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
@@ -116,9 +120,10 @@ declare namespace missionManager {
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getMissionInfo(deviceId: string, missionId: number): Promise;
+ function getMissionInfo(deviceId: string, missionId: int): Promise;
/**
* Get missionInfos in the given deviceId with maximum number of numMax.
@@ -339,7 +344,8 @@ declare namespace missionManager {
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function clearAllMissions(callback: AsyncCallback): void;
@@ -352,7 +358,8 @@ declare namespace missionManager {
* @throws { BusinessError } 202 - Not system application.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
function clearAllMissions(): Promise;
@@ -502,7 +509,8 @@ declare namespace missionManager {
* @typedef { _MissionInfo }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export type MissionInfo = _MissionInfo;
diff --git a/api/@ohos.app.ability.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts
index f61ab3080be00821d2ca6533c43c768ba5645028..c06e02e9fb1616b147e9c5ff6c813ad855eefd23 100644
--- a/api/@ohos.app.ability.wantAgent.d.ts
+++ b/api/@ohos.app.ability.wantAgent.d.ts
@@ -127,16 +127,17 @@ declare namespace wantAgent {
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
- * @param { AsyncCallback } callback - Callback used to return the user ID.
+ * @param { AsyncCallback } callback - Callback used to return the user ID.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getUid(agent: WantAgent, callback: AsyncCallback): void;
+ function getUid(agent: WantAgent, callback: AsyncCallback): void;
/**
* Obtains the UID of a WantAgent.
@@ -155,16 +156,17 @@ declare namespace wantAgent {
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
- * @returns { Promise } Promise used to return the user ID.
+ * @returns { Promise } Promise used to return the user ID.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- function getUid(agent: WantAgent): Promise;
+ function getUid(agent: WantAgent): Promise;
/**
* Obtains the Want in a WantAgent object.
@@ -453,7 +455,7 @@ declare namespace wantAgent {
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
- * @param { AsyncCallback } callback - Callback used to return the operation type.
+ * @param { AsyncCallback } callback - Callback used to return the operation type.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
@@ -464,7 +466,7 @@ declare namespace wantAgent {
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- function getOperationType(agent: WantAgent, callback: AsyncCallback): void;
+ function getOperationType(agent: WantAgent, callback: AsyncCallback): void;
/**
* Obtains the {@link OperationType} of a WantAgent.
@@ -484,7 +486,7 @@ declare namespace wantAgent {
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - Indicates the WantAgent.
- * @returns { Promise } Returns the OperationType of the WantAgent.
+ * @returns { Promise } Returns the OperationType of the WantAgent.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
@@ -495,7 +497,7 @@ declare namespace wantAgent {
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- function getOperationType(agent: WantAgent): Promise;
+ function getOperationType(agent: WantAgent): Promise;
/**
* Enables or disables the WantAgent multithreading feature.
@@ -889,7 +891,8 @@ declare namespace wantAgent {
* @type { WantAgent }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
info: WantAgent;
@@ -906,7 +909,8 @@ declare namespace wantAgent {
* @type { Want }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
want: Want;
@@ -920,12 +924,13 @@ declare namespace wantAgent {
/**
* Request code that triggers the WantAgent object.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- finalCode: number;
+ finalCode: int;
/**
* Final data collected by the common event.
@@ -940,7 +945,8 @@ declare namespace wantAgent {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
finalData: string;
@@ -964,7 +970,8 @@ declare namespace wantAgent {
* @type { ?Record }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
extraInfo?: Record;
}
diff --git a/api/@ohos.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts
index ea86d1c15bdffb3c8d6cba4fe063a05a8d754121..4908982c76056adb916f2fecf5fbdf02f160ef35 100644
--- a/api/@ohos.application.testRunner.d.ts
+++ b/api/@ohos.application.testRunner.d.ts
@@ -18,6 +18,28 @@
* @kit TestKit
*/
+/**
+ * Prepare the unit testing environment for running test cases.
+ *
+ * @typedef { Function }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @atomicservice
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+type OnPrepareFn = () => void;
+
+/**
+ * Run all test cases.
+ *
+ * @typedef { Function }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @atomicservice
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+type OnRunFn = () => void;
+
/**
* Base class for the test framework.
* If you want to implement your own unit test framework, you must inherit this class and overrides all its methods.
@@ -48,10 +70,18 @@ interface TestRunner {
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since arkts {'1.1':'11', '1.2':'20'}
+ * @since 11
+ */
+ /**
+ * Prepare the unit testing environment for running test cases.
+ *
+ * @type { OnPrepareFn }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @atomicservice
+ * @since 20
* @arkts 1.1&1.2
*/
- onPrepare(): void;
+ onPrepare: OnPrepareFn;
/**
* Run all test cases.
@@ -64,10 +94,18 @@ interface TestRunner {
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since arkts {'1.1':'11', '1.2':'20'}
+ * @since 11
+ */
+ /**
+ * Run all test cases.
+ *
+ * @typedef { OnRunFn }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @atomicservice
+ * @since 20
* @arkts 1.1&1.2
*/
- onRun(): void;
+ onRun: OnRunFn;
}
/*** if arkts 1.1 */
diff --git a/api/@ohos.application.uriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts
index c4114ab741e5031dafcf0b130e4e6b4b6d61cc2b..57eb4ee4478b60a384d6330baeaf39efc9bd7cc3 100644
--- a/api/@ohos.application.uriPermissionManager.d.ts
+++ b/api/@ohos.application.uriPermissionManager.d.ts
@@ -169,7 +169,7 @@ declare namespace uriPermissionManager {
* wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or
* wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION.
* @param { string } targetBundleName - Indicates the bundle name of authorization target.
- * @param { number } appCloneIndex - Indicates the clone index of target application.
+ * @param { int } appCloneIndex - Indicates the clone index of target application.
* @returns { Promise } - the promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not System App. Interface caller is not a system app.
@@ -187,7 +187,7 @@ declare namespace uriPermissionManager {
* @since arkts {'1.1':'19', '1.2':'20'}
* @arkts 1.1&1.2
*/
- function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string, appCloneIndex: number): Promise;
+ function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string, appCloneIndex: int): Promise;
/**
* Revoke URI from one application
@@ -320,7 +320,7 @@ declare namespace uriPermissionManager {
*
* @param { string } uri - File URI.
* @param { string } targetBundleName - Indicates the bundle name of authorization target.
- * @param { number } appCloneIndex - Indicates the clone index of target application.
+ * @param { int } appCloneIndex - Indicates the clone index of target application.
* @returns { Promise } - the promise returned by the function.
* @throws { BusinessError } 202 - Not System App. Interface caller is not a system app.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
@@ -335,7 +335,7 @@ declare namespace uriPermissionManager {
* @since arkts {'1.1':'19', '1.2':'20'}
* @arkts 1.1&1.2
*/
- function revokeUriPermission(uri: string, targetBundleName: string, appCloneIndex: number): Promise;
+ function revokeUriPermission(uri: string, targetBundleName: string, appCloneIndex: int): Promise;
/**
* Grant URIs in UDkey to another application
diff --git a/api/ability/abilityResult.d.ts b/api/ability/abilityResult.d.ts
index 636c91f97b799ca30d97f39dfab5a426d396d39e..b8036da5a3e603b645178797c9baa8d95fb596eb 100644
--- a/api/ability/abilityResult.d.ts
+++ b/api/ability/abilityResult.d.ts
@@ -45,13 +45,13 @@ export interface AbilityResult {
* Indicates the result code returned after the ability is destroyed. You can define the result
* code to identify an error.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- resultCode: number;
+ resultCode: int;
/**
* Indicates the data returned after the ability is destroyed. You can define the data returned.
diff --git a/api/ability/connectOptions.d.ts b/api/ability/connectOptions.d.ts
index 7a911505f6f8f88d6516627466d5b71a3d5740b0..8aeeb721a90c50a553369f3578cd6e5952e41420 100644
--- a/api/ability/connectOptions.d.ts
+++ b/api/ability/connectOptions.d.ts
@@ -21,13 +21,48 @@
import { ElementName } from '../bundleManager/ElementName';
import rpc from './../@ohos.rpc';
+/**
+ * The callback interface was connect successfully.
+ *
+ * @typedef { Function }
+ * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability
+ * @param { rpc.IRemoteObject } remote - The remote object instance
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+type OnConnectFn = (elementName: ElementName, remote: rpc.IRemoteObject) => void;
+
+/**
+ * The callback interface was disconnect successfully.
+ *
+ * typedef { Function }
+ * @param { ElementName } elementName - The ohos.bundleManager.ElementName object of the service ability
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+type OnDisconnectFn = (elementName: ElementName) => void;
+
+/**
+ * The callback interface was connect failed.
+ *
+ * @typedef { Function }
+ * @param { int } code - The error code of the failed.
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+type OnFailedFn = (code: int) => void;
+
/**
* As an input parameter when connecting a specified background service, it is used to receive
* state changes during the connection.
*
* @interface ConnectOptions
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 7
+ * @since arkts {'1.1':'7', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface ConnectOptions {
/**
@@ -46,7 +81,15 @@ export interface ConnectOptions {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 12
*/
- onConnect(elementName: ElementName, remote: rpc.IRemoteObject): void;
+ /**
+ * The callback interface was connect successfully.
+ *
+ * @type { OnConnectFn }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+ onConnect: OnConnectFn;
/**
* The callback interface was disconnect successfully.
@@ -62,7 +105,15 @@ export interface ConnectOptions {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 12
*/
- onDisconnect(elementName: ElementName): void;
+ /**
+ * The callback interface was connect successfully.
+ *
+ * @type { OnConnectFn }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+ onDisconnect: OnDisconnectFn;
/**
* The callback interface was connect failed.
@@ -71,5 +122,13 @@ export interface ConnectOptions {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
*/
- onFailed(code: number): void;
+ /**
+ * The callback interface was connect failed.
+ *
+ * @typedef { OnFailedFn }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.1&1.2
+ */
+ onFailed: OnFailedFn;
}
diff --git a/api/ability/dataAbilityHelper.d.ts b/api/ability/dataAbilityHelper.d.ts
index a182b4222f5e2c60cc969751f17ba6e8dd88b698..0f954f12e4fb0ca1c2510bba72c25764d329cc11 100644
--- a/api/ability/dataAbilityHelper.d.ts
+++ b/api/ability/dataAbilityHelper.d.ts
@@ -18,12 +18,14 @@
* @kit AbilityKit
*/
+/*** if arkts 1.1 */
import { AsyncCallback } from '../@ohos.base';
import { ResultSet } from '../data/rdb/resultSet';
import { DataAbilityOperation } from './dataAbilityOperation';
import { DataAbilityResult } from './dataAbilityResult';
import dataAbility from '../@ohos.data.dataAbility';
import rdb from '../@ohos.data.rdb';
+/*** endif */
/**
* DataAbilityHelper
@@ -522,3 +524,17 @@ export interface PacMap {
*/
[key: string]: number | string | boolean | Array | null;
}
+
+/**
+ * Indicates the parameter of the PacMap type.
+ * If a custom Sequenceable object is put in the PacMap object and will be transferred across processes,
+ * you must call BasePacMap.setClassLoader(ClassLoader) to set a class loader for the custom object.
+ * If the PacMap object is to be transferred to a non-OHOS process,
+ * values of primitive types are supported, but not custom Sequenceable objects.
+ *
+ * @typedef { Record | null> }
+ * @syscap SystemCapability.Ability.AbilityRuntime.FAModel
+ * @since 20
+ * @arkts 1.2
+ */
+export type PacMap = Record | null>;
diff --git a/api/application/AbilityDelegator.d.ts b/api/application/AbilityDelegator.d.ts
index d7a91d0bf75b39ceff7ed9a8d674814f5a59ebf3..f9df28ae4cc6a7ac8549981f7281479923fbc44b 100644
--- a/api/application/AbilityDelegator.d.ts
+++ b/api/application/AbilityDelegator.d.ts
@@ -500,7 +500,7 @@ export interface AbilityDelegator {
* Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
*
* @param { AbilityMonitor } monitor - AbilityMonitor object.
- * @param { number } timeout - Maximum wait time, in milliseconds.
+ * @param { long } timeout - Maximum wait time, in milliseconds.
* @param { AsyncCallback } callback - The callback is used to return the Ability object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed.
@@ -510,7 +510,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- waitAbilityMonitor(monitor: AbilityMonitor, timeout: number, callback: AsyncCallback): void;
+ waitAbilityMonitor(monitor: AbilityMonitor, timeout: long, callback: AsyncCallback): void;
/**
* Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
@@ -539,7 +539,7 @@ export interface AbilityDelegator {
* Wait for and returns the Ability object that matches the conditions set in the given AbilityMonitor.
*
* @param { AbilityMonitor } monitor - AbilityMonitor object.
- * @param { number } [timeout] - Maximum wait time, in milliseconds.
+ * @param { long } [timeout] - Maximum wait time, in milliseconds.
* @returns { Promise } Returns the Ability object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000100 - Calling WaitAbilityMonitor failed.
@@ -549,7 +549,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- waitAbilityMonitor(monitor: AbilityMonitor, timeout?: number): Promise;
+ waitAbilityMonitor(monitor: AbilityMonitor, timeout?: long): Promise;
/**
* Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
@@ -614,7 +614,7 @@ export interface AbilityDelegator {
* Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
*
* @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
- * @param { number } timeout - Maximum wait time, in milliseconds.
+ * @param { long } timeout - Maximum wait time, in milliseconds.
* @param { AsyncCallback } callback - The callback is used to return the AbilityStage object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed.
@@ -624,7 +624,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: number, callback: AsyncCallback): void;
+ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout: long, callback: AsyncCallback): void;
/**
* Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
@@ -653,7 +653,7 @@ export interface AbilityDelegator {
* Wait for and returns the AbilityStage object that matches the conditions set in the given AbilityStageMonitor.
*
* @param { AbilityStageMonitor } monitor - AbilityStageMonitor object.
- * @param { number } [timeout] - Maximum wait time, in milliseconds.
+ * @param { long } [timeout] - Maximum wait time, in milliseconds.
* @returns { Promise } Returns the AbilityStage object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000100 - Calling WaitAbilityStageMonitor failed.
@@ -663,7 +663,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: number): Promise;
+ waitAbilityStageMonitor(monitor: AbilityStageMonitor, timeout?: long): Promise;
/**
* Obtain the application context.
@@ -715,7 +715,7 @@ export interface AbilityDelegator {
* Obtain the lifecycle state of a specified ability.
*
* @param { UIAbility } ability - The Ability object.
- * @returns { number } Returns the state of the Ability object.
+ * @returns { int } Returns the state of the Ability object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
@@ -723,7 +723,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- getAbilityState(ability: UIAbility): number;
+ getAbilityState(ability: UIAbility): int;
/**
* Obtain the ability that is currently being displayed in this process.
@@ -1277,7 +1277,7 @@ export interface AbilityDelegator {
* The total length of the log information to be printed cannot exceed 1000 characters.
*
* @param { string } msg - Log information.
- * @param { number } code - Result code.
+ * @param { long } code - Result code.
* @param { AsyncCallback } callback - The callback of finishTest.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000100 - Calling FinishTest failed.
@@ -1287,7 +1287,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- finishTest(msg: string, code: number, callback: AsyncCallback): void;
+ finishTest(msg: string, code: long, callback: AsyncCallback): void;
/**
* Finish the test and print log information to the unit testing console.
@@ -1319,7 +1319,7 @@ export interface AbilityDelegator {
* The total length of the log information to be printed cannot exceed 1000 characters.
*
* @param { string } msg - Log information.
- * @param { number } code - Result code.
+ * @param { long } code - Result code.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000100 - Calling FinishTest failed.
@@ -1329,7 +1329,7 @@ export interface AbilityDelegator {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- finishTest(msg: string, code: number): Promise;
+ finishTest(msg: string, code: long): Promise;
/**
* Used to set a list of mock data.
diff --git a/api/application/AbilityFirstFrameStateData.d.ts b/api/application/AbilityFirstFrameStateData.d.ts
index 6403ed97c0f4cee52f4c7b46f9a7e3e900b28611..a80230badd24f20a3365f7561df5999aec564651 100644
--- a/api/application/AbilityFirstFrameStateData.d.ts
+++ b/api/application/AbilityFirstFrameStateData.d.ts
@@ -24,7 +24,8 @@
* @typedef AbilityFirstFrameStateData
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface AbilityFirstFrameStateData {
/**
@@ -33,7 +34,8 @@ export interface AbilityFirstFrameStateData {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
bundleName: string;
@@ -43,7 +45,8 @@ export interface AbilityFirstFrameStateData {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
moduleName: string;
@@ -53,20 +56,22 @@ export interface AbilityFirstFrameStateData {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
abilityName: string;
/**
* The index of DLP sandbox.
*
- * @type { number }
+ * @type { int }
* @default 0
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- appIndex: number;
+ appIndex: int;
/**
* The entry ability of application is cold-start return true, others false.
@@ -75,7 +80,8 @@ export interface AbilityFirstFrameStateData {
* @default false
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
isColdStart: boolean;
}
\ No newline at end of file
diff --git a/api/application/AbilityFirstFrameStateObserver.d.ts b/api/application/AbilityFirstFrameStateObserver.d.ts
index 842564c65fb39bde7a655e52d8da22c4f80ede7d..c7921c9804c1e3be6cc7f28b70d214a667539a4a 100644
--- a/api/application/AbilityFirstFrameStateObserver.d.ts
+++ b/api/application/AbilityFirstFrameStateObserver.d.ts
@@ -18,7 +18,12 @@
* @kit AbilityKit
*/
+/*** if arkts 1.1 */
import AbilityFirstFrameStateData from './AbilityFirstFrameStateData';
+/*** endif */
+/*** if arkts 1.2 */
+import { AbilityFirstFrameStateData } from './AbilityFirstFrameStateData';
+/*** endif */
/**
* The ability first frame state observer.
@@ -26,7 +31,8 @@ import AbilityFirstFrameStateData from './AbilityFirstFrameStateData';
* @interface AbilityFirstFrameStateObserver
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface AbilityFirstFrameStateObserver {
@@ -36,7 +42,8 @@ export interface AbilityFirstFrameStateObserver {
* @param { AbilityFirstFrameStateData } data - The ability first frame state data.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onAbilityFirstFrameDrawn(data: AbilityFirstFrameStateData): void;
}
\ No newline at end of file
diff --git a/api/application/AbilityForegroundStateObserver.d.ts b/api/application/AbilityForegroundStateObserver.d.ts
index 5ae756b9cd84fee1339b9aea70cd824244ebedbf..7385784d57435e5fb10e6134498e2124c061f328 100644
--- a/api/application/AbilityForegroundStateObserver.d.ts
+++ b/api/application/AbilityForegroundStateObserver.d.ts
@@ -20,6 +20,7 @@
import AbilityStateData from './AbilityStateData';
+/*** if arkts 1.1 */
/**
* The ability foreground state observer.
*
@@ -28,6 +29,20 @@ import AbilityStateData from './AbilityStateData';
* @since 11
*/
export default class AbilityForegroundStateObserver {
+/*** endif */
+
+/*** if arkts 1.2 */
+/**
+ * The ability foreground state observer.
+ *
+ * @typedef AbilityForegroundStateObserver
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi
+ * @since 20
+ * @arkts 1.2
+ */
+declare interface AbilityForegroundStateObserver {
+/*** endif */
/**
* Will be called when foreground or background ability changed.
@@ -35,7 +50,12 @@ export default class AbilityForegroundStateObserver {
* @param { AbilityStateData } abilityStateData State changed ability info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onAbilityStateChanged(abilityStateData: AbilityStateData): void;
}
+
+/*** if arkts 1.2 */
+export default AbilityForegroundStateObserver;
+/*** endif */
diff --git a/api/application/AbilityRunningInfo.d.ts b/api/application/AbilityRunningInfo.d.ts
index d19e8366d30ab65a4ca3aed75a1c5f306d264171..a51812ad4518019f406a3c5563a334dcba1b003f 100644
--- a/api/application/AbilityRunningInfo.d.ts
+++ b/api/application/AbilityRunningInfo.d.ts
@@ -26,7 +26,8 @@ import abilityManager from '../@ohos.app.ability.abilityManager';
*
* @typedef AbilityRunningInfo
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface AbilityRunningInfo {
/**
@@ -43,29 +44,32 @@ export interface AbilityRunningInfo {
* @type { ElementName }
* @default the ohos.bundleManager.ElementName object of the ability.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
ability: ElementName;
/**
* Process ID.
*
- * @type { number }
+ * @type { int }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- pid: number;
+ pid: int;
/**
* User ID.
*
- * @type { number }
+ * @type { int }
* @default user id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* Process name.
@@ -73,19 +77,21 @@ export interface AbilityRunningInfo {
* @type { string }
* @default the name of the process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
processName: string;
/**
* Ability startup time.
*
- * @type { number }
+ * @type { long }
* @default ability start time
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- startTime: number;
+ startTime: long;
/**
* Ability status.
@@ -93,7 +99,8 @@ export interface AbilityRunningInfo {
* @type { abilityManager.AbilityState }
* @default Enumerates state of the ability state info
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
abilityState: abilityManager.AbilityState;
}
diff --git a/api/application/AbilityStartCallback.d.ts b/api/application/AbilityStartCallback.d.ts
index 264dcc2512060fdeaba02ef329be774510e3ed05..1d603802260ce581ee8857eb86e570244d3f2471 100644
--- a/api/application/AbilityStartCallback.d.ts
+++ b/api/application/AbilityStartCallback.d.ts
@@ -21,18 +21,47 @@
/*** if arkts 1.1 */
import type { AbilityResult } from '../ability/abilityResult';
/*** endif */
+/*** if arkts 1.2 */
+import { AbilityResult } from '../ability/abilityResult';
+/*** endif */
import { CompletionHandlerForAbilityStartCallback } from '../@ohos.app.ability.CompletionHandlerForAbilityStartCallback';
+
+/**
+ * Defines a onResult function.
+ *
+ * @typedef { function } OnResultFn
+ * @param { AbilityResult } parameter - The Parameter returned if the UIExtensionAbility call terminateSelfWithResult.
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.2
+ */
+type OnResultFn = (parameter: AbilityResult) => void;
+
+/*** if arkts 1.1 */
/**
* The callback of UIAbility or UIExtensionAbility.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since arkts {'1.1':'11', '1.2':'20'}
- * @arkts 1.1&1.2
+ * @since 11
*/
export default class AbilityStartCallback {
+/*** endif */
+/*** if arkts 1.2 */
+/**
+ * The callback of UIAbility or UIExtensionAbility.
+ *
+ * @typedef AbilityStartCallback
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @stagemodelonly
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+declare interface AbilityStartCallback {
+/*** endif */
/**
* Called when some error occurred except disconnected from UIAbility or UIExtensionAbility.
*
@@ -42,7 +71,8 @@ export default class AbilityStartCallback {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onError(code: number, name: string, message: string): void;
@@ -56,6 +86,17 @@ export default class AbilityStartCallback {
* @since 12
*/
onResult?(parameter: AbilityResult): void;
+
+ /**
+ * Called when UIExtensionAbility terminate with result.
+ *
+ * @type { ?OnResultFn }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @stagemodelonly
+ * @since 20
+ * @arkts 1.2
+ */
+ onResult?: OnResultFn;
/**
* The completion handler of startAbilityByType.
@@ -69,3 +110,7 @@ export default class AbilityStartCallback {
*/
completionHandler?: CompletionHandlerForAbilityStartCallback;
}
+
+/*** if arkts 1.2 */
+export default AbilityStartCallback;
+/*** endif */
\ No newline at end of file
diff --git a/api/application/AbilityStateData.d.ts b/api/application/AbilityStateData.d.ts
index 2512f35105b7a5c854783ab7b64c1d54e145d38c..f1af499c0fd183564f44066802105521ceeb3d89 100644
--- a/api/application/AbilityStateData.d.ts
+++ b/api/application/AbilityStateData.d.ts
@@ -59,42 +59,42 @@ declare class AbilityStateData {
/**
* The pid.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
- pid: number;
+ pid: int;
/**
* The uid.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* The application state.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
- state: number;
+ state: int;
/**
* The ability type, page or service and so on.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
- abilityType: number;
+ abilityType: int;
/**
* Indicates whether the application is atomic service.
@@ -108,12 +108,12 @@ declare class AbilityStateData {
/**
* The app clone index of ability instance.
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since arkts {'1.1':'14', '1.2':'20'}
* @arkts 1.1&1.2
*/
- appCloneIndex?: number;
+ appCloneIndex?: int;
}
export default AbilityStateData;
\ No newline at end of file
diff --git a/api/application/AppForegroundStateObserver.d.ts b/api/application/AppForegroundStateObserver.d.ts
index b798098dcb9f68ee42224b73e45df93629b699f1..f2003221b62e2aff2dac1ea5c32f97709cd3030c 100644
--- a/api/application/AppForegroundStateObserver.d.ts
+++ b/api/application/AppForegroundStateObserver.d.ts
@@ -18,8 +18,14 @@
* @kit AbilityKit
*/
+/*** if arkts 1.1 */
import type AppStateData from './AppStateData';
+/*** endif */
+/*** if arkts 1.2 */
+import AppStateData from './AppStateData';
+/*** endif */
+/*** if arkts 1.1 */
/**
* The app foreground state observer.
*
@@ -28,13 +34,32 @@ import type AppStateData from './AppStateData';
* @since 11
*/
export default class AppForegroundStateObserver {
+/*** endif */
+
+/*** if arkts 1.2 */
+/**
+ * The app foreground state observer.
+ *
+ * @typedef AppForegroundStateObserver
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @systemapi
+ * @since 20
+ * @arkts 1.2
+ */
+declare interface AppForegroundStateObserver {
+/*** endif */
/**
* Will be called when foreground or background application changed.
*
* @param { AppStateData } appStateData - State changed application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onAppStateChanged(appStateData: AppStateData): void;
}
+
+/*** if arkts 1.2 */
+export default AppForegroundStateObserver;
+/*** endif */
diff --git a/api/application/ApplicationContext.d.ts b/api/application/ApplicationContext.d.ts
index 988d517a9e298aaa676b7106c0a3ec862bc7bfd9..f1e93ad28224a7d3d62db0fd98bb09ed76e5fc27 100644
--- a/api/application/ApplicationContext.d.ts
+++ b/api/application/ApplicationContext.d.ts
@@ -23,11 +23,14 @@ import { AsyncCallback } from '../@ohos.base';
import { ProcessInformation } from './ProcessInformation';
import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
import Want from '../@ohos.app.ability.Want';
+import EnvironmentCallback from '../@ohos.app.ability.EnvironmentCallback';
/*** if arkts 1.1 */
import AbilityLifecycleCallback from '../@ohos.app.ability.AbilityLifecycleCallback';
-import EnvironmentCallback from '../@ohos.app.ability.EnvironmentCallback';
import type ApplicationStateChangeCallback from '../@ohos.app.ability.ApplicationStateChangeCallback';
/*** endif */
+/*** if arkts 1.2 */
+import ApplicationStateChangeCallback from '../@ohos.app.ability.ApplicationStateChangeCallback';
+/*** endif */
/**
* The context of an application. It allows access to application-specific resources.
@@ -204,25 +207,19 @@ declare class ApplicationContext extends Context {
* @since 9
*/
/**
- * Registers a listener for system environment changes.
- * This API uses an asynchronous callback to return the result.
- *
- * **NOTE**:
- *
It can be called only by the main thread.
- *
+ * Register environment callback.
*
- * @param { 'environment' } type - Event type.
- * @param { EnvironmentCallback } callback - Callback used to return the system environment changes.
- * @returns { number } ID of the registered listener. The ID is incremented by 1 each time the listener is
- * registered. When the ID exceeds 2^63-1, -1 is returned.
- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
- * 2.Incorrect parameter types.
+ * @param { 'environment' } type - environment.
+ * @param { EnvironmentCallback } callback - The environment callback.
+ * @returns { int } Returns the number code of the callback.
+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- on(type: 'environment', callback: EnvironmentCallback): number;
+ on(type: 'environment', callback: EnvironmentCallback): int;
/**
* Unregister environment callback.
@@ -236,25 +233,19 @@ declare class ApplicationContext extends Context {
* @since 9
*/
/**
- * Unregisters the listener for system environment changes.
- * This API uses an asynchronous callback to return the result.
- *
- * **NOTE**:
- *
It can be called only by the main thread.
- *
+ * Unregister environment callback.
*
- * @param { 'environment' } type - Event type.
- * @param { number } callbackId - ID of the listener to unregister.
- * @param { AsyncCallback } callback - Callback used to return the result. If the deregistration is successful,
- * err is undefined. Otherwise, err is an error object.
- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
- * 2.Incorrect parameter types.
+ * @param { 'environment' } type - environment.
+ * @param { int } callbackId - Indicates the number code of the callback.
+ * @param { AsyncCallback } callback - The callback of unregisterEnvironmentCallback.
+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- off(type: 'environment', callbackId: number, callback: AsyncCallback): void;
+ off(type: 'environment', callbackId: int, callback: AsyncCallback): void;
/**
* Unregister environment callback.
@@ -268,24 +259,19 @@ declare class ApplicationContext extends Context {
* @since 9
*/
/**
- * Unregisters the listener for system environment changes.
- * This API uses a promise to return the result.
- *
- * **NOTE**:
- *
It can be called only by the main thread.
- *
+ * Unregister environment callback.
*
- * @param { 'environment' } type - Event type.
- * @param { number } callbackId - ID of the listener to unregister.
- * @returns { Promise } Promise that returns no value.
- * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
- * 2.Incorrect parameter types.
+ * @param { 'environment' } type - environment.
+ * @param { int } callbackId - Indicates the number code of the callback.
+ * @returns { Promise } The promise returned by the function.
+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- off(type: 'environment', callbackId: number): Promise;
+ off(type: 'environment', callbackId: int): Promise;
/**
* Register applicationStateChange callback.
@@ -326,7 +312,8 @@ declare class ApplicationContext extends Context {
* @stagemodelonly
* @crossplatform
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
on(type: 'applicationStateChange', callback: ApplicationStateChangeCallback): void;
@@ -371,7 +358,8 @@ declare class ApplicationContext extends Context {
* @stagemodelonly
* @crossplatform
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
off(type: 'applicationStateChange', callback?: ApplicationStateChangeCallback): void;
@@ -549,6 +537,20 @@ declare class ApplicationContext extends Context {
*/
killAllProcesses(callback: AsyncCallback);
+ /**
+ * Kill all processes of the application
+ *
+ * @param { AsyncCallback } callback - The callback of killAllProcesses.
+ * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
+ * @throws { BusinessError } 16000011 - The context does not exist.
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @stagemodelonly
+ * @atomicservice
+ * @since 20
+ * @arkts 1.2
+ */
+ killAllProcesses(callback: AsyncCallback): void;
+
/**
* Set colorMode of the application
*
@@ -776,28 +778,22 @@ declare class ApplicationContext extends Context {
setFont(font: string): void;
/**
- * Obtains the index of the current application clone.
+ * Get current app clone index.
*
- * @returns { number } Index of the current application clone.
+ * @returns { int } Returns the app clone index for current app.
* @throws { BusinessError } 16000011 - The context does not exist.
- * @throws { BusinessError } 16000071 - App clone is not supported.
+ * @throws { BusinessError } 16000071 - The MultiAppMode is not {@link App_CLONE}.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- getCurrentAppCloneIndex(): number;
+ getCurrentAppCloneIndex(): int;
/**
- * Sets the scale ratio for the font size of this application.
- *
- * **NOTE**:
- *
It can be called only by the main thread.
- *
- *
- * @param {number} fontSizeScale - Font scale ratio. The value is a non-negative number. When the application's
- * {@link fontSizeScale} is set to followSystem and the value set here exceeds the value of
- * fontSizeMaxScale, the value of fontSizeMaxScale takes effect.
+ * Set font size scale.
+ * @param {double} fontSizeScale - Font size scale.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
@@ -812,7 +808,7 @@ declare class ApplicationContext extends Context {
*
It can be called only by the main thread.
*
*
- * @param {number} fontSizeScale - Font scale ratio. The value is a non-negative number. When the application's
+ * @param {double} fontSizeScale - Font scale ratio. The value is a non-negative number. When the application's
* {@link fontSizeScale} is set to followSystem and the value set here exceeds the value of
* fontSizeMaxScale, the value of fontSizeMaxScale takes effect.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
@@ -822,7 +818,7 @@ declare class ApplicationContext extends Context {
* @since 21
* @arkts 1.1&1.2
*/
- setFontSizeScale(fontSizeScale: number): void;
+ setFontSizeScale(fontSizeScale: double): void;
/**
* Obtains the unique instance ID of this application.
@@ -837,7 +833,8 @@ declare class ApplicationContext extends Context {
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
getCurrentInstanceKey(): string;
@@ -857,7 +854,8 @@ declare class ApplicationContext extends Context {
* @throws { BusinessError } 16000078 - The multi-instance is not supported.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
getAllRunningInstanceKeys(): Promise>;
}
diff --git a/api/application/ApplicationStateObserver.d.ts b/api/application/ApplicationStateObserver.d.ts
index ff86fd03c2c126f55847821eac7aedd3ab524a38..774140bc52aa8ebcade5b3db727f6e941de8c211 100644
--- a/api/application/ApplicationStateObserver.d.ts
+++ b/api/application/ApplicationStateObserver.d.ts
@@ -20,8 +20,14 @@
import AppStateData from './AppStateData';
import AbilityStateData from './AbilityStateData';
-import * as _ProcessData from './ProcessData';
+/*** if arkts 1.1 */
+import type * as _ProcessData from './ProcessData';
+/*** endif */
+/*** if arkts 1.2 */
+import _ProcessData from './ProcessData';
+/*** endif */
+/*** if arkts 1.1 */
/**
* The application state observer.
*
@@ -29,12 +35,25 @@ import * as _ProcessData from './ProcessData';
* @since 14
*/
export default class ApplicationStateObserver {
+/*** endif */
+
+/*** if arkts 1.2 */
+/**
+ * The application state observer.
+ *
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.2
+ */
+declare interface ApplicationStateObserver {
+/*** endif */
/**
* Will be called when foreground or background application changed.
*
* @param { AppStateData } appStateData - State changed Application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onForegroundApplicationChanged(appStateData: AppStateData): void;
@@ -43,7 +62,8 @@ export default class ApplicationStateObserver {
*
* @param { AbilityStateData } abilityStateData - State changed ability info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onAbilityStateChanged(abilityStateData: AbilityStateData): void;
@@ -52,7 +72,8 @@ export default class ApplicationStateObserver {
*
* @param { ProcessData } processData - Process info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onProcessCreated(processData: ProcessData): void;
@@ -61,7 +82,8 @@ export default class ApplicationStateObserver {
*
* @param { ProcessData } processData - Process info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onProcessDied(processData: ProcessData): void;
@@ -70,7 +92,8 @@ export default class ApplicationStateObserver {
*
* @param { ProcessData } processData - Process info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onProcessStateChanged(processData: ProcessData): void;
@@ -79,7 +102,8 @@ export default class ApplicationStateObserver {
*
* @param { AppStateData } appStateData - State changed Application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onAppStarted(appStateData: AppStateData): void;
@@ -88,7 +112,8 @@ export default class ApplicationStateObserver {
*
* @param { AppStateData } appStateData - State changed Application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
onAppStopped(appStateData: AppStateData): void;
}
@@ -100,3 +125,16 @@ export default class ApplicationStateObserver {
* @since 14
*/
export type ProcessData = _ProcessData.default;
+
+/**
+ * The process data.
+ * @typedef { _ProcessData }
+ * @syscap SystemCapability.Ability.AbilityRuntime.Core
+ * @since 20
+ * @arkts 1.2
+ */
+export type ProcessData = _ProcessData;
+
+/*** if arkts 1.2 */
+export default ApplicationStateObserver;
+/*** endif */
diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts
index 42da72a655e29f8406a2c81478d5fb53f60fab55..61b5f46e640d928574de581711325267ac03b226 100644
--- a/api/application/Context.d.ts
+++ b/api/application/Context.d.ts
@@ -19,11 +19,11 @@
*/
/*** if arkts 1.1 */
-import type { AsyncCallback } from '../@ohos.base';
import EventHub from './EventHub';
/*** endif */
import { ApplicationInfo } from '../bundleManager/ApplicationInfo';
import ApplicationContext from './ApplicationContext';
+import type { AsyncCallback } from '../@ohos.base';
import BaseContext from './BaseContext';
import resmgr from '../@ohos.resourceManager';
import contextConstant from '../@ohos.app.ability.contextConstant';
@@ -299,7 +299,8 @@ declare class Context extends BaseContext {
* @stagemodelonly
* @crossplatform
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
bundleCodeDir: string;
@@ -318,7 +319,8 @@ declare class Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
distributedFilesDir: string;
@@ -335,7 +337,8 @@ declare class Context extends BaseContext {
* @stagemodelonly
* @crossplatform
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
resourceDir: string;
@@ -346,7 +349,8 @@ declare class Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
cloudFileDir: string;
@@ -430,7 +434,8 @@ declare class Context extends BaseContext {
* @stagemodelonly
* @crossplatform
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
processName: string;
@@ -596,7 +601,8 @@ declare class Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
getGroupDir(dataGroupID: string, callback: AsyncCallback): void;
@@ -624,7 +630,8 @@ declare class Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
getGroupDir(dataGroupID: string): Promise;
@@ -657,7 +664,8 @@ declare class Context extends BaseContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
createAreaModeContext(areaMode: contextConstant.AreaMode): Context;
@@ -665,16 +673,17 @@ declare class Context extends BaseContext {
* Creates the context based on the specified display ID, so as to obtain and use other application contexts with
* screen information (including ScreenDensity and Direction).
*
- * @param { number } displayId - Display ID.
+ * @param { long } displayId - Display ID.
* @returns { Context } Context with the specified screen information.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified.
* 2.Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 15
+ * @since arkts {'1.1':'15', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- createDisplayContext(displayId: number): Context;
+ createDisplayContext(displayId: long): Context;
}
export default Context;
\ No newline at end of file
diff --git a/api/application/CustomData.d.ts b/api/application/CustomData.d.ts
index e05cd5db66fc43e05f4997ea22c335c61733221f..cb8dc654c6ad205a98ff2c03074294389506b569 100644
--- a/api/application/CustomData.d.ts
+++ b/api/application/CustomData.d.ts
@@ -27,7 +27,8 @@
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @stagemodelonly
- * @since 13
+ * @since arkts {'1.1':'13', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export default interface CustomData {
/**
@@ -38,7 +39,8 @@ export default interface CustomData {
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @systemapi
* @stagemodelonly
- * @since 13
+ * @since arkts {'1.1':'13', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
data: Record;
}
\ No newline at end of file
diff --git a/api/application/EventHub.d.ts b/api/application/EventHub.d.ts
index 8b1a3fb6c114b4c5e553a988db3165661201b1a4..921b346a518e7d26052aa683a3fe0c2ba7711967 100644
--- a/api/application/EventHub.d.ts
+++ b/api/application/EventHub.d.ts
@@ -42,7 +42,8 @@ import { BusinessError } from '../@ohos.base';
* @stagemodelonly
* @crossplatform
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export default class EventHub {
/**
diff --git a/api/application/ExtensionRunningInfo.d.ts b/api/application/ExtensionRunningInfo.d.ts
index 6c23c5536b7375a6a17ecac825f7260e7d2d83a7..f0176db81e9e914d8bc5751c8bad498d9aa66802 100644
--- a/api/application/ExtensionRunningInfo.d.ts
+++ b/api/application/ExtensionRunningInfo.d.ts
@@ -27,7 +27,8 @@ import bundle from '../@ohos.bundle.bundleManager';
* @typedef ExtensionRunningInfo
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface ExtensionRunningInfo {
/**
@@ -35,52 +36,58 @@ export interface ExtensionRunningInfo {
* @default Indicates the extension of the extension info
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
extension: ElementName;
/**
- * @type { number }
+ * @type { int }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- pid: number;
+ pid: int;
/**
- * @type { number }
+ * @type { int }
* @default user id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* @type { string }
* @default the name of the process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
processName: string;
/**
- * @type { number }
+ * @type { long }
* @default ability start time
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- startTime: number;
+ startTime: long;
/**
* @type { Array }
* @default All package names under the current process
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
clientPackage: Array;
@@ -89,7 +96,8 @@ export interface ExtensionRunningInfo {
* @default Enumerates types of the extension info
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
type: bundle.ExtensionAbilityType;
}
diff --git a/api/application/MissionInfo.d.ts b/api/application/MissionInfo.d.ts
index 7f7681f119eb5b08dc6ea4a8119a727f70a1341c..b725343347d82d5597bcf9da278f650ac5f304c7 100644
--- a/api/application/MissionInfo.d.ts
+++ b/api/application/MissionInfo.d.ts
@@ -26,28 +26,31 @@ import Want from '../@ohos.app.ability.Want';
* @typedef MissionInfo
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
export interface MissionInfo {
/**
* Indicates mission id.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- missionId: number;
+ missionId: int;
/**
* Indicates running state.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- runningState: number;
+ runningState: int;
/**
* Indicates locked state.
@@ -55,7 +58,8 @@ export interface MissionInfo {
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
lockedState: boolean;
@@ -65,7 +69,8 @@ export interface MissionInfo {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
timestamp: string;
@@ -75,7 +80,8 @@ export interface MissionInfo {
* @type { Want }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
want: Want;
@@ -85,7 +91,8 @@ export interface MissionInfo {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
label: string;
@@ -95,7 +102,8 @@ export interface MissionInfo {
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
iconPath: string;
@@ -105,19 +113,21 @@ export interface MissionInfo {
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 8
+ * @since arkts {'1.1':'8', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
continuable: boolean;
/**
* Indicates the ability state of this mission.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- abilityState: number;
+ abilityState: int;
/**
* Indicates whether the mission is unclearable.
@@ -125,7 +135,8 @@ export interface MissionInfo {
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @systemapi
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
unclearable: boolean;
}
diff --git a/api/application/ProcessData.d.ts b/api/application/ProcessData.d.ts
index 7d6df91bbfa342da09cd02e440e31c974c2c7118..11f6e18b0350736c8c37c83f014b1c13c2831fc5 100644
--- a/api/application/ProcessData.d.ts
+++ b/api/application/ProcessData.d.ts
@@ -22,51 +22,57 @@
* The process data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
-export default class ProcessData {
+declare class ProcessData {
/**
* The bundle name.
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
bundleName: string;
/**
* The pid.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- pid: number;
+ pid: int;
/**
* The uid.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* The process state.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- state: number;
+ state: int;
/**
* Whether the process is continuous task.
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
isContinuousTask: boolean;
@@ -75,7 +81,10 @@ export default class ProcessData {
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
isKeepAlive: boolean;
}
+
+export default ProcessData;
\ No newline at end of file
diff --git a/api/application/ProcessInformation.d.ts b/api/application/ProcessInformation.d.ts
index 8f64c790d66fd7e83a38a4b3841040b06904c5b3..77d2f9b1cfa71b88d3fed513678e76d7f7b39083 100644
--- a/api/application/ProcessInformation.d.ts
+++ b/api/application/ProcessInformation.d.ts
@@ -67,7 +67,7 @@ export interface ProcessInformation {
* @since 10
*/
/**
- * @type { number }
+ * @type { int }
* @default process id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
@@ -75,7 +75,7 @@ export interface ProcessInformation {
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- pid: number;
+ pid: int;
/**
* @type { number }
@@ -84,14 +84,14 @@ export interface ProcessInformation {
* @since 9
*/
/**
- * @type { number }
+ * @type { int }
* @default user id
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* @type { string }
@@ -174,11 +174,11 @@ export interface ProcessInformation {
/**
* The app clone index of current process if app is multi app mode.
- * @type { ?number }
+ * @type { ?int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- appCloneIndex?: number;
+ appCloneIndex?: int;
}
diff --git a/api/application/RunningAppClone.d.ts b/api/application/RunningAppClone.d.ts
index 261cb1d15ab7804913898229678934892a6b2597..02f2c8dc4e975bd75c4ba60699ae434e87cc299e 100644
--- a/api/application/RunningAppClone.d.ts
+++ b/api/application/RunningAppClone.d.ts
@@ -31,33 +31,33 @@ export interface RunningAppClone {
/**
* The app clone index of current single app.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- appCloneIndex: number;
+ appCloneIndex: int;
/**
* The uid of current single app.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* All pids of current single app.
*
- * @type { Array }
+ * @type { Array }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since arkts {'1.1':'12', '1.2':'20'}
* @arkts 1.1&1.2
*/
- pids: Array;
+ pids: Array;
}
\ No newline at end of file
diff --git a/api/application/RunningMultiAppInfo.d.ts b/api/application/RunningMultiAppInfo.d.ts
index cb77e92feb76f6e4a8633f3d389d72b3e6cfa0a8..f5732fa40b82cdc56b3f2b6a6dbe7aa1c62ad06e 100644
--- a/api/application/RunningMultiAppInfo.d.ts
+++ b/api/application/RunningMultiAppInfo.d.ts
@@ -51,7 +51,8 @@ export interface RunningMultiAppInfo {
* @type { MultiAppMode }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
mode: MultiAppMode;
@@ -72,7 +73,8 @@ export interface RunningMultiAppInfo {
* @type { ?Array }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
runningAppClones?: Array;
}
\ No newline at end of file
diff --git a/api/application/RunningMultiInstanceInfo.d.ts b/api/application/RunningMultiInstanceInfo.d.ts
index 1645db4051150699348f31ddabb10c8ac71a571a..24b0df4c53f4b242c23116b1f3b89902632d9ece 100644
--- a/api/application/RunningMultiInstanceInfo.d.ts
+++ b/api/application/RunningMultiInstanceInfo.d.ts
@@ -42,20 +42,22 @@ export interface RunningMultiInstanceInfo {
/**
* The uid of current app instance.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- uid: number;
+ uid: int;
/**
* All pids of current app instance.
*
- * @type { Array }
+ * @type { Array }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- pids: Array;
+ pids: Array;
}
\ No newline at end of file
diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts
index f73a7e275a5bc42e5143e272467d6712de7db099..158b56effdf382aee55dd669444d51dc6e8d039e 100644
--- a/api/application/ServiceExtensionContext.d.ts
+++ b/api/application/ServiceExtensionContext.d.ts
@@ -19,12 +19,12 @@
*/
/*** if arkts 1.1 */
-import { ConnectOptions } from '../ability/connectOptions';
import { Caller } from '../@ohos.app.ability.UIAbility';
import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
/*** endif */
import { AsyncCallback } from '../@ohos.base';
+import { ConnectOptions } from '../ability/connectOptions';
import ExtensionContext from './ExtensionContext';
import StartOptions from '../@ohos.app.ability.StartOptions';
import Want from '../@ohos.app.ability.Want';
@@ -1614,7 +1614,8 @@ declare class ServiceExtensionContext extends ExtensionContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
stopServiceExtensionAbility(want: Want, callback: AsyncCallback): void;
@@ -1662,7 +1663,8 @@ declare class ServiceExtensionContext extends ExtensionContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
stopServiceExtensionAbility(want: Want): Promise;
@@ -1869,7 +1871,7 @@ declare class ServiceExtensionContext extends ExtensionContext {
*
* @param { Want } want - Indicates the service extension to connect.
* @param { ConnectOptions } options - Indicates the callback of connection.
- * @returns { number } Returns the connection id.
+ * @returns { long } Returns the connection id.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
@@ -1886,9 +1888,10 @@ declare class ServiceExtensionContext extends ExtensionContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
+ connectServiceExtensionAbility(want: Want, options: ConnectOptions): long;
/**
* Connects an ability to a Service extension with account.
@@ -1953,7 +1956,7 @@ declare class ServiceExtensionContext extends ExtensionContext {
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
- * @param { number } connection - the connection id returned from connectAbility api.
+ * @param { long } connection - the connection id returned from connectAbility api.
* @param { AsyncCallback } callback - The callback of disconnectAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
@@ -1962,14 +1965,15 @@ declare class ServiceExtensionContext extends ExtensionContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback): void;
+ disconnectServiceExtensionAbility(connection: long, callback: AsyncCallback): void;
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
- * @param { number } connection - the connection id returned from connectAbility api.
+ * @param { long } connection - the connection id returned from connectAbility api.
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
@@ -1978,9 +1982,10 @@ declare class ServiceExtensionContext extends ExtensionContext {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @stagemodelonly
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- disconnectServiceExtensionAbility(connection: number): Promise;
+ disconnectServiceExtensionAbility(connection: long): Promise;
/**
* Get the caller object of the startup capability.
diff --git a/api/application/UIAbilityContext.d.ts b/api/application/UIAbilityContext.d.ts
index d8b9b4fa64dde69958a1cd5249c6be4f0cb269a1..38fcfc010dc95690061118f3a40dd85034d05bec 100644
--- a/api/application/UIAbilityContext.d.ts
+++ b/api/application/UIAbilityContext.d.ts
@@ -19,17 +19,12 @@
*/
/*** if arkts 1.1 */
-import { ConnectOptions } from '../ability/connectOptions';
-import { Caller } from '../@ohos.app.ability.UIAbility';
import image from '../@ohos.multimedia.image';
import dialogRequest from '../@ohos.app.ability.dialogRequest';
import AbilityConstant from '../@ohos.app.ability.AbilityConstant';
import contextConstant from '../@ohos.app.ability.contextConstant';
-import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
-import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
import type UIServiceProxy from './UIServiceProxy';
import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectCallback';
-import type AbilityStartCallback from './AbilityStartCallback';
/*** endif */
import { AbilityInfo } from '../bundleManager/AbilityInfo';
import { AbilityResult } from '../ability/abilityResult';
@@ -41,6 +36,11 @@ import Want from '../@ohos.app.ability.Want';
import StartOptions from '../@ohos.app.ability.StartOptions';
import { Configuration } from '../@ohos.app.ability.Configuration';
import window from '../@ohos.window';
+import { ConnectOptions } from '../ability/connectOptions';
+import { Caller } from '../@ohos.app.ability.UIAbility';
+import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
+import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
+import type AbilityStartCallback from './AbilityStartCallback';
/**
* The context of an ability. It allows access to ability-specific resources.
@@ -1299,7 +1299,8 @@ declare class UIAbilityContext extends Context {
* @throws { BusinessError } 16000080 - Creating a new instance is not supported.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityByCall(want: Want): Promise;
@@ -3602,7 +3603,7 @@ declare class UIAbilityContext extends Context {
*
* @param { Want } want - The element name of the service ability
* @param { ConnectOptions } options - The remote object instance
- * @returns { number } Returns the number code of the ability connected
+ * @returns { long } Returns the number code of the ability connected
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
@@ -3617,9 +3618,10 @@ declare class UIAbilityContext extends Context {
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
+ connectServiceExtensionAbility(want: Want, options: ConnectOptions): long;
/**
* Connects the current ability to an service extension ability with account.
@@ -3676,30 +3678,32 @@ declare class UIAbilityContext extends Context {
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
- * @param { number } connection - The number code of the ability connected
+ * @param { long } connection - The number code of the ability connected
* @param { AsyncCallback } callback - The callback of disconnectAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback): void;
+ disconnectServiceExtensionAbility(connection: long, callback: AsyncCallback): void;
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
- * @param { number } connection - The number code of the ability connected
+ * @param { long } connection - The number code of the ability connected
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 9
+ * @since arkts {'1.1':'9', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- disconnectServiceExtensionAbility(connection: number): Promise;
+ disconnectServiceExtensionAbility(connection: long): Promise;
/**
* Set mission label of current ability.
@@ -3724,7 +3728,8 @@ declare class UIAbilityContext extends Context {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
setMissionLabel(label: string, callback: AsyncCallback): void;
@@ -3751,7 +3756,8 @@ declare class UIAbilityContext extends Context {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 11
+ * @since arkts {'1.1':'11', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
setMissionLabel(label: string): Promise;
@@ -4512,7 +4518,8 @@ declare class UIAbilityContext extends Context {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityByType(type: string, wantParam: Record,
abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void;
@@ -4661,7 +4668,8 @@ declare class UIAbilityContext extends Context {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
openAtomicService(appId: string, options?: AtomicServiceOptions): Promise;
@@ -4843,7 +4851,8 @@ declare class UIAbilityContext extends Context {
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
setColorMode(colorMode: ConfigurationConstant.ColorMode): void;
diff --git a/api/application/UIExtensionContext.d.ts b/api/application/UIExtensionContext.d.ts
index c0ae66aa3783df09e35330abd3776b982bd5c425..3e9a8bb1751742673c58e77990c238a2ea0a29d4 100755
--- a/api/application/UIExtensionContext.d.ts
+++ b/api/application/UIExtensionContext.d.ts
@@ -20,6 +20,7 @@
import type { AsyncCallback } from '../@ohos.base';
+import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
import ExtensionContext from './ExtensionContext';
import type Want from '../@ohos.app.ability.Want';
import type StartOptions from '../@ohos.app.ability.StartOptions';
@@ -28,12 +29,12 @@ import type { AbilityResult } from '../ability/abilityResult';
import type { ConnectOptions } from '../ability/connectOptions';
import type AtomicServiceOptions from '../@ohos.app.ability.AtomicServiceOptions';
import OpenLinkOptions from '../@ohos.app.ability.OpenLinkOptions';
-import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant';
import type UIServiceProxy from './UIServiceProxy';
import type UIServiceExtensionConnectCallback from './UIServiceExtensionConnectCallback';
/*** endif */
/*** if arkts 1.2 */
import { AbilityResult } from '../ability/abilityResult';
+import { ConnectOptions } from '../ability/connectOptions';
/*** endif */
/**
@@ -528,7 +529,8 @@ declare class UIExtensionContext extends ExtensionContext {
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityForResult(want: Want, callback: AsyncCallback): void;
@@ -637,7 +639,8 @@ declare class UIExtensionContext extends ExtensionContext {
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback): void;
@@ -752,7 +755,8 @@ declare class UIExtensionContext extends ExtensionContext {
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 14
+ * @since arkts {'1.1':'14', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
startAbilityForResult(want: Want, options?: StartOptions): Promise;
@@ -824,7 +828,7 @@ declare class UIExtensionContext extends ExtensionContext {
*
* @param { Want } want - The element name of the service ability
* @param { ConnectOptions } options - The remote object instance
- * @returns { number } Returns the number code of the ability connected
+ * @returns { long } Returns the number code of the ability connected
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
@@ -840,37 +844,40 @@ declare class UIExtensionContext extends ExtensionContext {
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
+ connectServiceExtensionAbility(want: Want, options: ConnectOptions): long;
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
- * @param { number } connection - The number code of the ability connected
+ * @param { long } connection - The number code of the ability connected
* @param { AsyncCallback } callback - The callback of disconnectAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- disconnectServiceExtensionAbility(connection: number, callback: AsyncCallback): void;
+ disconnectServiceExtensionAbility(connection: long, callback: AsyncCallback): void;
/**
* Disconnect an ability from a service extension, in contrast to {@link connectAbility}.
*
- * @param { number } connection - The number code of the ability connected
+ * @param { long } connection - The number code of the ability connected
* @returns { Promise } The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 10
+ * @since arkts {'1.1':'10', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
- disconnectServiceExtensionAbility(connection: number): Promise;
+ disconnectServiceExtensionAbility(connection: long): Promise;
/**
* Report to system when the extension is drawn completed.
@@ -880,7 +887,8 @@ declare class UIExtensionContext extends ExtensionContext {
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
reportDrawnCompleted(callback: AsyncCallback): void;
@@ -1112,7 +1120,8 @@ declare class UIExtensionContext extends ExtensionContext {
* @throws { BusinessError } 16000011 - The context does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
- * @since 18
+ * @since arkts {'1.1':'18', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
setColorMode(colorMode: ConfigurationConstant.ColorMode): void;
diff --git a/api/application/shellCmdResult.d.ts b/api/application/shellCmdResult.d.ts
index a6b5ca83b48b0867f3a2eafe4c57733f2705d999..3a43b03a409044ebe01202887e8a9211429ef63d 100644
--- a/api/application/shellCmdResult.d.ts
+++ b/api/application/shellCmdResult.d.ts
@@ -63,13 +63,13 @@ export interface ShellCmdResult {
/**
* shell cmd exec result.
*
- * @type { number }
+ * @type { int }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since arkts {'1.1':'11', '1.2':'20'}
* @arkts 1.1&1.2
*/
- exitCode: number;
+ exitCode: int;
}
/*** if arkts 1.1 */
diff --git a/api/wantAgent/wantAgentInfo.d.ts b/api/wantAgent/wantAgentInfo.d.ts
index 47e51b5367ab0d033713ff6646d57ce2f97549f6..e0ebefedff030e7010cae6207dd5aea818310784 100644
--- a/api/wantAgent/wantAgentInfo.d.ts
+++ b/api/wantAgent/wantAgentInfo.d.ts
@@ -112,7 +112,8 @@ export interface WantAgentInfo {
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
- * @since 12
+ * @since arkts {'1.1':'12', '1.2':'20'}
+ * @arkts 1.1&1.2
*/
requestCode: number;