!14637 接口修改为public api

Merge pull request !14637 from donglin/systemapi
This commit is contained in:
openharmony_ci 2024-11-16 15:18:16 +00:00 committed by Gitee
commit 2676150793
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 38 additions and 84 deletions

View File

@ -33,7 +33,6 @@ import * as _AbilityStateData from './application/AbilityStateData';
*
* @namespace abilityManager
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
*/
declare namespace abilityManager {
@ -216,11 +215,9 @@ declare namespace abilityManager {
*
* @permission ohos.permission.GET_RUNNING_INFO
* @returns { Promise<Array<AbilityRunningInfo>> } Returns the array of AbilityRunningInfo.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
function getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;

View File

@ -325,13 +325,11 @@ declare namespace appManager {
* @param { ApplicationStateObserver } observer - The application state observer.
* @returns { number } Returns the number code of the observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
function on(type: 'applicationState', observer: ApplicationStateObserver): number;
@ -344,13 +342,11 @@ declare namespace appManager {
* @param { Array<string> } bundleNameList - The list of bundleName. The max length is 128.
* @returns { number } Returns the number code of the observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array<string>): number;
@ -415,13 +411,11 @@ declare namespace appManager {
* @param { number } observerId - Indicates the number code of the observer.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
function off(type: 'applicationState', observerId: number): Promise<void>;
@ -663,11 +657,9 @@ declare namespace appManager {
* @param { number } [appIndex] - The application index.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 14
*/
function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: number): Promise<void>;
@ -1099,14 +1091,12 @@ declare namespace appManager {
* @param { number } [appCloneIndex] - app clone index
* @returns { Promise<boolean> } Returns the bundle running result. The result is true if running, false otherwise.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 12
* @since 14
*/
function isAppRunning(bundleName: string, appCloneIndex?: number): Promise<boolean>;
@ -1233,8 +1223,7 @@ declare namespace appManager {
*
* @typedef { _ApplicationStateObserver.default }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
export type ApplicationStateObserver = _ApplicationStateObserver.default;

View File

@ -22,8 +22,7 @@
* The ability or extension state data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
export default class AbilityStateData {
/**
@ -31,8 +30,7 @@ export default class AbilityStateData {
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
moduleName: string;
@ -41,8 +39,7 @@ export default class AbilityStateData {
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
bundleName: string;
@ -51,8 +48,7 @@ export default class AbilityStateData {
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
abilityName: string;
@ -61,8 +57,7 @@ export default class AbilityStateData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
pid: number;
@ -71,8 +66,7 @@ export default class AbilityStateData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
uid: number;
@ -81,8 +75,7 @@ export default class AbilityStateData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
state: number;
@ -91,8 +84,7 @@ export default class AbilityStateData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
abilityType: number;
@ -101,8 +93,7 @@ export default class AbilityStateData {
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 12
* @since 14
*/
isAtomicService: boolean;
@ -110,8 +101,7 @@ export default class AbilityStateData {
* The app clone index of ability instance.
* @type { ?number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 12
* @since 14
*/
appCloneIndex?: number;
}

View File

@ -22,8 +22,7 @@
* The application state data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
export default class AppStateData {
/**
@ -31,8 +30,7 @@ export default class AppStateData {
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
bundleName: string;
@ -41,8 +39,7 @@ export default class AppStateData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
uid: number;
@ -51,8 +48,7 @@ export default class AppStateData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
state: number;
@ -61,8 +57,7 @@ export default class AppStateData {
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
* @since 14
*/
isSplitScreenMode: boolean;
@ -71,8 +66,7 @@ export default class AppStateData {
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 11
* @since 14
*/
isFloatingWindowMode: boolean;
}

View File

@ -26,8 +26,7 @@ import * as _ProcessData from './ProcessData';
* The application state observer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
export default class ApplicationStateObserver {
/**
@ -35,8 +34,7 @@ export default class ApplicationStateObserver {
*
* @param { AppStateData } appStateData - State changed Application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
onForegroundApplicationChanged(appStateData: AppStateData): void;
@ -45,8 +43,7 @@ export default class ApplicationStateObserver {
*
* @param { AbilityStateData } abilityStateData - State changed ability info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
onAbilityStateChanged(abilityStateData: AbilityStateData): void;
@ -55,8 +52,7 @@ export default class ApplicationStateObserver {
*
* @param { ProcessData } processData - Process info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
onProcessCreated(processData: ProcessData): void;
@ -65,8 +61,7 @@ export default class ApplicationStateObserver {
*
* @param { ProcessData } processData - Process info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
onProcessDied(processData: ProcessData): void;
@ -75,8 +70,7 @@ export default class ApplicationStateObserver {
*
* @param { ProcessData } processData - Process info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
onProcessStateChanged(processData: ProcessData): void;
@ -85,8 +79,7 @@ export default class ApplicationStateObserver {
*
* @param { AppStateData } appStateData - State changed Application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 12
* @since 14
*/
onAppStarted(appStateData: AppStateData): void;
@ -95,8 +88,7 @@ export default class ApplicationStateObserver {
*
* @param { AppStateData } appStateData - State changed Application info.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 12
* @since 14
*/
onAppStopped(appStateData: AppStateData): void;
}
@ -105,7 +97,6 @@ export default class ApplicationStateObserver {
* The process data.
* @typedef { _ProcessData.default }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
export type ProcessData = _ProcessData.default;

View File

@ -22,8 +22,7 @@
* The process data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
export default class ProcessData {
/**
@ -31,8 +30,7 @@ export default class ProcessData {
*
* @type { string }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
bundleName: string;
@ -41,8 +39,7 @@ export default class ProcessData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
pid: number;
@ -51,8 +48,7 @@ export default class ProcessData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 8
* @since 14
*/
uid: number;
@ -61,8 +57,7 @@ export default class ProcessData {
*
* @type { number }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
state: number;
@ -71,8 +66,7 @@ export default class ProcessData {
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
isContinuousTask: boolean;
@ -81,8 +75,7 @@ export default class ProcessData {
*
* @type { boolean }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @systemapi
* @since 9
* @since 14
*/
isKeepAlive: boolean;
}