mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 09:22:53 +00:00
!1491 support set mission icon.
Merge pull request !1491 from ccll/master
This commit is contained in:
commit
ced3b74931
14
api/application/AbilityContext.d.ts
vendored
14
api/application/AbilityContext.d.ts
vendored
@ -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.
|
||||
*
|
||||
|
13
api/application/MissionListener.d.ts
vendored
13
api/application/MissionListener.d.ts
vendored
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user