1# Ability Subsystem ChangeLog 2 3## cl.ability.1 Application Component Startup Rule Change 4 5The rules for starting application components of the ability subsystem are changed in the following scenarios: 6 7 - Start application components when the application is in the background. 8 - Start invisible application components across applications. 9 - Start **serviceAbility** and **dataAbility** of the FA model across applications. 10 - Use the **startAbilityByCall** API. 11 12You need to adapt your application based on the following information. 13 14**Change Impacts** 15 16If new rules are not adapted, application components cannot be started in the previous scenarios. 17> **NOTE** 18> 19> Starting application components refers to any behavior starting or connecting to an ability. 20> 21> 1. Start an ability using APIs such as **startAbility**, **startServiceExtensionAbility**, and **startAbilityByCall**. 22> 2. Connect to an ability using APIs such as **connectAbility**, **connectServiceExtensionAbility**, **acquireDataAbilityHelper**, and **createDataShareHelper**. 23 24**Key API/Component Changes** 25 26 - Involved application components 27 - Stage model 28 - Ability 29 - ServiceExtension 30 - DataShareExtension 31 - FA model 32 - PageAbility 33 - ServiceAbility 34 - DataAbility 35 - Involved APIs 36 - Stage model 37 - startAbility(want: Want, callback: AsyncCallback<void>): void; 38 - startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>): void; 39 - startAbility(want: Want, options?: StartOptions): Promise<void>; 40 - startAbilityByCall(want: Want): Promise<Caller>; 41 - startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void; 42 - startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void; 43 - startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<void>; 44 - startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void; 45 - startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback<AbilityResult>): void; 46 - startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityResult>; 47 - startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncCallback<AbilityResult>): void; 48 - startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOptions, callback: AsyncCallback<void>): void; 49 - startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartOptions): Promise<AbilityResult>; 50 - startServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void; 51 - startServiceExtensionAbility(want: Want): Promise<void>; 52 - startServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void; 53 - startServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>; 54 - stopServiceExtensionAbility(want: Want, callback: AsyncCallback<void>): void; 55 - stopServiceExtensionAbility(want: Want): Promise<void>; 56 - stopServiceExtensionAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback<void>): void; 57 - stopServiceExtensionAbilityWithAccount(want: Want, accountId: number): Promise<void>; 58 - connectAbility(want: Want, options: ConnectOptions): number; 59 - connectAbilityWithAccount(want: Want, accountId: number, options: ConnectOptions): number; 60 - createDataShareHelper(context: Context, uri: string, callback: AsyncCallback<DataShareHelper>): void 61 - FA model 62 - startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>): void; 63 - startAbility(parameter: StartAbilityParameter): Promise<number>; 64 - startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>): void; 65 - startAbilityForResult(parameter: StartAbilityParameter): Promise<AbilityResult>; 66 - acquireDataAbilityHelper(uri: string): DataAbilityHelper; 67 - connectAbility(request: Want, options:ConnectOptions ): number; 68 69**Adaptation Guide** 70 71Startup rules for different scenarios are as follows: 72 - **Start application components when the application is in the background.** 73 - OpenHarmony 3.2 Beta3 rules: 74 75 - Starting application components when the application is in the background is not restricted. 76 - OpenHarmony 3.2 Beta4 rules: 77 - When the application is in the background, starting application components requires authentication. The following permission needs to be applied for: 78 ```json 79 { 80 "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND", 81 "grantMode": "system_grant", 82 "availableLevel": "system_basic", 83 "provisionEnable": true, 84 "distributedSceneEnable": false 85 } 86 ``` 87 > **NOTE** 88 > 89 > 1. Starting components of the same application is also restricted by this rule. 90 > 2. For SDKs of API version 8 or earlier, starting **serviceAbility** and **dataAbility** is not restricted by this rule. 91 92 - **Start invisible application components across applications.** 93 - OpenHarmony 3.2 Beta3 rules: 94 95 - For applications whose APL is normal, invisible application components cannot be started across applications. 96 - OpenHarmony 3.2 Beta4 rules: 97 - For all applications, starting invisible application components across applications requires authentication. The following permission needs to be applied for: 98 ```json 99 { 100 "name": "ohos.permission.START_INVISIBLE_ABILITY", 101 "grantMode": "system_grant", 102 "availableLevel": "system_core", 103 "provisionEnable": true, 104 "distributedSceneEnable": false 105 } 106 ``` 107 108 - **Start serviceAbility and dataAbility of the FA model across applications.** 109 110 - OpenHarmony 3.2 Beta3 rules: 111 - Starting **serviceAbility** and **dataAbility** across applications is not restricted. 112 - OpenHarmony 3.2 Beta4 rules: 113 - Associated startup needs to be configured for the provider of **serviceAbility** and **dataAbility**. Otherwise, **serviceAbility** and **dataAbility** cannot be started across applications. (Associated startup cannot be configured for common applications.) 114 115 116 - **Use the startAbilityByCall API.** 117 - OpenHarmony 3.2 Beta3 rules: 118 119 - The API call is not restricted. 120 - OpenHarmony 3.2 Beta4 rules: 121 122 - The **startAbilityByCall** API cannot be called by the same application. 123 - Calling the **startAbilityByCall** API across applications requires authentication. The following permission needs to be applied for: 124 125 ```json 126 { 127 "name": "ohos.permission.ABILITY_BACKGROUND_COMMUNICATION", 128 "grantMode": "system_grant", 129 "availableLevel": "system_basic", 130 "provisionEnable": true, 131 "distributedSceneEnable": false 132 } 133 ``` 134 > **NOTE** 135 > 136 > Using the **startAbilityByCall** API is also restricted by the background startup and across-application invisible component startup rules. 137 138## cl.ability.2 Cross-Device Application Component Startup Rule Change (for System Applications Only) 139 140The rules for starting cross-device application components of the ability subsystem are changed in the following scenarios: 141 142 - Start application components when the application is in the background. 143 - Start invisible application components across applications. 144 - Start **serviceAbility** of the FA model across applications. 145 146You need to adapt your application based on the following information. 147 148 149**Change Impacts** 150 151If new rules are not adapted, application components cannot be started in the previous scenarios. 152>**NOTE** 153> 154>Starting application components refers to any behavior starting or connecting to an ability. 155> 156>1. Start an ability using APIs such as **startAbility**, **startAbilityForResult**, and **startAbilityByCall**. 157>2. Connect to an ability using APIs such as **connectAbility**. 158 159**Key API/Component Changes** 160 161 - Involved application components 162 - Stage model 163 - Ability 164 - ServiceExtension 165 - FA model 166 - PageAbility 167 - ServiceAbility 168 - Involved APIs 169 - Stage model 170 - startAbility(want: Want, callback: AsyncCallback<void>): void; 171 - startAbilityByCall(want: Want): Promise<Caller>; 172 - startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): void; 173 - connectAbility(want: Want, options: ConnectOptions): number; 174 - FA model 175 - startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>): void; 176 - startAbility(parameter: StartAbilityParameter): Promise<number>; 177 - startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>): void; 178 - startAbilityForResult(parameter: StartAbilityParameter): Promise<AbilityResult>; 179 - connectAbility(request: Want, options:ConnectOptions ): number; 180 181**Adaptation Guide** 182 183Startup rules for different scenarios are as follows: 184 - **Start application components when the application is in the background.** 185 - OpenHarmony 3.2 Beta3 rules: 186 187 - Starting application components when the application is in the background is not restricted. 188 - OpenHarmony 3.2 Beta4 rules: 189 - When the application is in the background, starting application components requires authentication. The following permission needs to be applied for: 190 ```json 191 { 192 "name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND", 193 "grantMode": "system_grant", 194 "availableLevel": "system_basic", 195 "provisionEnable": true, 196 "distributedSceneEnable": false 197 } 198 ``` 199 > **NOTE** 200 > 201 > 1. Starting components of the same application is also restricted by this rule. 202 > 2. For SDKs of API version 8 or earlier, starting **serviceAbility** is not restricted by this rule. 203 204 - **Start invisible application components across applications.** 205 - OpenHarmony 3.2 Beta3 rules: 206 207 - Invisible application components cannot be started across applications. 208 - OpenHarmony 3.2 Beta4 rules: 209 - Starting invisible application components across applications requires authentication. The following permission needs to be applied for: 210 ```json 211 { 212 "name": "ohos.permission.START_INVISIBLE_ABILITY", 213 "grantMode": "system_grant", 214 "availableLevel": "system_core", 215 "provisionEnable": true, 216 "distributedSceneEnable": false 217 } 218 ``` 219 220 - **Start serviceAbility of the FA model across applications.** 221 222 - OpenHarmony 3.2 Beta3 rules: 223 224 - Starting **serviceAbility** across applications is not restricted. 225 - OpenHarmony 3.2 Beta4 rules: 226 - Associated startup needs to be configured for the **serviceAbility** provider application. Otherwise, **serviceAbility** cannot be started across applications. (Associated startup cannot be configured for common applications.) 227 - Configure associated startup as follows: 228 ```json 229 { 230 "bundleName": "", 231 "app_signature": ["xxxxxxxxxxxxxxxxxxx"], 232 "associatedWakeUp": true 233 } 234 ``` 235 236## cl.ability.3 API Exception Handling Method Change 237 238Certain APIs of the ability subsystem use service logic return values to indicate error information, which does not comply with the API error code specifications of OpenHarmony. 239 240**Change Impacts** 241 242The application developed based on earlier versions needs to adapt the new APIs and their method for returning API error information. Otherwise, the original service logic will be affected. 243 244**Key API/Component Changes** 245 246For adaptation to the unified API exception handling mode, certain ability subsystem APIs are deprecated (original APIs in the following table) and corresponding new APIs in the following table are added. (In the following table, original APIs in API version 9 will be deleted, and APIs in API version 8 and earlier will be deprecated.) The newly added APIs support unified error code handling specifications and function the same as the original APIs. 247 248| Original API | New API | 249| ----------------------------------------------- | ----------------------------------------------- | 250| @ohos.ability.wantConstant.d.ts | @ohos.app.ability.wantConstant.d.ts | 251| @ohos.application.Ability.d.ts | @ohos.app.ability.UIAbility.d.ts | 252| @ohos.application.AbilityConstant.d.ts | @ohos.app.ability.AbilityConstant.d.ts | 253| @ohos.application.abilityDelegatorRegistry.d.ts | @ohos.app.ability.abilityDelegatorRegistry.d.ts | 254| @ohos.application.AbilityLifecycleCallback.d.ts | @ohos.app.ability.AbilityLifecycleCallback.d.ts | 255| @ohos.application.abilityManager.d.ts | @ohos.app.ability.abilityManager.d.ts | 256| @ohos.application.AbilityStage.d.ts | @ohos.app.ability.AbilityStage.d.ts | 257| @ohos.application.appManager.d.ts | @ohos.app.ability.appManager.d.ts | 258| @ohos.application.Configuration.d.ts | @ohos.app.ability.Configuration.d.ts | 259| @ohos.application.ConfigurationConstant.d.ts | @ohos.app.ability.ConfigurationConstant.d.ts | 260| @ohos.application.context.d.ts | @ohos.app.ability.common.d.ts | 261| @ohos.application.EnvironmentCallback.d.ts | @ohos.app.ability.EnvironmentCallback.d.ts | 262| @ohos.application.errorManager.d.ts | @ohos.app.ability.errorManager.d.ts | 263| @ohos.application.ExtensionAbility.d.ts | @ohos.app.ability.ExtensionAbility.d.ts | 264| @ohos.application.formBindingData.d.ts | @ohos.app.form.formBindingData.d.ts | 265| @ohos.application.FormExtension.d.ts | @ohos.app.form.FormExtensionAbility.d.ts | 266| @ohos.application.formHost.d.ts | @ohos.app.form.formHost.d.ts | 267| @ohos.application.formInfo.d.ts | @ohos.app.form.formInfo.d.ts | 268| @ohos.application.formProvider.d.ts | @ohos.app.form.formProvider.d.ts | 269| @ohos.application.missionManager.d.ts | @ohos.app.ability.missionManager.d.ts | 270| @ohos.application.quickFixManager.d.ts | @ohos.app.ability.quickFixManager.d.ts | 271| @ohos.application.ServiceExtensionAbility.d.ts | @ohos.app.ability.ServiceExtensionAbility.d.ts | 272| @ohos.application.StartOptions.d.ts | @ohos.app.ability.StartOptions.d.ts | 273| @ohos.application.Want.d.ts | @ohos.app.ability.Want.d.ts | 274| @ohos.wantAgent.d.ts | @ohos.app.ability.wantAgent.d.ts | 275 276**Adaptation Guide** 277 278The original APIs are only migrated to the new namespace. Therefore, you can modify **import** to solve the adaptation problem. 279 280If the original API uses **@ohos.application.missionManager**: 281 282```js 283import missionManager from '@ohos.application.missionManager'; 284``` 285 286You can directly modify **import** to switch to the new namespace: 287 288```js 289import missionManager from '@ohos.app.ability.missionManager'; 290``` 291 292In addition, exception handling is needed. For details, see the API reference for the new APIs. 293 294## cl.ability.4 API Change 295 296The names of some ability subsystem APIs are changed. 297 298**Key API/Component Changes** 299 300| Module | Class | Method/Attribute/Enumeration/Constant | Change Type| 301| ----------------------------------------- | ----------------------- | ------------------------------------------------------------ | -------- | 302| @ohos.application.Ability | Caller | onRelease(callback: OnReleaseCallBack): **void**; | Deprecated | 303| @ohos.app.ability.UIAbility | Caller | on(**type**: "release", callback: OnReleaseCallBack): **void**; | Added | 304| @ohos.application.Ability | Ability | dump(params: Array<**string**>): Array<**string**>; | Deprecated | 305| @ohos.app.ability.UIAbility | UIAbility | onDump(params: Array<**string**>): Array<**string**>; | Added | 306| @ohos.application.appManager | appManager | **function** registerApplicationStateObserver(observer: ApplicationStateObserver): **number**; | Deprecated | 307| @ohos.application.appManager | appManager | **function** registerApplicationStateObserver(observer: ApplicationStateObserver, bundleNameList: Array<**string**>): **number**; | Deprecated | 308| @ohos.application.appManager | appManager | **function** unregisterApplicationStateObserver(observerId: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 309| @ohos.application.appManager | appManager | **function** unregisterApplicationStateObserver(observerId: **number**): Promise<**void**>; | Deprecated | 310| @ohos.app.ability.appManager | appManager | **function** on(**type**: "applicationState", observer: ApplicationStateObserver): **number**; | Added | 311| @ohos.app.ability.appManager | appManager | **function** on(**type**: "applicationState", observer: ApplicationStateObserver, bundleNameList: Array<**string**>): **number**; | Added | 312| @ohos.app.ability.appManager | appManager | **function** off(**type**: "applicationState", observerId: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 313| @ohos.app.ability.appManager | appManager | **function** off(**type**: "applicationState", observerId: **number**): Promise<**void**>; | Added | 314| @ohos.application.errorManager | errorManager | **function** registerErrorObserver(observer: ErrorObserver): **number**; | Deprecated | 315| @ohos.application.errorManager | errorManager | **function** unregisterErrorObserver(observerId: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 316| @ohos.application.errorManager | errorManager | **function** unregisterErrorObserver(observerId: **number**): Promise<**void**>; | Deprecated | 317| @ohos.app.ability.errorManager | errorManager | **function** on(**type**: "error", observer: ErrorObserver): **number**; | Added | 318| @ohos.app.ability.errorManager | errorManager | **function** off(**type**: "error", observerId: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 319| @ohos.app.ability.errorManager | errorManager | **function** off(**type**: "error", observerId: **number**): Promise<**void**>; | Added | 320| @ohos.application.missionManager | missionManager | **function** registerMissionListener(listener: MissionListener): **number**; | Deprecated | 321| @ohos.application.missionManager | missionManager | **function** unregisterMissionListener(listenerId: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 322| @ohos.application.missionManager | missionManager | **function** unregisterMissionListener(listenerId: **number**): Promise<**void**>; | Deprecated | 323| @ohos.app.ability.missionManager | missionManager | **function** on(**type**: "mission", listener: MissionListener): **number**; | Added | 324| @ohos.app.ability.missionManager | missionManager | **function** off(**type**: "mission", listenerId: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 325| @ohos.app.ability.missionManager | missionManager | **function** off(**type**: "mission", listenerId: **number**): Promise<**void**>; | Added | 326| @ohos.application.FormExtension | FormExtension | onCreate(want: Want): formBindingData.FormBindingData; | Deprecated | 327| @ohos.application.FormExtension | FormExtension | onCastToNormal(formId: **string**): **void**; | Deprecated | 328| @ohos.application.FormExtension | FormExtension | onUpdate(formId: **string**): **void**; | Deprecated | 329| @ohos.application.FormExtension | FormExtension | onVisibilityChange(newStatus: { [key: **string**]: **number** }): **void**; | Deprecated | 330| @ohos.application.FormExtension | FormExtension | onEvent(formId: **string**, message: **string**): **void**; | Deprecated | 331| @ohos.application.FormExtension | FormExtension | onDestroy(formId: **string**): **void**; | Deprecated | 332| @ohos.application.FormExtension | FormExtension | onShare?(formId: **string**): {[key: **string**]: **any**}; | Deprecated | 333| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onAddForm(want: Want): formBindingData.FormBindingData; | Added | 334| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onCastToNormalForm(formId: **string**): **void**; | Added | 335| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onUpdateForm(formId: **string**): **void**; | Added | 336| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onChangeFormVisibility(newStatus: { [key: **string**]: **number** }): **void**; | Added | 337| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onFormEvent(formId: **string**, message: **string**): **void**; | Added | 338| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onRemoveForm(formId: **string**): **void**; | Added | 339| @ohos.app.form.FormExtensionAbility | FormExtensionAbility | onShareForm?(formId: **string**): {[key: **string**]: **any**}; | Added | 340| @ohos.application.formHost.d.ts | formHost | **function** castTempForm(formId: **string**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 341| @ohos.application.formHost.d.ts | formHost | **function** castTempForm(formId: **string**): Promise<**void**>; | Deprecated | 342| @ohos.app.form.formHost.d.ts | formHost | **function** castToNormalForm(formId: **string**, callback: AsyncCallback<**void**>): **void**; | Added | 343| @ohos.app.form.formHost.d.ts | formHost | **function** castToNormalForm(formId: **string**): Promise<**void**>; | Added | 344| @ohos.application.ServiceExtensionAbility | ServiceExtensionAbility | dump(params: Array<**string**>): Array<**string**>; | Deprecated | 345| @ohos.app.ability.ServiceExtensionAbility | ServiceExtensionAbility | onDump(params: Array<**string**>): Array<**string**>; | Added | 346| application/AbilityContext | AbilityContext | connectAbility(want: Want, options: ConnectOptions): **number**; | Deprecated | 347| application/AbilityContext | AbilityContext | connectAbilityWithAccount(want: Want, accountId: **number**, options: ConnectOptions): **number**; | Deprecated | 348| application/AbilityContext | AbilityContext | disconnectAbility(connection: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 349| application/AbilityContext | AbilityContext | disconnectAbility(connection: **number**): Promise<**void**>; | Deprecated | 350| application/UIAbilityContext | UIAbilityContext | connectServiceExtensionAbilityWithAccount(want: Want, accountId: **number**, options: ConnectOptions): **number**; | Added | 351| application/UIAbilityContext | UIAbilityContext | connectServiceExtensionAbilityWithAccount(want: Want, accountId: **number**, options: ConnectOptions): **number**; | Added | 352| application/UIAbilityContext | UIAbilityContext | disconnectServiceExtensionAbility(connection: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 353| application/UIAbilityContext | UIAbilityContext | disconnectServiceExtensionAbility(connection: **number**): Promise<**void**>; | Added | 354| application/ApplicationContext | ApplicationContext | registerAbilityLifecycleCallback(callback: AbilityLifecycleCallback): **number**; | Deprecated | 355| application/ApplicationContext | ApplicationContext | unregisterAbilityLifecycleCallback(callbackId: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 356| application/ApplicationContext | ApplicationContext | unregisterAbilityLifecycleCallback(callbackId: **number**): Promise<**void**>; | Deprecated | 357| application/ApplicationContext | ApplicationContext | registerEnvironmentCallback(callback: EnvironmentCallback): **number**; | Deprecated | 358| application/ApplicationContext | ApplicationContext | unregisterEnvironmentCallback(callbackId: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 359| application/ApplicationContext | ApplicationContext | unregisterEnvironmentCallback(callbackId: **number**): Promise<**void**>; | Deprecated | 360| application/ApplicationContext | ApplicationContext | on(**type**: "abilityLifecycle", callback: AbilityLifecycleCallback): **number**; | Added | 361| application/ApplicationContext | ApplicationContext | off(**type**: "abilityLifecycle", callbackId: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 362| application/ApplicationContext | ApplicationContext | off(**type**: "abilityLifecycle", callbackId: **number**): Promise<**void**>; | Added | 363| application/ApplicationContext | ApplicationContext | on(**type**: "environment", callback: EnvironmentCallback): **number**; | Added | 364| application/ApplicationContext | ApplicationContext | off(**type**: "environment", callbackId: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 365| application/ApplicationContext | ApplicationContext | off(**type**: "environment", callbackId: **number**): Promise<**void**>; | Added | 366| application/ServiceExtensionContext | ServiceExtensionContext | connectAbility(want: Want, options: ConnectOptions): **number**; | Deprecated | 367| application/ServiceExtensionContext | ServiceExtensionContext | connectAbilityWithAccount(want: Want, accountId: **number**, options: ConnectOptions): **number**; | Deprecated | 368| application/ServiceExtensionContext | ServiceExtensionContext | disconnectAbility(connection: **number**, callback: AsyncCallback<**void**>): **void**; | Deprecated | 369| application/ServiceExtensionContext | ServiceExtensionContext | disconnectAbility(connection: **number**): Promise<**void**>; | Deprecated | 370| application/ServiceExtensionContext | ServiceExtensionContext | connectServiceExtensionAbility(want: Want, options: ConnectOptions): **number**; | Added | 371| application/ServiceExtensionContext | ServiceExtensionContext | connectServiceExtensionAbilityWithAccount(want: Want, accountId: **number**, options: ConnectOptions): **number**; | Added | 372| application/ServiceExtensionContext | ServiceExtensionContext | disconnectServiceExtensionAbility(connection: **number**, callback: AsyncCallback<**void**>): **void**; | Added | 373| application/ServiceExtensionContext | ServiceExtensionContext | disconnectServiceExtensionAbility(connection: **number**): Promise<**void**>; | Added | 374