mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-23 07:10:52 +00:00
改为新增SetSupportProcessCache接口
Signed-off-by: huzeshan <huzeshan@huawei.com>
This commit is contained in:
parent
c673a436d3
commit
3c51ab2ee2
14
api/@ohos.app.ability.AbilityStage.d.ts
vendored
14
api/@ohos.app.ability.AbilityStage.d.ts
vendored
@ -200,18 +200,4 @@ export default class AbilityStage {
|
||||
* @since 12
|
||||
*/
|
||||
onDestroy(): void;
|
||||
|
||||
/**
|
||||
* Called back when the system needs to confirm whether the application supports process cache.
|
||||
*
|
||||
* @returns { boolean } Indicates that whether process cache is supported or not.
|
||||
* When process caching is supported, the system does not destroy the process when the application exits
|
||||
* and reuses the cached process when the application starts next time.
|
||||
* If process cache is not supported, the process will be destroyed normally when the application exits,
|
||||
* and the process will be re-created when the application starts next time.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
onCheckProcessCache(): boolean;
|
||||
}
|
||||
|
15
api/application/ApplicationContext.d.ts
vendored
15
api/application/ApplicationContext.d.ts
vendored
@ -464,4 +464,19 @@ export default class ApplicationContext extends Context {
|
||||
* @since 12
|
||||
*/
|
||||
restartApp(want: Want): void;
|
||||
|
||||
/**
|
||||
* Set the state about whether the application supports process cache or not.
|
||||
*
|
||||
* @param { isSupport } boolean - Indicates the process cache support state.
|
||||
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
|
||||
* @throws { BusinessError } 16000011 - The context does not exist.
|
||||
* @throws { BusinessError } 16000050 - Internal error.
|
||||
* @throws { BusinessError } 16000068 - The support process cache state cannot be set more than once.
|
||||
* @systemapi
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
SetSupportProcessCache(isSupport : boolean): void;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user