mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2025-03-04 15:27:44 +00:00
!13456 新增backToCallerAbilityWithResult接口
Merge pull request !13456 from 段嗣钊/release50
This commit is contained in:
commit
65557bc5fc
9
api/@ohos.app.ability.wantConstant.d.ts
vendored
9
api/@ohos.app.ability.wantConstant.d.ts
vendored
@ -246,6 +246,15 @@ declare namespace wantConstant {
|
||||
* @since 12
|
||||
*/
|
||||
APP_CLONE_INDEX_KEY = 'ohos.extra.param.key.appCloneIndex',
|
||||
|
||||
/**
|
||||
* Indicates the param of caller's request code.
|
||||
*
|
||||
* @syscap SystemCapability.Ability.AbilityBase
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
CALLER_REQUEST_CODE = 'ohos.extra.param.key.callerRequestCode',
|
||||
|
||||
/**
|
||||
* Indicates the param of page path.
|
||||
|
21
api/application/UIAbilityContext.d.ts
vendored
21
api/application/UIAbilityContext.d.ts
vendored
@ -2585,6 +2585,27 @@ export default class UIAbilityContext extends Context {
|
||||
*/
|
||||
terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
|
||||
|
||||
/**
|
||||
* Return to caller application with specified result code and data while not destroying current ability.
|
||||
* If the current application is in the background, you need to apply for permission:ohos.permission.START_ABILITIES_FROM_BACKGROUND.
|
||||
*
|
||||
* @param { AbilityResult } abilityResult - Indicates the result to return.
|
||||
* @param { string } requestCode - Indicates the request code of caller ability.
|
||||
* @returns { Promise<void> } The promise returned by the function.
|
||||
* @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 } 16000009 - An ability cannot be started or stopped in Wukong mode.
|
||||
* @throws { BusinessError } 16000011 - The context does not exist.
|
||||
* @throws { BusinessError } 16000050 - Internal error.
|
||||
* @throws { BusinessError } 16000074 - The caller does not exist.
|
||||
* @throws { BusinessError } 16000075 - Not support back to caller.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @stagemodelonly
|
||||
* @atomicservice
|
||||
* @since 12
|
||||
*/
|
||||
backToCallerAbilityWithResult(abilityResult: AbilityResult, requestCode: string): Promise<void>;
|
||||
|
||||
/**
|
||||
* Connects the current ability to an service extension ability.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user