!1491 support set mission icon.

Merge pull request !1491 from ccll/master
This commit is contained in:
openharmony_ci 2022-04-16 09:40:02 +00:00 committed by Gitee
commit ced3b74931
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 27 additions and 0 deletions

View File

@ -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>): void;
setMissionLabel(label: string): Promise<void>;
/**
* 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>): void;
setMissionIcon(icon: image.PixelMap): Promise<void>;
/**
* Requests certain permissions from the system.
*

View File

@ -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;
}