mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
!10313 【应用热启需求】新增接口SetSupportedProcessCache、onAppStarted、onAppStopped
Merge pull request !10313 from 胡泽善/ProcessCache
This commit is contained in:
commit
588889c4a9
18
api/application/ApplicationContext.d.ts
vendored
18
api/application/ApplicationContext.d.ts
vendored
@ -464,4 +464,22 @@ export default class ApplicationContext extends Context {
|
||||
* @since 12
|
||||
*/
|
||||
restartApp(want: Want): void;
|
||||
|
||||
/**
|
||||
* Set the state about whether the application supports process cache or not.
|
||||
*
|
||||
* @permission ohos.permission.SET_PROCESS_CACHE_STATE
|
||||
* @param { boolean } isSupported - Indicates the process cache support state.
|
||||
* @throws { BusinessError } 201 - Permission denied.
|
||||
* @throws { BusinessError } 202 - Not system App.
|
||||
* @throws { BusinessError } 401 - The input parameter is not a valid parameter.
|
||||
* @throws { BusinessError } 16000011 - The context does not exist.
|
||||
* @throws { BusinessError } 16000050 - Internal error.
|
||||
* @throws { BusinessError } 16000068 - The supported process cache state cannot be set more than once.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 12
|
||||
*/
|
||||
setSupportedProcessCache(isSupported : boolean): void;
|
||||
}
|
||||
|
22
api/application/ApplicationStateObserver.d.ts
vendored
22
api/application/ApplicationStateObserver.d.ts
vendored
@ -79,11 +79,31 @@ export default class ApplicationStateObserver {
|
||||
* @since 9
|
||||
*/
|
||||
onProcessStateChanged(processData: ProcessData): void;
|
||||
|
||||
/**
|
||||
* Called when application is started.
|
||||
*
|
||||
* @param { AppStateData } appStateData - State changed Application info.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @systemapi
|
||||
* @since 12
|
||||
*/
|
||||
onAppStarted(appStateData: AppStateData): void;
|
||||
|
||||
/**
|
||||
* Called when application is stopped.
|
||||
*
|
||||
* @param { AppStateData } appStateData - State changed Application info.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @systemapi
|
||||
* @since 12
|
||||
*/
|
||||
onAppStopped(appStateData: AppStateData): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* The process data.
|
||||
*
|
||||
* @typedef { _ProcessData.default }
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @systemapi
|
||||
* @since 9
|
||||
|
Loading…
Reference in New Issue
Block a user