From 5a89b1b26410ebd14a24468068c9c2974996b7d7 Mon Sep 17 00:00:00 2001 From: jsjzju Date: Mon, 7 Mar 2022 16:23:08 +0800 Subject: [PATCH] IssueNo:#I4WOOD Description: Modify d.ts Sig:SIG_ApplicationFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: jsjzju --- api/@ohos.application.Ability.d.ts | 6 ++++++ api/@ohos.application.AbilityStage.d.ts | 6 +++++- api/@ohos.application.Configuration.d.ts | 6 +++--- ...hos.application.ConfigurationConstant.d.ts | 4 ++-- api/@ohos.application.ServiceExtension.d.ts | 2 ++ ...s.application.ServiceExtensionAbility.d.ts | 13 ++++++++++++ api/@ohos.application.abilityManager.d.ts | 9 ++++++--- api/@ohos.application.appManager.d.ts | 11 +++++++--- api/@ohos.application.missionManager.d.ts | 17 ++++++++++++++-- api/application/AbilityContext.d.ts | 20 +++++++++++++------ api/application/Context.d.ts | 3 ++- api/application/FormExtensionContext.d.ts | 3 +-- api/application/MissionListener.d.ts | 6 +++++- api/application/ServiceExtensionContext.d.ts | 18 ++++++++++------- 14 files changed, 93 insertions(+), 31 deletions(-) diff --git a/api/@ohos.application.Ability.d.ts b/api/@ohos.application.Ability.d.ts index 19165a8f20..f918c4e9b9 100755 --- a/api/@ohos.application.Ability.d.ts +++ b/api/@ohos.application.Ability.d.ts @@ -148,6 +148,8 @@ export default class Ability { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param want Indicates the want info of the created ability. + * @param param Indicates the launch param. * @return - * @StageModelOnly */ @@ -158,6 +160,7 @@ export default class Ability { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param windowStage Indicates the created WindowStage. * @return - * @StageModelOnly */ @@ -219,6 +222,7 @@ export default class Ability { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param wantParam Indicates the want parameter. * @return true if ability agrees to migrate and saves data successfully, otherwise false. * @StageModelOnly */ @@ -230,6 +234,7 @@ export default class Ability { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param want Indicates the want info of ability. * @return - * @StageModelOnly */ @@ -240,6 +245,7 @@ export default class Ability { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @param config Indicates the updated configuration. * @return - * @StageModelOnly */ diff --git a/api/@ohos.application.AbilityStage.d.ts b/api/@ohos.application.AbilityStage.d.ts index 5ef0796012..ae3a53612f 100644 --- a/api/@ohos.application.AbilityStage.d.ts +++ b/api/@ohos.application.AbilityStage.d.ts @@ -50,7 +50,10 @@ export default class AbilityStage { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @return - + * @param want Indicates the want info of startd ability. + * @return The user returns an ability string ID. If the ability of this ID has been started before, + * do not create a new instance and pull it back to the top of the stack. + * Otherwise, create a new instance and start it. * @StageModelOnly */ onAcceptWant(want: Want): string; @@ -60,6 +63,7 @@ export default class AbilityStage { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param config Indicates the updated configuration. * @return - * @StageModelOnly */ diff --git a/api/@ohos.application.Configuration.d.ts b/api/@ohos.application.Configuration.d.ts index 9acbda4fa5..f00b528ddf 100644 --- a/api/@ohos.application.Configuration.d.ts +++ b/api/@ohos.application.Configuration.d.ts @@ -43,7 +43,7 @@ export interface Configuration { /** * Indicates the screen direction of the current device. * - * @since 8 + * @since 9 * @syscap SystemCapability.Ability.AbilityBase */ direction: ConfigurationConstant.Direction; @@ -51,7 +51,7 @@ export interface Configuration { /** * Indicates the screen density of the current device. * - * @since 8 + * @since 9 * @syscap SystemCapability.Ability.AbilityBase */ screenDensity: ConfigurationConstant.ScreenDensity; @@ -59,7 +59,7 @@ export interface Configuration { /** * Indicates the displayId of the current device. * - * @since 8 + * @since 9 * @syscap SystemCapability.Ability.AbilityBase */ displayId: number; diff --git a/api/@ohos.application.ConfigurationConstant.d.ts b/api/@ohos.application.ConfigurationConstant.d.ts index b9ed5f3e19..cdf3b32724 100644 --- a/api/@ohos.application.ConfigurationConstant.d.ts +++ b/api/@ohos.application.ConfigurationConstant.d.ts @@ -35,7 +35,7 @@ /** * @name Direction - * @since 8 + * @since 9 * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ @@ -47,7 +47,7 @@ /** * @name ScreenDensity - * @since 8 + * @since 9 * @syscap SystemCapability.Ability.AbilityBase * @permission N/A */ diff --git a/api/@ohos.application.ServiceExtension.d.ts b/api/@ohos.application.ServiceExtension.d.ts index 002684069a..8ef9102c89 100644 --- a/api/@ohos.application.ServiceExtension.d.ts +++ b/api/@ohos.application.ServiceExtension.d.ts @@ -42,6 +42,7 @@ export default class ServiceExtension { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param want Indicates the want of created service extension. * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -116,6 +117,7 @@ export default class ServiceExtension { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param config Indicates the updated configuration. * @return - * @StageModelOnly */ diff --git a/api/@ohos.application.ServiceExtensionAbility.d.ts b/api/@ohos.application.ServiceExtensionAbility.d.ts index a2567c8945..d4d06bc404 100644 --- a/api/@ohos.application.ServiceExtensionAbility.d.ts +++ b/api/@ohos.application.ServiceExtensionAbility.d.ts @@ -16,6 +16,7 @@ import rpc from "./@ohos.rpc"; import ServiceExtensionContext from "./application/ServiceExtensionContext"; import Want from './@ohos.application.Want'; +import { Configuration } from './@ohos.application.Configuration'; /** * class of service extension ability. @@ -41,6 +42,7 @@ export default class ServiceExtensionAbility { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param want Indicates the want of created service extension. * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -109,5 +111,16 @@ export default class ServiceExtensionAbility { * @StageModelOnly */ onReconnect(want: Want): void; + + /** + * Called when the system configuration is updated. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param config Indicates the updated configuration. + * @return - + * @StageModelOnly + */ + onConfigurationUpdated(config: Configuration): void; } diff --git a/api/@ohos.application.abilityManager.d.ts b/api/@ohos.application.abilityManager.d.ts index 44885db203..5221fc08a0 100644 --- a/api/@ohos.application.abilityManager.d.ts +++ b/api/@ohos.application.abilityManager.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -49,6 +49,7 @@ declare namespace abilityManager { * @param config Indicates the new configuration. * @systemapi Hide this for inner system use. * @return - + * @permission ohos.permission.UPDATE_CONFIGURATION */ function updateConfiguration(config: Configuration, callback: AsyncCallback): void; function updateConfiguration(config: Configuration): Promise; @@ -59,7 +60,8 @@ declare namespace abilityManager { * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. - * @return - + * @return Returns the array of {@link AbilityRunningInfo}. + * @permission ohos.permission.GET_RUNNING_INFO */ function getAbilityRunningInfos(): Promise>; function getAbilityRunningInfos(callback: AsyncCallback>): void; @@ -71,7 +73,8 @@ declare namespace abilityManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param upperLimit Get the maximum limit of the number of messages * @systemapi Hide this for inner system use. - * @return - + * @return Returns the array of {@link ExtensionRunningInfo}. + * @permission ohos.permission.GET_RUNNING_INFO */ function getExtensionRunningInfos(upperLimit: number): Promise>; function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void; diff --git a/api/@ohos.application.appManager.d.ts b/api/@ohos.application.appManager.d.ts index 7794e86189..eb086aec28 100644 --- a/api/@ohos.application.appManager.d.ts +++ b/api/@ohos.application.appManager.d.ts @@ -36,6 +36,7 @@ declare namespace appManager { * @param observer The application state observer. * @systemapi hide this for inner system use * @return Returns the number code of the observer. + * @permission ohos.permission.RUNNING_STATE_OBSERVER */ function registerApplicationStateObserver(observer: ApplicationStateObserver): number; @@ -47,6 +48,7 @@ declare namespace appManager { * @param observerId Indicates the number code of the observer. * @systemapi hide this for inner system use * @return - + * @permission ohos.permission.RUNNING_STATE_OBSERVER */ function unregisterApplicationStateObserver(observerId: number, callback: AsyncCallback): void; function unregisterApplicationStateObserver(observerId: number): Promise; @@ -58,6 +60,7 @@ declare namespace appManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi hide this for inner system use * @return Returns the list of AppStateData. + * @permission ohos.permission.GET_RUNNING_INFO */ function getForegroundApplications(callback: AsyncCallback>): void; function getForegroundApplications(): Promise>; @@ -71,6 +74,7 @@ declare namespace appManager { * @param accountId The account id. * @systemapi hide this for inner system use * @return - + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS, ohos.permission.CLEAN_BACKGROUND_PROCESSES */ function killProcessWithAccount(bundleName: string, accountId: number): Promise; function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void; @@ -91,7 +95,8 @@ declare namespace appManager { * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi Hide this for inner system use. - * @return - + * @return Returns the array of {@link ProcessRunningInfo}. + * @permission ohos.permission.GET_RUNNING_INFO */ function getProcessRunningInfos(): Promise>; function getProcessRunningInfos(callback: AsyncCallback>): void; @@ -101,8 +106,8 @@ declare namespace appManager { * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param bundleName bundle name. - * @permission ohos.permission.DELETE_MISSIONS * @systemapi hide this for inner system use + * @permission ohos.permission.CLEAN_BACKGROUND_PROCESSES */ function killProcessesByBundleName(bundleName: string): Promise; function killProcessesByBundleName(bundleName: string, callback: AsyncCallback); @@ -112,8 +117,8 @@ declare namespace appManager { * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param bundleName bundle name. - * @permission ohos.permission.DELETE_MISSIONS * @systemapi hide this for inner system use + * @permission ohos.permission.CLEAN_APPLICATION_DATA */ function clearUpApplicationData(bundleName: string): Promise; function clearUpApplicationData(bundleName: string, callback: AsyncCallback); diff --git a/api/@ohos.application.missionManager.d.ts b/api/@ohos.application.missionManager.d.ts index cc0a560a1a..dc6a871c31 100644 --- a/api/@ohos.application.missionManager.d.ts +++ b/api/@ohos.application.missionManager.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +25,7 @@ import StartOptions from "./@ohos.application.StartOptions"; * @name missionManager * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @permission N/A + * @permission ohos.permission.MANAGE_MISSIONS * @systemapi hide for inner use. */ declare namespace missionManager { @@ -34,6 +34,7 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param listener Indicates the MissionListener to be registered. * @return The index number of the MissionListener. */ function registerMissionListener(listener: MissionListener): number; @@ -43,6 +44,7 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param listenerId Indicates the listener id to be unregistered. * @return - */ function unregisterMissionListener(listenerId: number, callback: AsyncCallback): void; @@ -53,6 +55,8 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param deviceId Indicates the device to be queried. + * @param missionId Indicates mission id to be queried. * @return the {@link MissionInfo} of the given id. */ function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void; @@ -63,6 +67,8 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param deviceId Indicates the device to be queried. + * @param numMax Indicates the maximum number of returned missions. * @return The array of the {@link MissionInfo}. */ function getMissionInfos(deviceId: string, numMax: number, callback: AsyncCallback>): void; @@ -73,6 +79,8 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param deviceId Indicates the device to be queried. + * @param missionId Indicates mission id to be queried. * @return The {@link MissionSnapshot} of the given id. */ function getMissionSnapShot(deviceId: string, missionId: number, callback: AsyncCallback): void; @@ -83,6 +91,7 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param missionId Indicates mission id to be locked. * @return - */ function lockMission(missionId: number, callback: AsyncCallback): void; @@ -93,6 +102,7 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param missionId Indicates mission id to be unlocked. * @return - */ function unlockMission(missionId: number, callback: AsyncCallback): void; @@ -103,6 +113,7 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param missionId Indicates mission id to be cleared. * @return - */ function clearMission(missionId: number, callback: AsyncCallback): void; @@ -123,6 +134,8 @@ declare namespace missionManager { * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param missionId Indicates mission id to be moved to foreground. + * @param options Indicates the start options. * @return - */ function moveMissionToFront(missionId: number, callback: AsyncCallback): void; diff --git a/api/application/AbilityContext.d.ts b/api/application/AbilityContext.d.ts index d9485e2d03..1e12eaa959 100755 --- a/api/application/AbilityContext.d.ts +++ b/api/application/AbilityContext.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -67,7 +67,8 @@ export default class AbilityContext extends Context { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param parameter Indicates the ability to start. + * @param want Indicates the ability to start. + * @param options Indicates the start options. * @return - * @StageModelOnly */ @@ -92,9 +93,11 @@ export default class AbilityContext extends Context { * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates the want info to start. - * @param want Indicates the account to start. + * @param accountId Indicates the account to start. + * @param options Indicates the start options. * @systemapi hide for inner use. * @return - + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @StageModelOnly */ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; @@ -106,7 +109,8 @@ export default class AbilityContext extends Context { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @param parameter Indicates the ability to start. + * @param want Indicates the ability to start. + * @param options Indicates the start options. * @return Returns the {@link AbilityResult}. * @StageModelOnly */ @@ -120,9 +124,11 @@ export default class AbilityContext extends Context { * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want Indicates the want info to start. - * @param want Indicates the account to start. + * @param accountId Indicates the account to start. + * @param options Indicates the start options. * @systemapi hide for inner use. * @return Returns the {@link AbilityResult}. + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @StageModelOnly */ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback): void; @@ -172,10 +178,11 @@ export default class AbilityContext extends Context { * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param want The element name of the service ability - * @param options The remote object instance * @param accountId The account to connect + * @param options The remote object instance * @systemapi hide for inner use. * @return Returns the number code of the ability connected + * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @StageModelOnly */ connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; @@ -209,6 +216,7 @@ export default class AbilityContext extends Context { * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core * @param permissions Indicates the list of permissions to be requested. This parameter cannot be null or empty. + * @return Returns the {@link PermissionRequestResult}. * @StageModelOnly */ requestPermissionsFromUser(permissions: Array, requestCallback: AsyncCallback) : void; diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts index 73e7f73e2f..8f1add64df 100755 --- a/api/application/Context.d.ts +++ b/api/application/Context.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -126,6 +126,7 @@ export default class Context extends BaseContext { * @systemapi hide for inner use. * @param bundleName Indicates the bundle name. * @return application context + * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @StageModelOnly */ createBundleContext(bundleName: string): Context; diff --git a/api/application/FormExtensionContext.d.ts b/api/application/FormExtensionContext.d.ts index c3bd85bdb2..8d9b9f3125 100644 --- a/api/application/FormExtensionContext.d.ts +++ b/api/application/FormExtensionContext.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,7 +35,6 @@ export default class FormExtensionContext extends ExtensionContext { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @permission ohos.permission.REQUIRE_FORM. * @param formId Indicates the given form. * @param formBindingData Indicates the form data. * @return - diff --git a/api/application/MissionListener.d.ts b/api/application/MissionListener.d.ts index 12bd9e64bd..c4bb55f70d 100644 --- a/api/application/MissionListener.d.ts +++ b/api/application/MissionListener.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -28,6 +28,7 @@ * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param mission Indicates the id of created mission. * @return - */ onMissionCreated(mission: number): void; @@ -37,6 +38,7 @@ * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param mission Indicates the id of destroyed mission. * @return - */ onMissionDestroyed(mission: number): void; @@ -46,6 +48,7 @@ * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param mission Indicates the id of the mission which the snapshot changes * @return - */ onMissionSnapshotChanged(mission: number): void; @@ -55,6 +58,7 @@ * * @since 8 * @syscap SystemCapability.Ability.AbilityRuntime.Mission + * @param mission Indicates the id of the mission being moved to the foreground. * @return - */ onMissionMovedToFront(mission: number): void; diff --git a/api/application/ServiceExtensionContext.d.ts b/api/application/ServiceExtensionContext.d.ts index d07171a1fd..22a5412a8f 100644 --- a/api/application/ServiceExtensionContext.d.ts +++ b/api/application/ServiceExtensionContext.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -44,7 +44,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param parameter Indicates the ability to start. + * @param want Indicates the ability to start. + * @param options Indicates the start options. * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -58,8 +59,9 @@ export default class ServiceExtensionContext extends ExtensionContext { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param parameter Indicates the ability to start. - * @param parameter Indicates the accountId to start. + * @param want Indicates the ability to start. + * @param accountId Indicates the accountId to start. + * @param options Indicates the start options. * @systemapi hide for inner use. * @return - * @StageModelOnly @@ -89,7 +91,8 @@ export default class ServiceExtensionContext extends ExtensionContext { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param request Indicates the service extension to connect. + * @param want Indicates the service extension to connect. + * @param options Indicates the callback of connection. * @systemapi hide for inner use. * @return connection id, int value. * @StageModelOnly @@ -105,8 +108,9 @@ export default class ServiceExtensionContext extends ExtensionContext { * * @since 9 * @syscap SystemCapability.Ability.AbilityRuntime.Mission - * @param request Indicates the service extension to connect. - * @param request Indicates the account to connect. + * @param want Indicates the service extension to connect. + * @param accountId Indicates the account to connect. + * @param options Indicates the callback of connection. * @systemapi hide for inner use. * @return connection id, int value. * @StageModelOnly -- Gitee