1/* 2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"), 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit AbilityKit 19 */ 20 21import { AsyncCallback } from '../@ohos.base'; 22import Context from './Context'; 23import AbilityLifecycleCallback from '../@ohos.app.ability.AbilityLifecycleCallback'; 24import EnvironmentCallback from '../@ohos.app.ability.EnvironmentCallback'; 25import type ApplicationStateChangeCallback from '../@ohos.app.ability.ApplicationStateChangeCallback'; 26import { ProcessInformation } from './ProcessInformation'; 27import type ConfigurationConstant from '../@ohos.app.ability.ConfigurationConstant'; 28import Want from '../@ohos.app.ability.Want'; 29 30/** 31 * The context of an application. It allows access to application-specific resources. 32 * 33 * @extends Context 34 * @syscap SystemCapability.Ability.AbilityRuntime.Core 35 * @stagemodelonly 36 * @since 9 37 */ 38/** 39 * The context of an application. It allows access to application-specific resources. 40 * 41 * @extends Context 42 * @syscap SystemCapability.Ability.AbilityRuntime.Core 43 * @stagemodelonly 44 * @crossplatform 45 * @since 10 46 */ 47/** 48 * The context of an application. It allows access to application-specific resources. 49 * 50 * @extends Context 51 * @syscap SystemCapability.Ability.AbilityRuntime.Core 52 * @stagemodelonly 53 * @crossplatform 54 * @atomicservice 55 * @since 11 56 */ 57export default class ApplicationContext extends Context { 58 /** 59 * Register ability lifecycle callback. 60 * 61 * @param { 'abilityLifecycle' } type - abilityLifecycle. 62 * @param { AbilityLifecycleCallback } callback - The ability lifecycle callback. 63 * @returns { number } Returns the number code of the callback. 64 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 65 * @syscap SystemCapability.Ability.AbilityRuntime.Core 66 * @stagemodelonly 67 * @since 9 68 */ 69 /** 70 * Register ability lifecycle callback. 71 * 72 * @param { 'abilityLifecycle' } type - abilityLifecycle. 73 * @param { AbilityLifecycleCallback } callback - The ability lifecycle callback. 74 * @returns { number } Returns the number code of the callback. 75 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 76 * @syscap SystemCapability.Ability.AbilityRuntime.Core 77 * @stagemodelonly 78 * @crossplatform 79 * @since 10 80 */ 81 /** 82 * Register ability lifecycle callback. 83 * 84 * @param { 'abilityLifecycle' } type - abilityLifecycle. 85 * @param { AbilityLifecycleCallback } callback - The ability lifecycle callback. 86 * @returns { number } Returns the number code of the callback. 87 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 88 * @syscap SystemCapability.Ability.AbilityRuntime.Core 89 * @stagemodelonly 90 * @crossplatform 91 * @atomicservice 92 * @since 11 93 */ 94 on(type: 'abilityLifecycle', callback: AbilityLifecycleCallback): number; 95 96 /** 97 * Unregister ability lifecycle callback. 98 * 99 * @param { 'abilityLifecycle' } type - abilityLifecycle. 100 * @param { number } callbackId - Indicates the number code of the callback. 101 * @param { AsyncCallback<void> } callback - The callback of off. 102 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 103 * @syscap SystemCapability.Ability.AbilityRuntime.Core 104 * @stagemodelonly 105 * @since 9 106 */ 107 /** 108 * Unregister ability lifecycle callback. 109 * 110 * @param { 'abilityLifecycle' } type - abilityLifecycle. 111 * @param { number } callbackId - Indicates the number code of the callback. 112 * @param { AsyncCallback<void> } callback - The callback of off. 113 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 114 * @syscap SystemCapability.Ability.AbilityRuntime.Core 115 * @stagemodelonly 116 * @crossplatform 117 * @since 10 118 */ 119 /** 120 * Unregister ability lifecycle callback. 121 * 122 * @param { 'abilityLifecycle' } type - abilityLifecycle. 123 * @param { number } callbackId - Indicates the number code of the callback. 124 * @param { AsyncCallback<void> } callback - The callback of off. 125 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 126 * @syscap SystemCapability.Ability.AbilityRuntime.Core 127 * @stagemodelonly 128 * @crossplatform 129 * @atomicservice 130 * @since 11 131 */ 132 off(type: 'abilityLifecycle', callbackId: number, callback: AsyncCallback<void>): void; 133 134 /** 135 * Unregister ability lifecycle callback. 136 * 137 * @param { 'abilityLifecycle' } type - abilityLifecycle. 138 * @param { number } callbackId - Indicates the number code of the callback. 139 * @returns { Promise<void> } The promise returned by the function. 140 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 141 * @syscap SystemCapability.Ability.AbilityRuntime.Core 142 * @stagemodelonly 143 * @since 9 144 */ 145 /** 146 * Unregister ability lifecycle callback. 147 * 148 * @param { 'abilityLifecycle' } type - abilityLifecycle. 149 * @param { number } callbackId - Indicates the number code of the callback. 150 * @returns { Promise<void> } The promise returned by the function. 151 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 152 * @syscap SystemCapability.Ability.AbilityRuntime.Core 153 * @stagemodelonly 154 * @atomicservice 155 * @since 11 156 */ 157 /** 158 * Unregister ability lifecycle callback. 159 * 160 * @param { 'abilityLifecycle' } type - abilityLifecycle. 161 * @param { number } callbackId - Indicates the number code of the callback. 162 * @returns { Promise<void> } The promise returned by the function. 163 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 164 * @syscap SystemCapability.Ability.AbilityRuntime.Core 165 * @stagemodelonly 166 * @crossplatform 167 * @atomicservice 168 * @since 12 169 */ 170 off(type: 'abilityLifecycle', callbackId: number): Promise<void>; 171 172 /** 173 * Register environment callback. 174 * 175 * @param { 'environment' } type - environment. 176 * @param { EnvironmentCallback } callback - The environment callback. 177 * @returns { number } Returns the number code of the callback. 178 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 179 * @syscap SystemCapability.Ability.AbilityRuntime.Core 180 * @stagemodelonly 181 * @since 9 182 */ 183 /** 184 * Register environment callback. 185 * 186 * @param { 'environment' } type - environment. 187 * @param { EnvironmentCallback } callback - The environment callback. 188 * @returns { number } Returns the number code of the callback. 189 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 190 * @syscap SystemCapability.Ability.AbilityRuntime.Core 191 * @stagemodelonly 192 * @atomicservice 193 * @since 11 194 */ 195 on(type: 'environment', callback: EnvironmentCallback): number; 196 197 /** 198 * Unregister environment callback. 199 * 200 * @param { 'environment' } type - environment. 201 * @param { number } callbackId - Indicates the number code of the callback. 202 * @param { AsyncCallback<void> } callback - The callback of unregisterEnvironmentCallback. 203 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 204 * @syscap SystemCapability.Ability.AbilityRuntime.Core 205 * @stagemodelonly 206 * @since 9 207 */ 208 /** 209 * Unregister environment callback. 210 * 211 * @param { 'environment' } type - environment. 212 * @param { number } callbackId - Indicates the number code of the callback. 213 * @param { AsyncCallback<void> } callback - The callback of unregisterEnvironmentCallback. 214 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 215 * @syscap SystemCapability.Ability.AbilityRuntime.Core 216 * @stagemodelonly 217 * @atomicservice 218 * @since 11 219 */ 220 off(type: 'environment', callbackId: number, callback: AsyncCallback<void>): void; 221 222 /** 223 * Unregister environment callback. 224 * 225 * @param { 'environment' } type - environment. 226 * @param { number } callbackId - Indicates the number code of the callback. 227 * @returns { Promise<void> } The promise returned by the function. 228 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 229 * @syscap SystemCapability.Ability.AbilityRuntime.Core 230 * @stagemodelonly 231 * @since 9 232 */ 233 /** 234 * Unregister environment callback. 235 * 236 * @param { 'environment' } type - environment. 237 * @param { number } callbackId - Indicates the number code of the callback. 238 * @returns { Promise<void> } The promise returned by the function. 239 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 240 * @syscap SystemCapability.Ability.AbilityRuntime.Core 241 * @stagemodelonly 242 * @atomicservice 243 * @since 11 244 */ 245 off(type: 'environment', callbackId: number): Promise<void>; 246 247 /** 248 * Register applicationStateChange callback. 249 * 250 * @param { 'applicationStateChange' } type - applicationStateChange. 251 * @param { ApplicationStateChangeCallback } callback - The applicationStateChange callback. 252 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 253 * @syscap SystemCapability.Ability.AbilityRuntime.Core 254 * @stagemodelonly 255 * @since 10 256 */ 257 /** 258 * Register applicationStateChange callback. 259 * 260 * @param { 'applicationStateChange' } type - applicationStateChange. 261 * @param { ApplicationStateChangeCallback } callback - The applicationStateChange callback. 262 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 263 * @syscap SystemCapability.Ability.AbilityRuntime.Core 264 * @stagemodelonly 265 * @atomicservice 266 * @since 11 267 */ 268 on(type: 'applicationStateChange', callback: ApplicationStateChangeCallback): void; 269 270 /** 271 * Unregister applicationStateChange callback. 272 * 273 * @param { 'applicationStateChange' } type - applicationStateChange. 274 * @param { ApplicationStateChangeCallback } [callback] - The applicationStateChange callback. 275 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 276 * @syscap SystemCapability.Ability.AbilityRuntime.Core 277 * @stagemodelonly 278 * @since 10 279 */ 280 /** 281 * Unregister applicationStateChange callback. 282 * 283 * @param { 'applicationStateChange' } type - applicationStateChange. 284 * @param { ApplicationStateChangeCallback } [callback] - The applicationStateChange callback. 285 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 286 * @syscap SystemCapability.Ability.AbilityRuntime.Core 287 * @stagemodelonly 288 * @atomicservice 289 * @since 11 290 */ 291 off(type: 'applicationStateChange', callback?: ApplicationStateChangeCallback): void; 292 293 /** 294 * Get information about running processes 295 * 296 * @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}. 297 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 298 * @throws { BusinessError } 16000011 - The context does not exist. 299 * @throws { BusinessError } 16000050 - Internal error. 300 * @syscap SystemCapability.Ability.AbilityRuntime.Core 301 * @stagemodelonly 302 * @since 9 303 */ 304 /** 305 * Get information about running processes 306 * 307 * @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}. 308 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 309 * @throws { BusinessError } 16000011 - The context does not exist. 310 * @throws { BusinessError } 16000050 - Internal error. 311 * @syscap SystemCapability.Ability.AbilityRuntime.Core 312 * @stagemodelonly 313 * @crossplatform 314 * @since 10 315 */ 316 /** 317 * Get information about running processes 318 * 319 * @returns { Promise<Array<ProcessInformation>> } Returns the array of {@link ProcessInformation}. 320 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 321 * @throws { BusinessError } 16000011 - The context does not exist. 322 * @throws { BusinessError } 16000050 - Internal error. 323 * @syscap SystemCapability.Ability.AbilityRuntime.Core 324 * @stagemodelonly 325 * @crossplatform 326 * @atomicservice 327 * @since 11 328 */ 329 getRunningProcessInformation(): Promise<Array<ProcessInformation>>; 330 331 /** 332 * Get information about running processes 333 * 334 * @param { AsyncCallback<Array<ProcessInformation>> } callback - The callback is used to return the array of {@link ProcessInformation}. 335 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 336 * @throws { BusinessError } 16000011 - The context does not exist. 337 * @throws { BusinessError } 16000050 - Internal error. 338 * @syscap SystemCapability.Ability.AbilityRuntime.Core 339 * @stagemodelonly 340 * @since 9 341 */ 342 /** 343 * Get information about running processes 344 * 345 * @param { AsyncCallback<Array<ProcessInformation>> } callback - The callback is used to return the array of {@link ProcessInformation}. 346 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 347 * @throws { BusinessError } 16000011 - The context does not exist. 348 * @throws { BusinessError } 16000050 - Internal error. 349 * @syscap SystemCapability.Ability.AbilityRuntime.Core 350 * @stagemodelonly 351 * @crossplatform 352 * @since 10 353 */ 354 /** 355 * Get information about running processes 356 * 357 * @param { AsyncCallback<Array<ProcessInformation>> } callback - The callback is used to return the array of {@link ProcessInformation}. 358 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 359 * @throws { BusinessError } 16000011 - The context does not exist. 360 * @throws { BusinessError } 16000050 - Internal error. 361 * @syscap SystemCapability.Ability.AbilityRuntime.Core 362 * @stagemodelonly 363 * @crossplatform 364 * @atomicservice 365 * @since 11 366 */ 367 getRunningProcessInformation(callback: AsyncCallback<Array<ProcessInformation>>): void; 368 369 /** 370 * Kill all processes of the application 371 * 372 * @returns { Promise<void> } The promise returned by the function. 373 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 374 * @throws { BusinessError } 16000011 - The context does not exist. 375 * @syscap SystemCapability.Ability.AbilityRuntime.Core 376 * @stagemodelonly 377 * @since 9 378 */ 379 /** 380 * Kill all processes of the application 381 * 382 * @returns { Promise<void> } The promise returned by the function. 383 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 384 * @throws { BusinessError } 16000011 - The context does not exist. 385 * @syscap SystemCapability.Ability.AbilityRuntime.Core 386 * @stagemodelonly 387 * @atomicservice 388 * @since 11 389 */ 390 killAllProcesses(): Promise<void>; 391 392 /** 393 * Kill all processes of the application 394 * 395 * @param { AsyncCallback<void> } callback - The callback of killAllProcesses. 396 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 397 * @throws { BusinessError } 16000011 - The context does not exist. 398 * @syscap SystemCapability.Ability.AbilityRuntime.Core 399 * @stagemodelonly 400 * @since 9 401 */ 402 /** 403 * Kill all processes of the application 404 * 405 * @param { AsyncCallback<void> } callback - The callback of killAllProcesses. 406 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 407 * @throws { BusinessError } 16000011 - The context does not exist. 408 * @syscap SystemCapability.Ability.AbilityRuntime.Core 409 * @stagemodelonly 410 * @atomicservice 411 * @since 11 412 */ 413 killAllProcesses(callback: AsyncCallback<void>); 414 415 /** 416 * Set colorMode of the application 417 * 418 * @param { ConfigurationConstant.ColorMode } colorMode - Color mode. 419 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 420 * @throws { BusinessError } 16000011 - The context does not exist. 421 * @syscap SystemCapability.Ability.AbilityRuntime.Core 422 * @stagemodelonly 423 * @atomicservice 424 * @since 11 425 */ 426 setColorMode(colorMode: ConfigurationConstant.ColorMode): void; 427 428 /** 429 * Set language of the application 430 * 431 * @param { string } language - Language. 432 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 433 * @throws { BusinessError } 16000011 - The context does not exist. 434 * @syscap SystemCapability.Ability.AbilityRuntime.Core 435 * @stagemodelonly 436 * @atomicservice 437 * @since 11 438 */ 439 setLanguage(language: string): void; 440 441 /** 442 * Clear up application data by app self 443 * 444 * @returns { Promise<void> } The promise returned by the function. 445 * @throws { BusinessError } 16000011 - The context does not exist. 446 * @throws { BusinessError } 16000050 - Internal error. 447 * @syscap SystemCapability.Ability.AbilityRuntime.Core 448 * @stagemodelonly 449 * @since 11 450 */ 451 clearUpApplicationData(): Promise<void>; 452 453 /** 454 * Clear up application data by app self 455 * 456 * @param { AsyncCallback<void> } callback - The callback of clearUpApplicationData. 457 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 458 * @throws { BusinessError } 16000011 - The context does not exist. 459 * @throws { BusinessError } 16000050 - Internal error. 460 * @syscap SystemCapability.Ability.AbilityRuntime.Core 461 * @stagemodelonly 462 * @since 11 463 */ 464 clearUpApplicationData(callback: AsyncCallback<void>): void; 465 466 /** 467 * Kill the application and does not call back the onDestroy method, then start UIAbility. 468 * 469 * @param { Want } want - Indicates the want name of the current app, and the ability name is UIAbility. 470 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 471 * @throws { BusinessError } 16000050 - Internal error. 472 * @throws { BusinessError } 16000053 - The ability is not on the top of the UI. 473 * @throws { BusinessError } 16000063 - The target to restart does not belong to the current app or is not a UIAbility. 474 * @throws { BusinessError } 16000064 - Restart too frequently. Try again at least 10s later. 475 * @syscap SystemCapability.Ability.AbilityRuntime.Core 476 * @stagemodelonly 477 * @atomicservice 478 * @since 12 479 */ 480 restartApp(want: Want): void; 481 482 /** 483 * Preload UIExtensionAbility. 484 * 485 * @permission ohos.permission.PRELOAD_UI_EXTENSION_ABILITY 486 * @param { Want } want - Indicates the want of target UIExtensionAbility. 487 * @returns { Promise<void> } The promise returned by the function. 488 * @throws { BusinessError } 201 - The application does not have permission to call the interface. 489 * @throws { BusinessError } 202 - The application is not system-app, can not use system-api. 490 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 491 * @throws { BusinessError } 16000001 - The specified ability does not exist. 492 * @throws { BusinessError } 16000002 - Incorrect ability type. 493 * @throws { BusinessError } 16000004 - Can not start invisible component. 494 * @throws { BusinessError } 16000011 - The context does not exist. 495 * @throws { BusinessError } 16000050 - Internal error. 496 * @syscap SystemCapability.Ability.AbilityRuntime.Core 497 * @systemapi 498 * @stagemodelonly 499 * @since 12 500 */ 501 preloadUIExtensionAbility(want: Want): Promise<void>; 502 503 /** 504 * Set the state about whether the application supports process cache or not. 505 * 506 * @param { boolean } isSupported - Indicates the process cache support state. 507 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 508 * @throws { BusinessError } 801 - Capability not supported. 509 * @throws { BusinessError } 16000011 - The context does not exist. 510 * @throws { BusinessError } 16000050 - Internal error. 511 * @syscap SystemCapability.Ability.AbilityRuntime.Core 512 * @stagemodelonly 513 * @since 12 514 */ 515 setSupportedProcessCache(isSupported : boolean): void; 516 517 /** 518 * Set font of the application 519 * 520 * @param { string } font - Font. 521 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. 522 * @throws { BusinessError } 16000011 - The context does not exist. 523 * @throws { BusinessError } 16000050 - Internal error. 524 * @syscap SystemCapability.Ability.AbilityRuntime.Core 525 * @stagemodelonly 526 * @since 12 527 */ 528 setFont(font: string): void; 529 530 /** 531 * Get current app clone index. 532 * 533 * @returns { number } Returns the app clone index for current app. 534 * @throws { BusinessError } 16000011 - The context does not exist. 535 * @throws { BusinessError } 16000071 - The MultiAppMode is not {@link APP_CLONE}. 536 * @syscap SystemCapability.Ability.AbilityRuntime.Core 537 * @stagemodelonly 538 * @atomicservice 539 * @since 12 540 */ 541 getCurrentAppCloneIndex(): number; 542 543 /** 544 * Set font size scale. 545 * @param {number} fontSizeScale - Font size scale. 546 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 547 * @syscap SystemCapability.Ability.AbilityRuntime.Core 548 * @stagemodelonly 549 * @atomicservice 550 * @since 13 551 */ 552 setFontSizeScale(fontSizeScale: number): void; 553} 554