From f256b66e9a5419d94af5f8a21aa8ce65b92ef515 Mon Sep 17 00:00:00 2001 From: zhangzezhong Date: Tue, 19 Aug 2025 16:27:30 +0800 Subject: [PATCH] add missionManager Signed-off-by: zhangzezhong --- api/@ohos.app.ability.missionManager.d.ts | 177 ++++++++++++---------- api/application/MissionListener.d.ts | 24 ++- api/application/MissionSnapshot.d.ts | 9 +- 3 files changed, 122 insertions(+), 88 deletions(-) diff --git a/api/@ohos.app.ability.missionManager.d.ts b/api/@ohos.app.ability.missionManager.d.ts index 36a47ddd11..e2e3730b55 100644 --- a/api/@ohos.app.ability.missionManager.d.ts +++ b/api/@ohos.app.ability.missionManager.d.ts @@ -20,11 +20,9 @@ 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. @@ -42,23 +40,24 @@ declare namespace missionManager { * @permission ohos.permission.MANAGE_MISSIONS * @param { 'mission' } type - mission. * @param { MissionListener } listener - Indicates the MissionListener to be registered. - * @returns { number } Returns the index number of the MissionListener. + * @returns { int } Returns the index number of the MissionListener. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @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.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'mission', listener: MissionListener): number; + function on(type: 'mission', listener: MissionListener): int; /** * Unregister the missionListener to ams. * * @permission ohos.permission.MANAGE_MISSIONS * @param { 'mission' } type - mission. - * @param { number } listenerId - Indicates the listener id to be unregistered. + * @param { int } listenerId - Indicates the listener id to be unregistered. * @param { AsyncCallback } callback - The callback of off. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -67,16 +66,17 @@ declare namespace missionManager { * @throws { BusinessError } 16300002 - The specified mission listener does not exist. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function off(type: 'mission', listenerId: number, callback: AsyncCallback): void; + function off(type: 'mission', listenerId: int, callback: AsyncCallback): void; /** * Unregister the missionListener to ams. * * @permission ohos.permission.MANAGE_MISSIONS * @param { 'mission' } type - mission. - * @param { number } listenerId - Indicates the listener id to be unregistered. + * @param { int } listenerId - Indicates the listener id to be unregistered. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -85,9 +85,10 @@ declare namespace missionManager { * @throws { BusinessError } 16300002 - The specified mission listener does not exist. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function off(type: 'mission', listenerId: number): Promise; + function off(type: 'mission', listenerId: int): Promise; /** * Get the missionInfo with the given missionId. @@ -130,7 +131,7 @@ declare namespace missionManager { * * @permission ohos.permission.MANAGE_MISSIONS * @param { string } deviceId - Indicates the device to be queried. - * @param { number } numMax - Indicates the maximum number of returned missions. + * @param { int } numMax - Indicates the maximum number of returned missions. * @param { AsyncCallback> } callback - The callback is used to return the array of the MissionInfo. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -138,16 +139,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 getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback>): void; + function getMissionInfos(deviceId: string, numMax: int, callback: AsyncCallback>): void; /** * Get missionInfos in the given deviceId with maximum number of numMax. * * @permission ohos.permission.MANAGE_MISSIONS * @param { string } deviceId - Indicates the device to be queried. - * @param { number } numMax - Indicates the maximum number of returned missions. + * @param { int } numMax - Indicates the maximum number of returned missions. * @returns { Promise> } Returns the array of the MissionInfo. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -155,16 +157,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 getMissionInfos(deviceId: string, numMax: number): Promise>; + function getMissionInfos(deviceId: string, numMax: int): Promise>; /** * Get the mission snapshot 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. * @param { AsyncCallback } callback - The callback is used to return the MissionSnapshot of * the given id. * @throws { BusinessError } 201 - Permission denied. @@ -173,16 +176,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 getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void; + function getMissionSnapShot(deviceId: string, missionId: int, callback: AsyncCallback): void; /** * Get the mission snapshot 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 MissionSnapshot of the given id. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -190,16 +194,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 getMissionSnapShot(deviceId: string, missionId: number): Promise; + function getMissionSnapShot(deviceId: string, missionId: int): Promise; /** * Get the mission low resolution snapshot 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. * @param { AsyncCallback } callback - The callback is used to return the MissionSnapshot of * the given id. * @throws { BusinessError } 201 - Permission denied. @@ -208,11 +213,12 @@ 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 getLowResolutionMissionSnapShot( deviceId: string, - missionId: number, + missionId: int, callback: AsyncCallback ): void; @@ -221,7 +227,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. * @returns { Promise } Returns the MissionSnapshot of the given id. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -229,15 +235,16 @@ 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 getLowResolutionMissionSnapShot(deviceId: string, missionId: number): Promise; + function getLowResolutionMissionSnapShot(deviceId: string, missionId: int): Promise; /** * Lock the mission. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be locked. + * @param { int } missionId - Indicates mission id to be locked. * @param { AsyncCallback } callback - The callback of lockMission. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -246,15 +253,16 @@ declare namespace missionManager { * @throws { BusinessError } 16300001 - Mission not found. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function lockMission(missionId: number, callback: AsyncCallback): void; + function lockMission(missionId: int, callback: AsyncCallback): void; /** * Lock the mission. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be locked. + * @param { int } missionId - Indicates mission id to be locked. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -263,15 +271,16 @@ declare namespace missionManager { * @throws { BusinessError } 16300001 - Mission not found. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function lockMission(missionId: number): Promise; + function lockMission(missionId: int): Promise; /** * Unlock the mission. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be unlocked. + * @param { int } missionId - Indicates mission id to be unlocked. * @param { AsyncCallback } callback - The callback of unlockMission. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -280,15 +289,16 @@ declare namespace missionManager { * @throws { BusinessError } 16300001 - Mission not found. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function unlockMission(missionId: number, callback: AsyncCallback): void; + function unlockMission(missionId: int, callback: AsyncCallback): void; /** * Unlock the mission. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be unlocked. + * @param { int } missionId - Indicates mission id to be unlocked. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -297,15 +307,16 @@ declare namespace missionManager { * @throws { BusinessError } 16300001 - Mission not found. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function unlockMission(missionId: number): Promise; + function unlockMission(missionId: int): Promise; /** * Clear the given mission in the ability manager service. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be cleared. + * @param { int } missionId - Indicates mission id to be cleared. * @param { AsyncCallback } callback - The callback of clearMission. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -313,15 +324,16 @@ 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 clearMission(missionId: number, callback: AsyncCallback): void; + function clearMission(missionId: int, callback: AsyncCallback): void; /** * Clear the given mission in the ability manager service. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be cleared. + * @param { int } missionId - Indicates mission id to be cleared. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -329,9 +341,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 clearMission(missionId: number): Promise; + function clearMission(missionId: int): Promise; /** * Clear all missions in the ability manager service. @@ -367,7 +380,7 @@ declare namespace missionManager { * Schedule the given mission to foreground. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be moved to foreground. + * @param { int } missionId - Indicates mission id to be moved to foreground. * @param { AsyncCallback } callback - The callback of moveMissionToFront. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -376,15 +389,16 @@ declare namespace missionManager { * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionToFront(missionId: number, callback: AsyncCallback): void; + function moveMissionToFront(missionId: int, callback: AsyncCallback): void; /** * Schedule the given mission to foreground. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be moved to foreground. + * @param { int } missionId - Indicates mission id to be moved to foreground. * @param { StartOptions } options - Indicates the start options. * @param { AsyncCallback } callback - The callback of moveMissionToFront. * @throws { BusinessError } 201 - Permission denied. @@ -394,15 +408,16 @@ declare namespace missionManager { * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionToFront(missionId: number, options: StartOptions, callback: AsyncCallback): void; + function moveMissionToFront(missionId: int, options: StartOptions, callback: AsyncCallback): void; /** * Schedule the given mission to foreground. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { number } missionId - Indicates mission id to be moved to foreground. + * @param { int } missionId - Indicates mission id to be moved to foreground. * @param { StartOptions } [options] - Indicates the start options. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -412,15 +427,16 @@ declare namespace missionManager { * @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionToFront(missionId: number, options?: StartOptions): Promise; + function moveMissionToFront(missionId: int, options?: StartOptions): Promise; /** * Schedule the given missions to foreground. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { Array } missionIds - Indicates mission ids to be moved to foreground. + * @param { Array } missionIds - Indicates mission ids to be moved to foreground. * @param { AsyncCallback } callback - The callback of moveMissionsToForeground. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -429,16 +445,17 @@ declare namespace missionManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionsToForeground(missionIds: Array, callback: AsyncCallback): void; + function moveMissionsToForeground(missionIds: Array, callback: AsyncCallback): void; /** * Schedule the given missions to foreground. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { Array } missionIds - Indicates mission ids to be moved to foreground. - * @param { number } topMission - Indicates mission id to be moved to top. + * @param { Array } missionIds - Indicates mission ids to be moved to foreground. + * @param { int } topMission - Indicates mission id to be moved to top. * @param { AsyncCallback } callback - The callback of moveMissionsToForeground. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -447,16 +464,17 @@ declare namespace missionManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionsToForeground(missionIds: Array, topMission: number, callback: AsyncCallback): void; + function moveMissionsToForeground(missionIds: Array, topMission: int, callback: AsyncCallback): void; /** * Schedule the given missions to foreground. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { Array } missionIds - Indicates mission ids to be moved to foreground. - * @param { number } topMission - Indicates mission id to be moved to top. + * @param { Array } missionIds - Indicates mission ids to be moved to foreground. + * @param { int } topMission - Indicates mission id to be moved to top. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -465,16 +483,17 @@ declare namespace missionManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionsToForeground(missionIds: Array, topMission?: number): Promise; + function moveMissionsToForeground(missionIds: Array, topMission?: int): Promise; /** * Schedule the given missions to background. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { Array } missionIds - Indicates mission ids will be moved to background - * @param { AsyncCallback> } callback - The callback of moveMissionsToForeground. + * @param { Array } missionIds - Indicates mission ids will be moved to background + * @param { AsyncCallback> } callback - The callback of moveMissionsToForeground. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -482,16 +501,17 @@ declare namespace missionManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionsToBackground(missionIds: Array, callback: AsyncCallback>): void; + function moveMissionsToBackground(missionIds: Array, callback: AsyncCallback>): void; /** * Schedule the given missions to background. * * @permission ohos.permission.MANAGE_MISSIONS - * @param { Array } missionIds - Indicates mission ids will be moved to background - * @returns { Promise> } - The promise returned by the function. + * @param { Array } missionIds - Indicates mission ids will be moved to background + * @returns { Promise> } - The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -499,9 +519,10 @@ declare namespace missionManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function moveMissionsToBackground(missionIds: Array): Promise>; + function moveMissionsToBackground(missionIds: Array): Promise>; /** * Mission information corresponding to ability. @@ -520,7 +541,8 @@ declare namespace missionManager { * @typedef { _MissionListener } * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type MissionListener = _MissionListener; @@ -530,7 +552,8 @@ declare namespace missionManager { * @typedef { _MissionSnapshot } * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type MissionSnapshot = _MissionSnapshot; } diff --git a/api/application/MissionListener.d.ts b/api/application/MissionListener.d.ts index b141fbaa10..d40243a7e6 100644 --- a/api/application/MissionListener.d.ts +++ b/api/application/MissionListener.d.ts @@ -26,7 +26,8 @@ import image from '../@ohos.multimedia.image'; * @interface MissionListener * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface MissionListener { /** @@ -35,7 +36,8 @@ export interface MissionListener { * @param { int } mission - Indicates the id of created mission. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionCreated(mission: int): void; @@ -45,7 +47,8 @@ export interface MissionListener { * @param { int } mission - Indicates the id of destroyed mission. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionDestroyed(mission: int): void; @@ -55,7 +58,8 @@ export interface MissionListener { * @param { int } mission - Indicates the id of the mission which the snapshot changes * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionSnapshotChanged(mission: int): void; @@ -65,7 +69,8 @@ export interface MissionListener { * @param { int } mission - Indicates the id of the mission being moved to the foreground. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionMovedToFront(mission: int): void; @@ -75,7 +80,8 @@ export interface MissionListener { * @param { int } mission - Indicates the id of the mission whose label has changed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionLabelUpdated(mission: int): void; @@ -86,7 +92,8 @@ export interface MissionListener { * @param { image.PixelMap } icon - Indicates the icon of the mission whose icon has changed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionIconUpdated(mission: int, icon: image.PixelMap): void; @@ -96,7 +103,8 @@ export interface MissionListener { * @param { int } mission - Indicates the id of the mission whose ability instance is destroyed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onMissionClosed(mission: int): void; } diff --git a/api/application/MissionSnapshot.d.ts b/api/application/MissionSnapshot.d.ts index 7ff67a67eb..4894a8ea11 100644 --- a/api/application/MissionSnapshot.d.ts +++ b/api/application/MissionSnapshot.d.ts @@ -27,7 +27,8 @@ import image from '../@ohos.multimedia.image'; * @typedef MissionSnapshot * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface MissionSnapshot { /** @@ -44,7 +45,8 @@ export interface MissionSnapshot { * @type { ElementName } * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ability: ElementName; @@ -54,7 +56,8 @@ export interface MissionSnapshot { * @type { image.PixelMap } * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ snapshot: image.PixelMap; } -- Gitee