diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index d7961444e2ea6215f795a3e182541ea0ea9b0a2a..39bafa4e517a1ea89b518dc2f67c48c4195448b9 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -25,6 +25,7 @@ import PermissionRequestResult from "./PermissionRequestResult"; import { Configuration } from '../@ohos.application.Configuration'; import Caller from '../@ohos.application.Ability'; import { ContentStorage } from '../@internal/component/ets/state_management'; +import image from '../@ohos.multimedia.image'; /** * The context of an ability. It allows access to ability-specific resources. @@ -210,6 +211,19 @@ export default class AbilityContext extends Context { setMissionLabel(label: string, callback:AsyncCallback): void; setMissionLabel(label: string): Promise; + /** + * Set mission icon of current ability. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param icon The icon of ability that showed in recent missions. + * @systemapi hide for inner use. + * @return - + * @StageModelOnly + */ + setMissionIcon(icon: image.PixelMap, callback:AsyncCallback): void; + setMissionIcon(icon: image.PixelMap): Promise; + /** * Requests certain permissions from the system. * diff --git a/api/application/MissionListener.d.ts b/api/application/MissionListener.d.ts index c4bb55f70d81efad3dbaa9fe3d8de69b46aac594..b7416ce23e1e9c2b874c0713367e72ae41592a70 100644 --- a/api/application/MissionListener.d.ts +++ b/api/application/MissionListener.d.ts @@ -13,6 +13,8 @@ * limitations under the License. */ +import image from "../@ohos.multimedia.image"; + /** * MissionListener registered by app. * @@ -62,4 +64,15 @@ * @return - */ onMissionMovedToFront(mission: number): void; + + /** + * Called by system when mission icon has changed. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param mission Indicates the id of the mission whose icon has changed. + * @param icon Indicates the icon of the mission whose icon has changed. + * @return - + */ + onMissionIconUpdated(mission: number, icon: image.PixelMap): void; } \ No newline at end of file