1/* 2 * Copyright (c) 2022-2024 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 type { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, 23 PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; 24import { Metadata as _Metadata } from './bundleManager/Metadata'; 25import { PermissionDef as _PermissionDef } from './bundleManager/PermissionDef'; 26import { ElementName as _ElementName } from './bundleManager/ElementName'; 27import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo'; 28import type { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo'; 29import Want from './@ohos.app.ability.Want'; 30import * as _AbilityInfo from './bundleManager/AbilityInfo'; 31import * as _AppProvisionInfo from './bundleManager/AppProvisionInfo'; 32import * as _BundleInfo from './bundleManager/BundleInfo'; 33import * as _HapModuleInfo from './bundleManager/HapModuleInfo'; 34import * as _ExtensionAbilityInfo from './bundleManager/ExtensionAbilityInfo'; 35import * as _Skill from './bundleManager/Skill'; 36/** 37 * This module is used to obtain package information of various applications installed on the current device. 38 * 39 * @namespace bundleManager 40 * @syscap SystemCapability.BundleManager.BundleFramework.Core 41 * @since 9 42 */ 43/** 44 * This module is used to obtain package information of various applications installed on the current device. 45 * 46 * @namespace bundleManager 47 * @syscap SystemCapability.BundleManager.BundleFramework.Core 48 * @atomicservice 49 * @since 11 50 */ 51/** 52 * This module is used to obtain package information of various applications installed on the current device. 53 * 54 * @namespace bundleManager 55 * @syscap SystemCapability.BundleManager.BundleFramework.Core 56 * @crossplatform 57 * @atomicservice 58 * @since 12 59 */ 60declare namespace bundleManager { 61 /** 62 * Used to query the enumeration value of bundleInfo. Multiple values can be passed in the form. 63 * 64 * @enum { number } 65 * @syscap SystemCapability.BundleManager.BundleFramework.Core 66 * @since 9 67 */ 68 /** 69 * Used to query the enumeration value of bundleInfo. Multiple values can be passed in the form. 70 * 71 * @enum { number } 72 * @syscap SystemCapability.BundleManager.BundleFramework.Core 73 * @atomicservice 74 * @since 11 75 */ 76 enum BundleFlag { 77 /** 78 * Used to obtain the default bundleInfo. The obtained bundleInfo does not contain information of 79 * signatureInfo, applicationInfo, hapModuleInfo, ability, extensionAbility and permission. 80 * 81 * @syscap SystemCapability.BundleManager.BundleFramework.Core 82 * @since 9 83 */ 84 /** 85 * Used to obtain the default bundleInfo. The obtained bundleInfo does not contain information of 86 * signatureInfo, applicationInfo, hapModuleInfo, ability, extensionAbility and permission. 87 * 88 * @syscap SystemCapability.BundleManager.BundleFramework.Core 89 * @atomicservice 90 * @since 11 91 */ 92 GET_BUNDLE_INFO_DEFAULT = 0x00000000, 93 /** 94 * Used to obtain the bundleInfo containing applicationInfo. The obtained bundleInfo does not 95 * contain the information of signatureInfo, hapModuleInfo, ability, extensionAbility and permission. 96 * 97 * @syscap SystemCapability.BundleManager.BundleFramework.Core 98 * @since 9 99 */ 100 /** 101 * Used to obtain the bundleInfo containing applicationInfo. The obtained bundleInfo does not 102 * contain the information of signatureInfo, hapModuleInfo, ability, extensionAbility and permission. 103 * 104 * @syscap SystemCapability.BundleManager.BundleFramework.Core 105 * @atomicservice 106 * @since 11 107 */ 108 GET_BUNDLE_INFO_WITH_APPLICATION = 0x00000001, 109 /** 110 * Used to obtain the bundleInfo containing hapModuleInfo. The obtained bundleInfo does not 111 * contain the information of signatureInfo, applicationInfo, ability, extensionAbility and permission. 112 * 113 * @syscap SystemCapability.BundleManager.BundleFramework.Core 114 * @since 9 115 */ 116 /** 117 * Used to obtain the bundleInfo containing hapModuleInfo. The obtained bundleInfo does not 118 * contain the information of signatureInfo, applicationInfo, ability, extensionAbility and permission. 119 * 120 * @syscap SystemCapability.BundleManager.BundleFramework.Core 121 * @atomicservice 122 * @since 11 123 */ 124 GET_BUNDLE_INFO_WITH_HAP_MODULE = 0x00000002, 125 /** 126 * Used to obtain the bundleInfo containing ability. The obtained bundleInfo does not 127 * contain the information of signatureInfo, applicationInfo, extensionAbility and permission. 128 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE. 129 * 130 * @syscap SystemCapability.BundleManager.BundleFramework.Core 131 * @since 9 132 */ 133 /** 134 * Used to obtain the bundleInfo containing ability. The obtained bundleInfo does not 135 * contain the information of signatureInfo, applicationInfo, extensionAbility and permission. 136 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE. 137 * 138 * @syscap SystemCapability.BundleManager.BundleFramework.Core 139 * @atomicservice 140 * @since 11 141 */ 142 GET_BUNDLE_INFO_WITH_ABILITY = 0x00000004, 143 /** 144 * Used to obtain the bundleInfo containing extensionAbility. The obtained bundleInfo does not 145 * contain the information of signatureInfo, applicationInfo, ability and permission. 146 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE. 147 * 148 * @syscap SystemCapability.BundleManager.BundleFramework.Core 149 * @since 9 150 */ 151 /** 152 * Used to obtain the bundleInfo containing extensionAbility. The obtained bundleInfo does not 153 * contain the information of signatureInfo, applicationInfo, ability and permission. 154 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE. 155 * 156 * @syscap SystemCapability.BundleManager.BundleFramework.Core 157 * @atomicservice 158 * @since 11 159 */ 160 GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY = 0x00000008, 161 /** 162 * Used to obtain the bundleInfo containing permission. The obtained bundleInfo does not 163 * contain the information of signatureInfo, applicationInfo, hapModuleInfo, extensionAbility and ability. 164 * 165 * @syscap SystemCapability.BundleManager.BundleFramework.Core 166 * @since 9 167 */ 168 /** 169 * Used to obtain the bundleInfo containing permission. The obtained bundleInfo does not 170 * contain the information of signatureInfo, applicationInfo, hapModuleInfo, extensionAbility and ability. 171 * 172 * @syscap SystemCapability.BundleManager.BundleFramework.Core 173 * @atomicservice 174 * @since 11 175 */ 176 GET_BUNDLE_INFO_WITH_REQUESTED_PERMISSION = 0x00000010, 177 /** 178 * Used to obtain the metadata contained in applicationInfo, moduleInfo and abilityInfo. 179 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_APPLICATION, 180 * GET_BUNDLE_INFO_WITH_HAP_MODULE, GET_BUNDLE_INFO_WITH_ABILITIES, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY. 181 * 182 * @syscap SystemCapability.BundleManager.BundleFramework.Core 183 * @since 9 184 */ 185 /** 186 * Used to obtain the metadata contained in applicationInfo, moduleInfo and abilityInfo. 187 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_APPLICATION, 188 * GET_BUNDLE_INFO_WITH_HAP_MODULE, GET_BUNDLE_INFO_WITH_ABILITIES, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY. 189 * 190 * @syscap SystemCapability.BundleManager.BundleFramework.Core 191 * @atomicservice 192 * @since 11 193 */ 194 GET_BUNDLE_INFO_WITH_METADATA = 0x00000020, 195 /** 196 * Used to obtain the default bundleInfo containing disabled application and ability. 197 * The obtained bundleInfo does not contain information of signatureInfo, applicationInfo, 198 * hapModuleInfo, ability, extensionAbility and permission. 199 * 200 * @syscap SystemCapability.BundleManager.BundleFramework.Core 201 * @since 9 202 */ 203 /** 204 * Used to obtain the default bundleInfo containing disabled application and ability. 205 * The obtained bundleInfo does not contain information of signatureInfo, applicationInfo, 206 * hapModuleInfo, ability, extensionAbility and permission. 207 * 208 * @syscap SystemCapability.BundleManager.BundleFramework.Core 209 * @atomicservice 210 * @since 11 211 */ 212 GET_BUNDLE_INFO_WITH_DISABLE = 0x00000040, 213 /** 214 * Used to obtain the bundleInfo containing signatureInfo. The obtained bundleInfo does not 215 * contain the information of applicationInfo, hapModuleInfo, extensionAbility, ability and permission. 216 * 217 * @syscap SystemCapability.BundleManager.BundleFramework.Core 218 * @since 9 219 */ 220 /** 221 * Used to obtain the bundleInfo containing signatureInfo. The obtained bundleInfo does not 222 * contain the information of applicationInfo, hapModuleInfo, extensionAbility, ability and permission. 223 * 224 * @syscap SystemCapability.BundleManager.BundleFramework.Core 225 * @atomicservice 226 * @since 11 227 */ 228 GET_BUNDLE_INFO_WITH_SIGNATURE_INFO = 0x00000080, 229 /** 230 * Used to obtain the bundleInfo containing menu configuration in hapModuleInfo. 231 * The obtained bundleInfo does not contain the information of applicationInfo, extensionAbility, ability and permission. 232 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE. 233 * 234 * @syscap SystemCapability.BundleManager.BundleFramework.Core 235 * @atomicservice 236 * @since 11 237 */ 238 GET_BUNDLE_INFO_WITH_MENU = 0x00000100, 239 /** 240 * Used to obtain the bundleInfo containing router map configuration in hapModuleInfo. 241 * The obtained bundleInfo does not contain the information of applicationInfo, extensionAbility, ability and permission. 242 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE. 243 * 244 * @syscap SystemCapability.BundleManager.BundleFramework.Core 245 * @atomicservice 246 * @since 12 247 */ 248 GET_BUNDLE_INFO_WITH_ROUTER_MAP = 0x00000200, 249 /** 250 * Used to obtain the skillInfo contained in abilityInfo and extensionInfo. 251 * It can't be used alone, it needs to be used with GET_BUNDLE_INFO_WITH_HAP_MODULE, 252 * GET_BUNDLE_INFO_WITH_ABILITIES, GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY. 253 * 254 * @syscap SystemCapability.BundleManager.BundleFramework.Core 255 * @atomicservice 256 * @since 12 257 */ 258 GET_BUNDLE_INFO_WITH_SKILL = 0x00000800, 259 /** 260 * Used to return only the applications that have an icon displayed on the homescreen. 261 * Only effective on {@link getAllBundleInfo} 262 * 263 * @syscap SystemCapability.BundleManager.BundleFramework.Core 264 * @systemapi 265 * @since 12 266 */ 267 GET_BUNDLE_INFO_ONLY_WITH_LAUNCHER_ABILITY = 0x00001000, 268 /** 269 * Used to obtain the bundleInfo only if any user installed 270 * 271 * @syscap SystemCapability.BundleManager.BundleFramework.Core 272 * @systemapi 273 * @since 12 274 */ 275 GET_BUNDLE_INFO_OF_ANY_USER = 0x00002000, 276 277 /** 278 * Used to return all applications that exclude app clone information. 279 * Only effective on {@link getAllBundleInfo} 280 * 281 * @syscap SystemCapability.BundleManager.BundleFramework.Core 282 * @systemapi 283 * @since 12 284 */ 285 GET_BUNDLE_INFO_EXCLUDE_CLONE = 0x00004000, 286 } 287 288 /** 289 * Used to query the enumeration value of applicationInfo. Multiple values can be passed in the form. 290 * 291 * @enum { number } 292 * @syscap SystemCapability.BundleManager.BundleFramework.Core 293 * @systemapi 294 * @since 9 295 */ 296 enum ApplicationFlag { 297 /** 298 * Used to obtain the default applicationInfo. The obtained applicationInfo does not contain the information of 299 * permission and metadata. 300 * 301 * @syscap SystemCapability.BundleManager.BundleFramework.Core 302 * @systemapi 303 * @since 9 304 */ 305 GET_APPLICATION_INFO_DEFAULT = 0x00000000, 306 /** 307 * Used to obtain the applicationInfo containing permission. 308 * 309 * @syscap SystemCapability.BundleManager.BundleFramework.Core 310 * @systemapi 311 * @since 9 312 */ 313 GET_APPLICATION_INFO_WITH_PERMISSION = 0x00000001, 314 /** 315 * Used to obtain the applicationInfo containing metadata. 316 * 317 * @syscap SystemCapability.BundleManager.BundleFramework.Core 318 * @systemapi 319 * @since 9 320 */ 321 GET_APPLICATION_INFO_WITH_METADATA = 0x00000002, 322 /** 323 * Used to obtain the applicationInfo containing disabled application. 324 * 325 * @syscap SystemCapability.BundleManager.BundleFramework.Core 326 * @systemapi 327 * @since 9 328 */ 329 GET_APPLICATION_INFO_WITH_DISABLE = 0x00000004 330 } 331 332 /** 333 * Used to query the enumeration value of abilityInfo. Multiple values can be passed in the form. 334 * 335 * @enum { number } 336 * @syscap SystemCapability.BundleManager.BundleFramework.Core 337 * @systemapi 338 * @since 9 339 */ 340 enum AbilityFlag { 341 /** 342 * Used to obtain the default abilityInfo. The obtained abilityInfo does not contain the information of 343 * permission, metadata and disabled abilityInfo. 344 * 345 * @syscap SystemCapability.BundleManager.BundleFramework.Core 346 * @systemapi 347 * @since 9 348 */ 349 GET_ABILITY_INFO_DEFAULT = 0x00000000, 350 /** 351 * Used to obtain the abilityInfo containing permission. 352 * 353 * @syscap SystemCapability.BundleManager.BundleFramework.Core 354 * @systemapi 355 * @since 9 356 */ 357 GET_ABILITY_INFO_WITH_PERMISSION = 0x00000001, 358 /** 359 * Used to obtain the abilityInfo containing applicationInfo. 360 * 361 * @syscap SystemCapability.BundleManager.BundleFramework.Core 362 * @systemapi 363 * @since 9 364 */ 365 GET_ABILITY_INFO_WITH_APPLICATION = 0x00000002, 366 /** 367 * Used to obtain the abilityInfo containing metadata. 368 * 369 * @syscap SystemCapability.BundleManager.BundleFramework.Core 370 * @systemapi 371 * @since 9 372 */ 373 GET_ABILITY_INFO_WITH_METADATA = 0x00000004, 374 /** 375 * Used to obtain the abilityInfo containing disabled abilityInfo. 376 * 377 * @syscap SystemCapability.BundleManager.BundleFramework.Core 378 * @systemapi 379 * @since 9 380 */ 381 GET_ABILITY_INFO_WITH_DISABLE = 0x00000008, 382 /** 383 * Used to obtain the abilityInfo only for system app. 384 * 385 * @syscap SystemCapability.BundleManager.BundleFramework.Core 386 * @systemapi 387 * @since 9 388 */ 389 /** 390 * Used to obtain the abilityInfo only for system app. 391 * 392 * @syscap SystemCapability.BundleManager.BundleFramework.Core 393 * @systemapi 394 * @since 11 395 */ 396 GET_ABILITY_INFO_ONLY_SYSTEM_APP = 0x00000010, 397 /** 398 * Used to obtain the abilityInfo with domain verification. 399 * 400 * @syscap SystemCapability.BundleManager.BundleFramework.Core 401 * @systemapi 402 * @since 12 403 */ 404 GET_ABILITY_INFO_WITH_APP_LINKING = 0x00000040, 405 /** 406 * Used to obtain the abilityInfo with Skill 407 * 408 * @syscap SystemCapability.BundleManager.BundleFramework.Core 409 * @systemapi 410 * @since 12 411 */ 412 GET_ABILITY_INFO_WITH_SKILL = 0x00000080, 413 } 414 415 /** 416 * Used to query the enumeration value of ExtensionAbilityInfo. Multiple values can be passed in the form. 417 * 418 * @enum { number } 419 * @syscap SystemCapability.BundleManager.BundleFramework.Core 420 * @systemapi 421 * @since 9 422 */ 423 enum ExtensionAbilityFlag { 424 /** 425 * Used to obtain the default extensionAbilityInfo. The obtained extensionAbilityInfo does not contain the information of 426 * permission, metadata and disabled abilityInfo. 427 * 428 * @syscap SystemCapability.BundleManager.BundleFramework.Core 429 * @systemapi 430 * @since 9 431 */ 432 GET_EXTENSION_ABILITY_INFO_DEFAULT = 0x00000000, 433 /** 434 * Used to obtain the extensionAbilityInfo containing permission. 435 * 436 * @syscap SystemCapability.BundleManager.BundleFramework.Core 437 * @systemapi 438 * @since 9 439 */ 440 GET_EXTENSION_ABILITY_INFO_WITH_PERMISSION = 0x00000001, 441 /** 442 * Used to obtain the extensionAbilityInfo containing applicationInfo. 443 * 444 * @syscap SystemCapability.BundleManager.BundleFramework.Core 445 * @systemapi 446 * @since 9 447 */ 448 GET_EXTENSION_ABILITY_INFO_WITH_APPLICATION = 0x00000002, 449 /** 450 * Used to obtain the extensionAbilityInfo containing metadata. 451 * 452 * @syscap SystemCapability.BundleManager.BundleFramework.Core 453 * @systemapi 454 * @since 9 455 */ 456 GET_EXTENSION_ABILITY_INFO_WITH_METADATA = 0x00000004, 457 /** 458 * Used to obtain the extensionAbilityInfo with Skill 459 * 460 * @syscap SystemCapability.BundleManager.BundleFramework.Core 461 * @systemapi 462 * @since 12 463 */ 464 GET_EXTENSION_ABILITY_INFO_WITH_SKILL = 0x00000010, 465 } 466 467 /** 468 * This enumeration value is used to identify various types of extension ability 469 * 470 * @enum { number } 471 * @syscap SystemCapability.BundleManager.BundleFramework.Core 472 * @since 9 473 */ 474 /** 475 * This enumeration value is used to identify various types of extension ability 476 * 477 * @enum { number } 478 * @syscap SystemCapability.BundleManager.BundleFramework.Core 479 * @atomicservice 480 * @since 11 481 */ 482 export enum ExtensionAbilityType { 483 /** 484 * Indicates extension info with type of form 485 * 486 * @syscap SystemCapability.BundleManager.BundleFramework.Core 487 * @since 9 488 */ 489 /** 490 * Indicates extension info with type of form 491 * 492 * @syscap SystemCapability.BundleManager.BundleFramework.Core 493 * @atomicservice 494 * @since 11 495 */ 496 FORM = 0, 497 498 /** 499 * Indicates extension info with type of work schedule 500 * 501 * @syscap SystemCapability.BundleManager.BundleFramework.Core 502 * @since 9 503 */ 504 WORK_SCHEDULER = 1, 505 506 /** 507 * Indicates extension info with type of input method 508 * 509 * @syscap SystemCapability.BundleManager.BundleFramework.Core 510 * @since 9 511 */ 512 INPUT_METHOD = 2, 513 514 /** 515 * Indicates extension info with type of service 516 * 517 * @syscap SystemCapability.BundleManager.BundleFramework.Core 518 * @since 9 519 */ 520 SERVICE = 3, 521 522 /** 523 * Indicates extension info with type of accessibility 524 * 525 * @syscap SystemCapability.BundleManager.BundleFramework.Core 526 * @since 9 527 */ 528 ACCESSIBILITY = 4, 529 530 /** 531 * Indicates extension info with type of dataShare 532 * 533 * @syscap SystemCapability.BundleManager.BundleFramework.Core 534 * @since 9 535 */ 536 DATA_SHARE = 5, 537 538 /** 539 * Indicates extension info with type of filesShare 540 * 541 * @syscap SystemCapability.BundleManager.BundleFramework.Core 542 * @since 9 543 */ 544 FILE_SHARE = 6, 545 546 /** 547 * Indicates extension info with type of staticSubscriber 548 * 549 * @syscap SystemCapability.BundleManager.BundleFramework.Core 550 * @since 9 551 */ 552 STATIC_SUBSCRIBER = 7, 553 554 /** 555 * Indicates extension info with type of wallpaper 556 * 557 * @syscap SystemCapability.BundleManager.BundleFramework.Core 558 * @since 9 559 */ 560 WALLPAPER = 8, 561 562 /** 563 * Indicates extension info with type of backup 564 * 565 * @syscap SystemCapability.BundleManager.BundleFramework.Core 566 * @since 9 567 */ 568 BACKUP = 9, 569 570 /** 571 * Indicates extension info with type of window 572 * 573 * @syscap SystemCapability.BundleManager.BundleFramework.Core 574 * @since 9 575 */ 576 WINDOW = 10, 577 578 /** 579 * Indicates extension info with type of enterprise admin 580 * 581 * @syscap SystemCapability.BundleManager.BundleFramework.Core 582 * @since 9 583 */ 584 ENTERPRISE_ADMIN = 11, 585 586 /** 587 * Indicates extension info with type of thumbnail 588 * 589 * @syscap SystemCapability.BundleManager.BundleFramework.Core 590 * @since 9 591 */ 592 THUMBNAIL = 13, 593 594 /** 595 * Indicates extension info with type of preview 596 * 597 * @syscap SystemCapability.BundleManager.BundleFramework.Core 598 * @since 9 599 */ 600 PREVIEW = 14, 601 602 /** 603 * Indicates extension info with type of print 604 * 605 * @syscap SystemCapability.BundleManager.BundleFramework.Core 606 * @since 10 607 */ 608 PRINT = 15, 609 610 /** 611 * Indicates extension info with type of share 612 * 613 * @syscap SystemCapability.BundleManager.BundleFramework.Core 614 * @since 10 615 */ 616 SHARE = 16, 617 618 /** 619 * Indicates extension info with type of push 620 * 621 * @syscap SystemCapability.BundleManager.BundleFramework.Core 622 * @since 10 623 */ 624 PUSH = 17, 625 626 /** 627 * Indicates extension info with type of driver 628 * 629 * @syscap SystemCapability.BundleManager.BundleFramework.Core 630 * @since 10 631 */ 632 DRIVER = 18, 633 634 /** 635 * Indicates extension info with type of action 636 * 637 * @syscap SystemCapability.BundleManager.BundleFramework.Core 638 * @since 10 639 */ 640 ACTION = 19, 641 642 /** 643 * Indicates extension info with type of ads service 644 * 645 * @syscap SystemCapability.BundleManager.BundleFramework.Core 646 * @since 11 647 */ 648 ADS_SERVICE = 20, 649 650 /** 651 * Indicates extension info with type of embedded UI 652 * 653 * @syscap SystemCapability.BundleManager.BundleFramework.Core 654 * @since 12 655 */ 656 EMBEDDED_UI = 21, 657 658 /** 659 * Indicates extension info with type of insight intent UI 660 * 661 * @syscap SystemCapability.BundleManager.BundleFramework.Core 662 * @since 12 663 */ 664 INSIGHT_INTENT_UI = 22, 665 666 /** 667 * Indicates extension info with type of unspecified 668 * 669 * @syscap SystemCapability.BundleManager.BundleFramework.Core 670 * @since 9 671 */ 672 UNSPECIFIED = 255 673 } 674 675 /** 676 * PermissionGrantState 677 * 678 * @enum { number } 679 * @syscap SystemCapability.BundleManager.BundleFramework.Core 680 * @since 9 681 */ 682 /** 683 * PermissionGrantState 684 * 685 * @enum { number } 686 * @syscap SystemCapability.BundleManager.BundleFramework.Core 687 * @atomicservice 688 * @since 11 689 */ 690 export enum PermissionGrantState { 691 /** 692 * PERMISSION_DENIED 693 * 694 * @syscap SystemCapability.BundleManager.BundleFramework.Core 695 * @since 9 696 */ 697 /** 698 * PERMISSION_DENIED 699 * 700 * @syscap SystemCapability.BundleManager.BundleFramework.Core 701 * @atomicservice 702 * @since 11 703 */ 704 PERMISSION_DENIED = -1, 705 706 /** 707 * PERMISSION_GRANTED 708 * 709 * @syscap SystemCapability.BundleManager.BundleFramework.Core 710 * @since 9 711 */ 712 /** 713 * PERMISSION_GRANTED 714 * 715 * @syscap SystemCapability.BundleManager.BundleFramework.Core 716 * @atomicservice 717 * @since 11 718 */ 719 PERMISSION_GRANTED = 0 720 } 721 722 /** 723 * Support window mode 724 * 725 * @enum { number } 726 * @syscap SystemCapability.BundleManager.BundleFramework.Core 727 * @since 9 728 */ 729 /** 730 * Support window mode 731 * 732 * @enum { number } 733 * @syscap SystemCapability.BundleManager.BundleFramework.Core 734 * @atomicservice 735 * @since 11 736 */ 737 export enum SupportWindowMode { 738 /** 739 * Indicates supported window mode of full screen mode 740 * 741 * @syscap SystemCapability.BundleManager.BundleFramework.Core 742 * @since 9 743 */ 744 /** 745 * Indicates supported window mode of full screen mode 746 * 747 * @syscap SystemCapability.BundleManager.BundleFramework.Core 748 * @atomicservice 749 * @since 11 750 */ 751 FULL_SCREEN = 0, 752 /** 753 * Indicates supported window mode of split mode 754 * 755 * @syscap SystemCapability.BundleManager.BundleFramework.Core 756 * @since 9 757 */ 758 /** 759 * Indicates supported window mode of split mode 760 * 761 * @syscap SystemCapability.BundleManager.BundleFramework.Core 762 * @atomicservice 763 * @since 11 764 */ 765 SPLIT = 1, 766 /** 767 * Indicates supported window mode of floating mode 768 * 769 * @syscap SystemCapability.BundleManager.BundleFramework.Core 770 * @since 9 771 */ 772 /** 773 * Indicates supported window mode of floating mode 774 * 775 * @syscap SystemCapability.BundleManager.BundleFramework.Core 776 * @atomicservice 777 * @since 11 778 */ 779 FLOATING = 2 780 } 781 782 /** 783 * Launch type 784 * 785 * @enum { number } 786 * @syscap SystemCapability.BundleManager.BundleFramework.Core 787 * @since 9 788 */ 789 /** 790 * Launch type 791 * 792 * @enum { number } 793 * @syscap SystemCapability.BundleManager.BundleFramework.Core 794 * @crossplatform 795 * @since 10 796 */ 797 /** 798 * Launch type 799 * 800 * @enum { number } 801 * @syscap SystemCapability.BundleManager.BundleFramework.Core 802 * @crossplatform 803 * @atomicservice 804 * @since 11 805 */ 806 export enum LaunchType { 807 /** 808 * Indicates that the ability has only one instance 809 * 810 * @syscap SystemCapability.BundleManager.BundleFramework.Core 811 * @since 9 812 */ 813 /** 814 * Indicates that the ability has only one instance 815 * 816 * @syscap SystemCapability.BundleManager.BundleFramework.Core 817 * @crossplatform 818 * @since 10 819 */ 820 /** 821 * Indicates that the ability has only one instance 822 * 823 * @syscap SystemCapability.BundleManager.BundleFramework.Core 824 * @crossplatform 825 * @atomicservice 826 * @since 11 827 */ 828 SINGLETON = 0, 829 830 /** 831 * Indicates that the ability can have multiple instances 832 * 833 * @syscap SystemCapability.BundleManager.BundleFramework.Core 834 * @since 9 835 */ 836 /** 837 * Indicates that the ability can have multiple instances 838 * 839 * @syscap SystemCapability.BundleManager.BundleFramework.Core 840 * @crossplatform 841 * @since 10 842 */ 843 /** 844 * Indicates that the ability can have multiple instances 845 * 846 * @syscap SystemCapability.BundleManager.BundleFramework.Core 847 * @crossplatform 848 * @atomicservice 849 * @since 11 850 */ 851 MULTITON = 1, 852 853 /** 854 * Indicates that the ability can have specified instances 855 * 856 * @syscap SystemCapability.BundleManager.BundleFramework.Core 857 * @since 9 858 */ 859 /** 860 * Indicates that the ability can have specified instances 861 * 862 * @syscap SystemCapability.BundleManager.BundleFramework.Core 863 * @atomicservice 864 * @since 11 865 */ 866 SPECIFIED = 2 867 } 868 869 /** 870 * Indicates ability type 871 * 872 * @enum { number } 873 * @syscap SystemCapability.BundleManager.BundleFramework.Core 874 * @FAModelOnly 875 * @since 9 876 */ 877 export enum AbilityType { 878 /** 879 * Indicates that the ability has a UI 880 * 881 * @syscap SystemCapability.BundleManager.BundleFramework.Core 882 * @FAModelOnly 883 * @since 9 884 */ 885 PAGE = 1, 886 887 /** 888 * Indicates that the ability does not have a UI 889 * 890 * @syscap SystemCapability.BundleManager.BundleFramework.Core 891 * @FAModelOnly 892 * @since 9 893 */ 894 SERVICE = 2, 895 896 /** 897 * Indicates that the ability is used to provide data access services 898 * 899 * @syscap SystemCapability.BundleManager.BundleFramework.Core 900 * @FAModelOnly 901 * @since 9 902 */ 903 DATA = 3 904 } 905 906 /** 907 * Display orientation 908 * 909 * @enum { number } 910 * @syscap SystemCapability.BundleManager.BundleFramework.Core 911 * @since 9 912 */ 913 /** 914 * Display orientation 915 * 916 * @enum { number } 917 * @syscap SystemCapability.BundleManager.BundleFramework.Core 918 * @atomicservice 919 * @since 11 920 */ 921 export enum DisplayOrientation { 922 /** 923 * Indicates that the system automatically determines the display orientation 924 * 925 * @syscap SystemCapability.BundleManager.BundleFramework.Core 926 * @since 9 927 */ 928 /** 929 * Indicates that the system automatically determines the display orientation 930 * 931 * @syscap SystemCapability.BundleManager.BundleFramework.Core 932 * @atomicservice 933 * @since 11 934 */ 935 UNSPECIFIED, 936 937 /** 938 * Indicates the landscape orientation 939 * 940 * @syscap SystemCapability.BundleManager.BundleFramework.Core 941 * @since 9 942 */ 943 /** 944 * Indicates the landscape orientation 945 * 946 * @syscap SystemCapability.BundleManager.BundleFramework.Core 947 * @atomicservice 948 * @since 11 949 */ 950 LANDSCAPE, 951 952 /** 953 * Indicates the portrait orientation 954 * 955 * @syscap SystemCapability.BundleManager.BundleFramework.Core 956 * @since 9 957 */ 958 /** 959 * Indicates the portrait orientation 960 * 961 * @syscap SystemCapability.BundleManager.BundleFramework.Core 962 * @atomicservice 963 * @since 11 964 */ 965 PORTRAIT, 966 967 /** 968 * Indicates the page ability orientation is the same as that of the nearest ability in the stack 969 * 970 * @syscap SystemCapability.BundleManager.BundleFramework.Core 971 * @since 9 972 */ 973 /** 974 * Indicates the page ability orientation is the same as that of the nearest ability in the stack 975 * 976 * @syscap SystemCapability.BundleManager.BundleFramework.Core 977 * @atomicservice 978 * @since 11 979 */ 980 FOLLOW_RECENT, 981 982 /** 983 * Indicates the inverted landscape orientation 984 * 985 * @syscap SystemCapability.BundleManager.BundleFramework.Core 986 * @since 9 987 */ 988 /** 989 * Indicates the inverted landscape orientation 990 * 991 * @syscap SystemCapability.BundleManager.BundleFramework.Core 992 * @atomicservice 993 * @since 11 994 */ 995 LANDSCAPE_INVERTED, 996 997 /** 998 * Indicates the inverted portrait orientation 999 * 1000 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1001 * @since 9 1002 */ 1003 /** 1004 * Indicates the inverted portrait orientation 1005 * 1006 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1007 * @atomicservice 1008 * @since 11 1009 */ 1010 PORTRAIT_INVERTED, 1011 1012 /** 1013 * Indicates the orientation can be auto-rotated 1014 * 1015 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1016 * @since 9 1017 */ 1018 /** 1019 * Indicates the orientation can be auto-rotated 1020 * 1021 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1022 * @atomicservice 1023 * @since 11 1024 */ 1025 AUTO_ROTATION, 1026 1027 /** 1028 * Indicates the landscape orientation rotated with sensor 1029 * 1030 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1031 * @since 9 1032 */ 1033 /** 1034 * Indicates the landscape orientation rotated with sensor 1035 * 1036 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1037 * @atomicservice 1038 * @since 11 1039 */ 1040 AUTO_ROTATION_LANDSCAPE, 1041 1042 /** 1043 * Indicates the portrait orientation rotated with sensor 1044 * 1045 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1046 * @since 9 1047 */ 1048 /** 1049 * Indicates the portrait orientation rotated with sensor 1050 * 1051 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1052 * @atomicservice 1053 * @since 11 1054 */ 1055 AUTO_ROTATION_PORTRAIT, 1056 1057 /** 1058 * Indicates the sensor restricted mode 1059 * 1060 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1061 * @since 9 1062 */ 1063 /** 1064 * Indicates the sensor restricted mode 1065 * 1066 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1067 * @atomicservice 1068 * @since 11 1069 */ 1070 AUTO_ROTATION_RESTRICTED, 1071 1072 /** 1073 * Indicates the sensor landscape restricted mode 1074 * 1075 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1076 * @since 9 1077 */ 1078 /** 1079 * Indicates the sensor landscape restricted mode 1080 * 1081 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1082 * @atomicservice 1083 * @since 11 1084 */ 1085 AUTO_ROTATION_LANDSCAPE_RESTRICTED, 1086 1087 /** 1088 * Indicates the sensor portrait restricted mode 1089 * 1090 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1091 * @since 9 1092 */ 1093 /** 1094 * Indicates the sensor portrait restricted mode 1095 * 1096 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1097 * @atomicservice 1098 * @since 11 1099 */ 1100 AUTO_ROTATION_PORTRAIT_RESTRICTED, 1101 1102 /** 1103 * Indicates the locked orientation mode 1104 * 1105 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1106 * @since 9 1107 */ 1108 /** 1109 * Indicates the locked orientation mode 1110 * 1111 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1112 * @atomicservice 1113 * @since 11 1114 */ 1115 LOCKED, 1116 1117 /** 1118 * Indicates the system automatically determines the sensor restricted mode 1119 * 1120 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1121 * @atomicservice 1122 * @since 12 1123 */ 1124 AUTO_ROTATION_UNSPECIFIED, 1125 1126 /** 1127 * Indicates the orientation follow the desktop rotate mode 1128 * 1129 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1130 * @atomicservice 1131 * @since 12 1132 */ 1133 FOLLOW_DESKTOP 1134 } 1135 1136 /** 1137 * Indicates module type 1138 * 1139 * @enum { number } 1140 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1141 * @since 9 1142 */ 1143 /** 1144 * Indicates module type 1145 * 1146 * @enum { number } 1147 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1148 * @atomicservice 1149 * @since 11 1150 */ 1151 export enum ModuleType { 1152 /** 1153 * Indicates entry type 1154 * 1155 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1156 * @since 9 1157 */ 1158 /** 1159 * Indicates entry type 1160 * 1161 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1162 * @atomicservice 1163 * @since 11 1164 */ 1165 ENTRY = 1, 1166 /** 1167 * Indicates feature type 1168 * 1169 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1170 * @since 9 1171 */ 1172 /** 1173 * Indicates feature type 1174 * 1175 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1176 * @atomicservice 1177 * @since 11 1178 */ 1179 FEATURE = 2, 1180 /** 1181 * Indicates shared type 1182 * 1183 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1184 * @since 9 1185 */ 1186 /** 1187 * Indicates shared type 1188 * 1189 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1190 * @atomicservice 1191 * @since 11 1192 */ 1193 SHARED = 3 1194 } 1195 1196 /** 1197 * Indicates bundle type 1198 * 1199 * @enum { number } 1200 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1201 * @since 9 1202 */ 1203 /** 1204 * Indicates bundle type 1205 * 1206 * @enum { number } 1207 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1208 * @atomicservice 1209 * @since 11 1210 */ 1211 export enum BundleType { 1212 /** 1213 * Indicates app 1214 * 1215 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1216 * @since 9 1217 */ 1218 /** 1219 * Indicates app 1220 * 1221 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1222 * @atomicservice 1223 * @since 11 1224 */ 1225 APP = 0, 1226 /** 1227 * Indicates atomic service 1228 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1229 * @since 9 1230 */ 1231 /** 1232 * Indicates atomic service 1233 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1234 * @atomicservice 1235 * @since 11 1236 */ 1237 ATOMIC_SERVICE = 1 1238 } 1239 1240 /** 1241 * Shared bundle compatible policy 1242 * 1243 * @enum { number } 1244 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1245 * @since 10 1246 */ 1247 /** 1248 * Shared bundle compatible policy 1249 * 1250 * @enum { number } 1251 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1252 * @atomicservice 1253 * @since 11 1254 */ 1255 export enum CompatiblePolicy { 1256 /** 1257 * Indicates that the app is a shared bundle and the shared bundle type is backward compatibility 1258 * 1259 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1260 * @since 10 1261 */ 1262 /** 1263 * Indicates that the app is a shared bundle and the shared bundle type is backward compatibility 1264 * 1265 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1266 * @atomicservice 1267 * @since 11 1268 */ 1269 BACKWARD_COMPATIBILITY = 1 1270 } 1271 1272 /** 1273 * This enumeration value is used to identify various types of JSON profile. 1274 * 1275 * @enum { number } 1276 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1277 * @systemapi 1278 * @since 11 1279 */ 1280 export enum ProfileType { 1281 /** 1282 * Indicates JSON profile about intent framework. 1283 * 1284 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1285 * @systemapi 1286 * @since 11 1287 */ 1288 INTENT_PROFILE = 1 1289 } 1290 1291 /** 1292 * This enumeration value is used to identify the distribution type of application. 1293 * 1294 * @enum { number } 1295 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1296 * @systemapi 1297 * @since 12 1298 */ 1299 export enum AppDistributionType { 1300 /** 1301 * Indicates the application is distributed by the App Gallery. 1302 * 1303 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1304 * @systemapi 1305 * @since 12 1306 */ 1307 APP_GALLERY = 1, 1308 1309 /** 1310 * Indicates the enterprise application, which can be installed in personal devices. 1311 * 1312 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1313 * @systemapi 1314 * @since 12 1315 */ 1316 ENTERPRISE = 2, 1317 1318 /** 1319 * Indicates the normal enterprise application. 1320 * This kind of application can only be installed on enterprise devices through the enterprise MDM application and does not require device management privileges. 1321 * 1322 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1323 * @systemapi 1324 * @since 12 1325 */ 1326 ENTERPRISE_NORMAL = 3, 1327 1328 /** 1329 * Indicates the enterprise MDM application, which can only be installed on enterprise devices. 1330 * This kind of application requires device management privileges, such as remote locking, which can install normal enterprise applications, etc. 1331 * 1332 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1333 * @systemapi 1334 * @since 12 1335 */ 1336 ENTERPRISE_MDM = 4, 1337 1338 /** 1339 * Indicates the system preinstalled application. 1340 * 1341 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1342 * @systemapi 1343 * @since 12 1344 */ 1345 OS_INTEGRATION = 5, 1346 1347 /** 1348 * Indicates the crowdtesting application. 1349 * 1350 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1351 * @systemapi 1352 * @since 12 1353 */ 1354 CROWDTESTING = 6, 1355 1356 /** 1357 * Indicates other types of application. 1358 * 1359 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1360 * @systemapi 1361 * @since 12 1362 */ 1363 NONE = 7 1364 } 1365 1366 /** 1367 * This enumeration value is used to identify various types of extension ability 1368 * 1369 * @enum { number } 1370 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1371 * @since 12 1372 */ 1373 export enum MultiAppModeType { 1374 /** 1375 * Indicates multi app mode with type of unspecified 1376 * 1377 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1378 * @since 12 1379 */ 1380 UNSPECIFIED = 0, 1381 /** 1382 * Indicates multi app mode with type of multiInstance 1383 * 1384 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1385 * @since 12 1386 */ 1387 MULTI_INSTANCE = 1, 1388 /** 1389 * Indicates multi app mode with type of appClone 1390 * 1391 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1392 * @since 12 1393 */ 1394 APP_CLONE = 2, 1395 } 1396 1397 /** 1398 * This enumeration value is used to identify various flags of application 1399 * 1400 * @enum { number } 1401 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1402 * @systemapi 1403 * @since 12 1404 */ 1405 export enum ApplicationInfoFlag { 1406 /** 1407 * Indicates The application is currently installed for the calling user. 1408 * 1409 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1410 * @systemapi 1411 * @since 12 1412 */ 1413 FLAG_INSTALLED = 0x00000001, 1414 } 1415 1416 /** 1417 * Obtains own bundleInfo. 1418 * 1419 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1420 * @returns { Promise<BundleInfo> } The result of getting the bundle info. 1421 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1422 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1423 * @since 9 1424 */ 1425 /** 1426 * Obtains own bundleInfo. 1427 * 1428 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1429 * @returns { Promise<BundleInfo> } The result of getting the bundle info. 1430 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1431 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1432 * @atomicservice 1433 * @since 11 1434 */ 1435 function getBundleInfoForSelf(bundleFlags: number): Promise<BundleInfo>; 1436 1437 /** 1438 * Obtains own bundleInfo. 1439 * 1440 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1441 * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result. 1442 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1443 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1444 * @since 9 1445 */ 1446 /** 1447 * Obtains own bundleInfo. 1448 * 1449 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1450 * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result. 1451 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1452 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1453 * @atomicservice 1454 * @since 11 1455 */ 1456 function getBundleInfoForSelf(bundleFlags: number, callback: AsyncCallback<BundleInfo>): void; 1457 1458 /** 1459 * Obtains own bundleInfo. 1460 * 1461 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1462 * @returns { BundleInfo } The result of getting the bundle info. 1463 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1464 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1465 * @since 10 1466 */ 1467 /** 1468 * Obtains own bundleInfo. 1469 * 1470 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1471 * @returns { BundleInfo } The result of getting the bundle info. 1472 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1473 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1474 * @atomicservice 1475 * @since 11 1476 */ 1477 function getBundleInfoForSelfSync(bundleFlags: number): BundleInfo; 1478 1479 /** 1480 * Obtains bundleInfo based on bundleName, bundleFlags. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1481 * 1482 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1483 * @param { string } bundleName - Indicates the application bundle name to be queried. 1484 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1485 * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result. 1486 * @throws { BusinessError } 201 - Permission denied. 1487 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1488 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1489 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1490 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1491 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1492 * @systemapi 1493 * @since 9 1494 */ 1495 function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void; 1496 1497 /** 1498 * Obtains bundleInfo based on bundleName, bundleFlags and userId. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1499 * 1500 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1501 * @param { string } bundleName - Indicates the application bundle name to be queried. 1502 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1503 * @param { number } userId - Indicates the user ID or do not pass user ID. 1504 * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle info result. 1505 * @throws { BusinessError } 201 - Permission denied. 1506 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1507 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1508 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1509 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1510 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1511 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1512 * @systemapi 1513 * @since 9 1514 */ 1515 function getBundleInfo(bundleName: string, 1516 bundleFlags: number, userId: number, callback: AsyncCallback<BundleInfo>): void; 1517 1518 /** 1519 * Obtains bundleInfo based on bundleName, bundleFlags and userId. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1520 * 1521 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1522 * @param { string } bundleName - Indicates the application bundle name to be queried. 1523 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 1524 * @param { number } userId - Indicates the user ID or do not pass user ID. 1525 * @returns { Promise<BundleInfo> } The result of getting the bundle info. 1526 * @throws { BusinessError } 201 - Permission denied. 1527 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1528 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1529 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1530 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1531 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1532 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1533 * @systemapi 1534 * @since 9 1535 */ 1536 function getBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise<BundleInfo>; 1537 1538 /** 1539 * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1540 * 1541 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1542 * @param { string } bundleName - Indicates the application bundle name to be queried. 1543 * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. 1544 * @param { AsyncCallback<ApplicationInfo> } callback - The callback of getting application info result. 1545 * @throws { BusinessError } 201 - Permission denied. 1546 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1547 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1548 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1549 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1550 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1551 * @systemapi 1552 * @since 9 1553 */ 1554 function getApplicationInfo(bundleName: string, appFlags: number, callback: AsyncCallback<ApplicationInfo>): void; 1555 1556 /** 1557 * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1558 * 1559 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1560 * @param { string } bundleName - Indicates the application bundle name to be queried. 1561 * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. 1562 * @param { number } userId - Indicates the user ID or do not pass user ID. 1563 * @param { AsyncCallback<ApplicationInfo> } callback - The callback of getting application info result. 1564 * @throws { BusinessError } 201 - Permission denied. 1565 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1566 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1567 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1568 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1569 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1570 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1571 * @systemapi 1572 * @since 9 1573 */ 1574 function getApplicationInfo(bundleName: string, 1575 appFlags: number, userId: number, callback: AsyncCallback<ApplicationInfo>): void; 1576 1577 /** 1578 * Obtains application info based on a given bundle name. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1579 * 1580 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1581 * @param { string } bundleName - Indicates the application bundle name to be queried. 1582 * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. 1583 * @param { number } userId - Indicates the user ID or do not pass user ID. 1584 * @returns { Promise<ApplicationInfo> } The result of getting the application info. 1585 * @throws { BusinessError } 201 - Permission denied. 1586 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1587 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1588 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1589 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1590 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1591 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1592 * @systemapi 1593 * @since 9 1594 */ 1595 function getApplicationInfo(bundleName: string, appFlags: number, userId?: number): Promise<ApplicationInfo>; 1596 1597 /** 1598 * Obtains BundleInfo of all bundles available in the system. 1599 * 1600 * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST 1601 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned. 1602 * @param { AsyncCallback<Array<BundleInfo>> } callback - The callback of getting a list of BundleInfo objects. 1603 * @throws { BusinessError } 201 - Permission denied. 1604 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1605 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1606 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1607 * @systemapi 1608 * @since 9 1609 */ 1610 function getAllBundleInfo(bundleFlags: number, callback: AsyncCallback<Array<BundleInfo>>): void; 1611 1612 /** 1613 * Obtains BundleInfo of all bundles available in the system. 1614 * 1615 * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST 1616 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned. 1617 * @param { number } userId - Indicates the user id. 1618 * @param { AsyncCallback<Array<BundleInfo>> } callback - The callback of getting a list of BundleInfo objects. 1619 * @throws { BusinessError } 201 - Permission denied. 1620 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1621 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1622 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1623 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1624 * @systemapi 1625 * @since 9 1626 */ 1627 function getAllBundleInfo(bundleFlags: number, userId: number, callback: AsyncCallback<Array<BundleInfo>>): void; 1628 1629 /** 1630 * Obtains BundleInfo of all bundles available in the system. 1631 * 1632 * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST 1633 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo that will be returned. 1634 * @param { number } userId - Indicates the user id. 1635 * @returns { Promise<Array<BundleInfo>> } Returns a list of BundleInfo objects. 1636 * @throws { BusinessError } 201 - Permission denied. 1637 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1638 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1639 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1640 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1641 * @systemapi 1642 * @since 9 1643 */ 1644 function getAllBundleInfo(bundleFlags: number, userId?: number): Promise<Array<BundleInfo>>; 1645 1646 /** 1647 * Obtains information about all installed applications of a specified user. 1648 * 1649 * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST 1650 * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. 1651 * @param { AsyncCallback<Array<ApplicationInfo>> } callback - The callback of getting a list of ApplicationInfo objects. 1652 * @throws { BusinessError } 201 - Permission denied. 1653 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1654 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1655 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1656 * @systemapi 1657 * @since 9 1658 */ 1659 function getAllApplicationInfo(appFlags: number, callback: AsyncCallback<Array<ApplicationInfo>>): void; 1660 1661 /** 1662 * Obtains information about all installed applications of a specified user. 1663 * 1664 * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST 1665 * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. 1666 * @param { number } userId - Indicates the user ID or do not pass user ID. 1667 * @param { AsyncCallback<Array<ApplicationInfo>> } callback - The callback of getting a list of ApplicationInfo objects. 1668 * @throws { BusinessError } 201 - Permission denied. 1669 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1670 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1671 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1672 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1673 * @systemapi 1674 * @since 9 1675 */ 1676 function getAllApplicationInfo(appFlags: number, 1677 userId: number, callback: AsyncCallback<Array<ApplicationInfo>>): void; 1678 1679 /** 1680 * Obtains information about all installed applications of a specified user. 1681 * 1682 * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST 1683 * @param { number } appFlags - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. 1684 * @param { number } userId - Indicates the user ID or do not pass user ID. 1685 * @returns { Promise<Array<ApplicationInfo>> } Returns a list of ApplicationInfo objects. 1686 * @throws { BusinessError } 201 - Permission denied. 1687 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1688 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1689 * @throws { BusinessError } 17700004 - The specified user ID is not found. 1690 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1691 * @systemapi 1692 * @since 9 1693 */ 1694 function getAllApplicationInfo(appFlags: number, userId?: number): Promise<Array<ApplicationInfo>>; 1695 1696 /** 1697 * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1698 * 1699 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1700 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1701 * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. 1702 * @param { AsyncCallback<Array<AbilityInfo>> } callback - The callback of querying ability info result. 1703 * @throws { BusinessError } 201 - Permission denied. 1704 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1705 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1706 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1707 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1708 * @throws { BusinessError } 17700003 - The specified ability is not found. 1709 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1710 * @throws { BusinessError } 17700029 - The specified ability is disabled. 1711 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1712 * @systemapi 1713 * @since 9 1714 */ 1715 function queryAbilityInfo(want: Want, abilityFlags: number, callback: AsyncCallback<Array<AbilityInfo>>): void; 1716 1717 /** 1718 * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1719 * 1720 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1721 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1722 * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. 1723 * @param { number } userId - userId Indicates the user ID. 1724 * @param { AsyncCallback<Array<AbilityInfo>> } callback - The callback of querying ability info result. 1725 * @throws { BusinessError } 201 - Permission denied. 1726 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1727 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1728 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1729 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1730 * @throws { BusinessError } 17700003 - The specified ability is not found. 1731 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1732 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1733 * @throws { BusinessError } 17700029 - The specified ability is disabled. 1734 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1735 * @systemapi 1736 * @since 9 1737 */ 1738 function queryAbilityInfo(want: Want, 1739 abilityFlags: number, userId: number, callback: AsyncCallback<Array<AbilityInfo>>): void; 1740 1741 /** 1742 * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1743 * 1744 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1745 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1746 * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. 1747 * @param { number } userId - userId Indicates the user ID. 1748 * @returns { Promise<Array<AbilityInfo>> } Returns a list of AbilityInfo objects. 1749 * @throws { BusinessError } 201 - Permission denied. 1750 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1751 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1752 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1753 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1754 * @throws { BusinessError } 17700003 - The specified ability is not found. 1755 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1756 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1757 * @throws { BusinessError } 17700029 - The specified ability is disabled. 1758 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1759 * @systemapi 1760 * @since 9 1761 */ 1762 function queryAbilityInfo(want: Want, abilityFlags: number, userId?: number): Promise<Array<AbilityInfo>>; 1763 1764 /** 1765 * Query the AbilityInfo by the given Want Array. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1766 * 1767 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1768 * @param { Array<Want> } wants - Indicates the Want Array containing the application bundle name to be queried. 1769 * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. 1770 * @param { number } [userId] - userId Indicates the user ID. 1771 * @returns { Promise<Array<AbilityInfo>> } Returns a list of AbilityInfo objects. 1772 * @throws { BusinessError } 201 - Permission denied. 1773 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1774 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1775 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1776 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1777 * @throws { BusinessError } 17700003 - The specified ability is not found. 1778 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1779 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1780 * @throws { BusinessError } 17700029 - The specified ability is disabled. 1781 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1782 * @systemapi 1783 * @since 12 1784 */ 1785 function queryAbilityInfo(wants: Array<Want>, abilityFlags: number, userId?: number): Promise<Array<AbilityInfo>>; 1786 1787 /** 1788 * Query the AbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1789 * 1790 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1791 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1792 * @param { number } abilityFlags - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. 1793 * @param { number } userId - userId Indicates the user ID. 1794 * @returns { Array<AbilityInfo> } Returns a list of AbilityInfo objects. 1795 * @throws { BusinessError } 201 - Permission denied. 1796 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1797 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1798 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1799 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1800 * @throws { BusinessError } 17700003 - The specified ability is not found. 1801 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1802 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1803 * @throws { BusinessError } 17700029 - The specified ability is disabled. 1804 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1805 * @systemapi 1806 * @since 10 1807 */ 1808 function queryAbilityInfoSync(want: Want, abilityFlags: number, userId?: number): Array<AbilityInfo>; 1809 1810 /** 1811 * Query extension info of by utilizing a Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1812 * 1813 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1814 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1815 * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. 1816 * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the 1817 * ExtensionAbilityInfo objects that will be returned. 1818 * @param { AsyncCallback<Array<ExtensionAbilityInfo>> } callback - The callback of querying extension ability info result. 1819 * @throws { BusinessError } 201 - Permission denied. 1820 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1821 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1822 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1823 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1824 * @throws { BusinessError } 17700003 - The specified extensionAbility is not found. 1825 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1826 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1827 * @systemapi 1828 * @since 9 1829 */ 1830 function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, 1831 extensionAbilityFlags: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void; 1832 1833 /** 1834 * Query extension info of by utilizing a Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1835 * 1836 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1837 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1838 * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. 1839 * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the 1840 * ExtensionAbilityInfo objects that will be returned. 1841 * @param { number } userId - Indicates the user ID. 1842 * @param { AsyncCallback<Array<ExtensionAbilityInfo>> } callback - The callback of querying extension ability info result. 1843 * @throws { BusinessError } 201 - Permission denied. 1844 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1845 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1846 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1847 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1848 * @throws { BusinessError } 17700003 - The specified extensionAbility is not found. 1849 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1850 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1851 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1852 * @systemapi 1853 * @since 9 1854 */ 1855 function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, 1856 extensionAbilityFlags: number, userId: number, callback: AsyncCallback<Array<ExtensionAbilityInfo>>): void; 1857 1858 /** 1859 * Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1860 * 1861 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1862 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1863 * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. 1864 * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the 1865 * ExtensionAbilityInfo objects that will be returned. 1866 * @param { number } userId - Indicates the user ID. 1867 * @returns { Promise<Array<ExtensionAbilityInfo>> } Returns a list of ExtensionAbilityInfo objects. 1868 * @throws { BusinessError } 201 - Permission denied. 1869 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1870 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1871 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1872 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1873 * @throws { BusinessError } 17700003 - The specified extensionAbility is not found. 1874 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1875 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1876 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1877 * @systemapi 1878 * @since 9 1879 */ 1880 function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, 1881 extensionAbilityFlags: number, userId?: number): Promise<Array<ExtensionAbilityInfo>>; 1882 1883 /** 1884 * Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1885 * 1886 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1887 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1888 * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. 1889 * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the 1890 * ExtensionAbilityInfo objects that will be returned. 1891 * @param { number } userId - Indicates the user ID. 1892 * @returns { Array<ExtensionAbilityInfo> } Returns a list of ExtensionAbilityInfo objects. 1893 * @throws { BusinessError } 201 - Permission denied. 1894 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1895 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1896 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1897 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1898 * @throws { BusinessError } 17700003 - The specified extensionAbility is not found. 1899 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1900 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1901 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1902 * @systemapi 1903 * @since 10 1904 */ 1905 function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: ExtensionAbilityType, 1906 extensionAbilityFlags: number, userId?: number): Array<ExtensionAbilityInfo>; 1907 1908 /** 1909 * Query the ExtensionAbilityInfo by the given Want. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1910 * 1911 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1912 * @param { Want } want - Indicates the Want containing the application bundle name to be queried. 1913 * @param { string } extensionAbilityType - Indicates extensionAbilityType. 1914 * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the 1915 * ExtensionAbilityInfo objects that will be returned. 1916 * @param { number } userId - Indicates the user ID. 1917 * @returns { Array<ExtensionAbilityInfo> } Returns a list of ExtensionAbilityInfo objects. 1918 * @throws { BusinessError } 201 - Permission denied. 1919 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1920 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1921 * 2. Incorrect parameter types; 3. At least one parameter(action, entity, uri or type) is required for implicit query. 1922 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 1923 * @throws { BusinessError } 17700003 - The specified extensionAbility is not found. 1924 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1925 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 1926 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1927 * @systemapi 1928 * @since 11 1929 */ 1930 function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: string, 1931 extensionAbilityFlags: number, userId?: number): Array<ExtensionAbilityInfo>; 1932 1933 /** 1934 * Query the ExtensionAbilityInfo by extension ability type. ohos.permission.GET_BUNDLE_INFO_PRIVILEGED is required for cross user access. 1935 * 1936 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1937 * @param { string } extensionAbilityType - Indicates ExtensionAbilityType. 1938 * @param { number } extensionAbilityFlags - Indicates the flag used to specify information contained in the 1939 * ExtensionAbilityInfo objects that will be returned. 1940 * @param { number } userId - Indicates the user ID. 1941 * @returns { Array<ExtensionAbilityInfo> } Returns a list of ExtensionAbilityInfo objects. 1942 * @throws { BusinessError } 201 - Permission denied. 1943 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1944 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 1945 * 2. Incorrect parameter types; 3. Parameter extensionAbilityType is empty. 1946 * @throws { BusinessError } 17700003 - The specified extensionAbility is not found. 1947 * @throws { BusinessError } 17700004 - The specified userId is invalid. 1948 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1949 * @systemapi 1950 * @since 11 1951 */ 1952 function queryExtensionAbilityInfoSync(extensionAbilityType: string, extensionAbilityFlags: number, 1953 userId?: number): Array<ExtensionAbilityInfo>; 1954 1955 /** 1956 * Obtains bundle name by the given uid. 1957 * 1958 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1959 * @param { number } uid - Indicates the UID of an application. 1960 * @param { AsyncCallback<string> } callback - The callback of getting bundle name. 1961 * @throws { BusinessError } 201 - Permission denied. 1962 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1963 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1964 * @throws { BusinessError } 17700021 - The uid is not found. 1965 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1966 * @systemapi 1967 * @since 9 1968 */ 1969 function getBundleNameByUid(uid: number, callback: AsyncCallback<string>): void; 1970 1971 /** 1972 * Obtains bundle name by the given uid. 1973 * 1974 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1975 * @param { number } uid - Indicates the UID of an application. 1976 * @returns { Promise<string> } Returns the bundle name. 1977 * @throws { BusinessError } 201 - Permission denied. 1978 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1979 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1980 * @throws { BusinessError } 17700021 - The uid is not found. 1981 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1982 * @systemapi 1983 * @since 9 1984 */ 1985 function getBundleNameByUid(uid: number): Promise<string>; 1986 1987 /** 1988 * Obtains bundle name by the given uid. 1989 * 1990 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 1991 * @param { number } uid - Indicates the UID of an application. 1992 * @returns { string } Returns the bundle name. 1993 * @throws { BusinessError } 201 - Permission denied. 1994 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 1995 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 1996 * @throws { BusinessError } 17700021 - The uid is not found. 1997 * @syscap SystemCapability.BundleManager.BundleFramework.Core 1998 * @systemapi 1999 * @since 10 2000 */ 2001 function getBundleNameByUidSync(uid: number): string; 2002 2003 /** 2004 * Obtains information about an application bundle contained in an ohos Ability Package (HAP). 2005 * 2006 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2007 * @param { string } hapFilePath - Indicates the path storing the HAP. 2008 * The path should be the relative path to the data directory of the current application. 2009 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned. 2010 * @param { AsyncCallback<BundleInfo> } callback - The callback of getting bundle archive info result. 2011 * @throws { BusinessError } 201 - Permission denied. 2012 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2013 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2014 * @throws { BusinessError } 17700022 - The hapFilePath is invalid. 2015 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2016 * @systemapi 2017 * @since 9 2018 */ 2019 function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback<BundleInfo>): void; 2020 2021 /** 2022 * Obtains information about an application bundle contained in an ohos Ability Package (HAP). 2023 * 2024 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2025 * @param { string } hapFilePath - Indicates the path storing the HAP. 2026 * The path should be the relative path to the data directory of the current application. 2027 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned. 2028 * @returns { Promise<BundleInfo> } Returns the BundleInfo object. 2029 * @throws { BusinessError } 201 - Permission denied. 2030 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2031 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2032 * @throws { BusinessError } 17700022 - The hapFilePath is invalid. 2033 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2034 * @systemapi 2035 * @since 9 2036 */ 2037 function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number): Promise<BundleInfo>; 2038 2039 /** 2040 * Obtains information about an application bundle contained in an ohos Ability Package (HAP). 2041 * 2042 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2043 * @param { string } hapFilePath - Indicates the path storing the HAP. 2044 * The path should be the relative path to the data directory of the current application. 2045 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object to be returned. 2046 * @returns { BundleInfo } Returns the BundleInfo object. 2047 * @throws { BusinessError } 201 - Permission denied. 2048 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2049 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2050 * @throws { BusinessError } 17700022 - The hapFilePath is invalid. 2051 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2052 * @systemapi 2053 * @since 10 2054 */ 2055 function getBundleArchiveInfoSync(hapFilePath: string, bundleFlags: number): BundleInfo; 2056 2057 /** 2058 * Clears cache data of a specified application. 2059 * 2060 * @permission ohos.permission.REMOVE_CACHE_FILES 2061 * @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned. 2062 * @param { AsyncCallback<void> } callback - The callback of cleaning bundle cache files result. 2063 * @throws { BusinessError } 201 - Permission denied. 2064 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2065 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2066 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2067 * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. 2068 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2069 * @systemapi 2070 * @since 9 2071 */ 2072 function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback<void>): void; 2073 2074 /** 2075 * Clears cache data of a specified application. 2076 * 2077 * @permission ohos.permission.REMOVE_CACHE_FILES 2078 * @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned. 2079 * @returns { Promise<void> } Clean bundle cache files result 2080 * @throws { BusinessError } 201 - Permission denied. 2081 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2082 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2083 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2084 * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. 2085 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2086 * @systemapi 2087 * @since 9 2088 */ 2089 function cleanBundleCacheFiles(bundleName: string): Promise<void>; 2090 2091 /** 2092 * Sets whether to enable a specified application. 2093 * 2094 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2095 * @param { string } bundleName - Indicates the bundle name of the application. 2096 * @param { number } appIndex - Indicates the index of clone app. 2097 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2098 * @returns { Promise<void> } set app enabled result. 2099 * @throws { BusinessError } 201 - Permission denied. 2100 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2101 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2102 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2103 * @throws { BusinessError } 17700061 - AppIndex not in valid range. 2104 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2105 * @systemapi 2106 * @since 12 2107 */ 2108 function setApplicationEnabled(bundleName: string, appIndex: number, isEnabled: boolean): Promise<void>; 2109 2110 /** 2111 * Sets whether to enable a specified application. 2112 * 2113 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2114 * @param { string } bundleName - Indicates the bundle name of the application. 2115 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2116 * @param { AsyncCallback<void> } callback - The callback of setting app enabled result. 2117 * @throws { BusinessError } 201 - Permission denied. 2118 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2119 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2120 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2121 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2122 * @systemapi 2123 * @since 9 2124 */ 2125 function setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCallback<void>): void; 2126 2127 /** 2128 * Sets whether to enable a specified application. 2129 * 2130 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2131 * @param { string } bundleName - Indicates the bundle name of the application. 2132 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2133 * @returns { Promise<void> } set app enabled result. 2134 * @throws { BusinessError } 201 - Permission denied. 2135 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2136 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2137 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2138 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2139 * @systemapi 2140 * @since 9 2141 */ 2142 function setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise<void>; 2143 2144 /** 2145 * Sets whether to enable a specified application. 2146 * 2147 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2148 * @param { string } bundleName - Indicates the bundle name of the application. 2149 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2150 * @throws { BusinessError } 201 - Permission denied. 2151 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2152 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2153 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2154 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2155 * @systemapi 2156 * @since 10 2157 */ 2158 function setApplicationEnabledSync(bundleName: string, isEnabled: boolean): void; 2159 2160 /** 2161 * Sets whether to enable a specified ability. 2162 * 2163 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2164 * @param { AbilityInfo } info - Indicates information about the ability to set. 2165 * @param { number } appIndex - Indicates the index of clone app. 2166 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2167 * @returns { Promise<void> } set ability enabled result. 2168 * @throws { BusinessError } 201 - Permission denied. 2169 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2170 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2171 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2172 * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. 2173 * @throws { BusinessError } 17700061 - AppIndex not in valid range. 2174 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2175 * @systemapi 2176 * @since 12 2177 */ 2178 function setAbilityEnabled(info: AbilityInfo, appIndex: number, isEnabled: boolean): Promise<void>; 2179 2180 /** 2181 * Sets whether to enable a specified ability. 2182 * 2183 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2184 * @param { AbilityInfo } info - Indicates information about the ability to set. 2185 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2186 * @param { AsyncCallback<void> } callback - The callback of setting ability enabled result. 2187 * @throws { BusinessError } 201 - Permission denied. 2188 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2189 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2190 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2191 * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. 2192 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2193 * @systemapi 2194 * @since 9 2195 */ 2196 function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean, callback: AsyncCallback<void>): void; 2197 2198 /** 2199 * Sets whether to enable a specified ability. 2200 * 2201 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2202 * @param { AbilityInfo } info - Indicates information about the ability to set. 2203 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2204 * @returns { Promise<void> } set ability enabled result. 2205 * @throws { BusinessError } 201 - Permission denied. 2206 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2207 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2208 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2209 * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. 2210 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2211 * @systemapi 2212 * @since 9 2213 */ 2214 function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean): Promise<void>; 2215 2216 /** 2217 * Sets whether to enable a specified ability. 2218 * 2219 * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE 2220 * @param { AbilityInfo } info - Indicates information about the ability to set. 2221 * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. 2222 * @throws { BusinessError } 201 - Permission denied. 2223 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2224 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2225 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2226 * @throws { BusinessError } 17700003 - The specified abilityInfo is not found. 2227 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2228 * @systemapi 2229 * @since 10 2230 */ 2231 function setAbilityEnabledSync(info: AbilityInfo, isEnabled: boolean): void; 2232 2233 /** 2234 * Checks whether a specified application is enabled. 2235 * 2236 * @param { string } bundleName - Indicates the bundle name of the application. 2237 * @param { number } appIndex - Indicates the index of clone app. 2238 * @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise. 2239 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2240 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2241 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2242 * @throws { BusinessError } 17700061 - AppIndex not in valid range. 2243 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2244 * @systemapi 2245 * @since 12 2246 */ 2247 function isApplicationEnabled(bundleName: string, appIndex: number): Promise<boolean>; 2248 2249 /** 2250 * Checks whether a specified application is enabled. 2251 * 2252 * @param { string } bundleName - Indicates the bundle name of the application. 2253 * @param { AsyncCallback<boolean> } callback - The callback of checking application enabled result. The result is true if enabled, false otherwise. 2254 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2255 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2256 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2257 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2258 * @systemapi 2259 * @since 9 2260 */ 2261 function isApplicationEnabled(bundleName: string, callback: AsyncCallback<boolean>): void; 2262 2263 /** 2264 * Checks whether a specified application is enabled. 2265 * 2266 * @param { string } bundleName - Indicates the bundle name of the application. 2267 * @returns { Promise<boolean> } Returns true if the application is enabled; returns false otherwise. 2268 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2269 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2270 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2271 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2272 * @systemapi 2273 * @since 9 2274 */ 2275 function isApplicationEnabled(bundleName: string): Promise<boolean>; 2276 2277 /** 2278 * Checks whether a specified application is enabled. 2279 * 2280 * @param { string } bundleName - Indicates the bundle name of the application. 2281 * @returns { boolean } Returns true if the application is enabled; returns false otherwise. 2282 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2283 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2284 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2285 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2286 * @systemapi 2287 * @since 10 2288 */ 2289 function isApplicationEnabledSync(bundleName: string): boolean; 2290 2291 /** 2292 * Checks whether a specified ability is enabled. 2293 * 2294 * @param { AbilityInfo } info - Indicates information about the ability to check. 2295 * @param { number } appIndex - Indicates the index of clone app. 2296 * @returns { Promise<boolean> } Returns true if the ability is enabled; returns false otherwise. 2297 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2298 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2299 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2300 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2301 * @throws { BusinessError } 17700061 - AppIndex not in valid range. 2302 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2303 * @systemapi 2304 * @since 12 2305 */ 2306 function isAbilityEnabled(info: AbilityInfo, appIndex: number): Promise<boolean>; 2307 2308 /** 2309 * Checks whether a specified ability is enabled. 2310 * 2311 * @param { AbilityInfo } info - Indicates information about the ability to check. 2312 * @param { AsyncCallback<boolean> } callback - The callback of checking ability enabled result. The result is true if enabled, false otherwise. 2313 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2314 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2315 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2316 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2317 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2318 * @systemapi 2319 * @since 9 2320 */ 2321 function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback<boolean>): void; 2322 2323 /** 2324 * Checks whether a specified ability is enabled. 2325 * 2326 * @param { AbilityInfo } info - Indicates information about the ability to check. 2327 * @returns { Promise<boolean> } Returns true if the ability is enabled; returns false otherwise. 2328 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2329 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2330 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2331 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2332 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2333 * @systemapi 2334 * @since 9 2335 */ 2336 function isAbilityEnabled(info: AbilityInfo): Promise<boolean>; 2337 2338 /** 2339 * Checks whether a specified ability is enabled. 2340 * 2341 * @param { AbilityInfo } info - Indicates information about the ability to check. 2342 * @returns { boolean } Returns true if the ability is enabled; returns false otherwise. 2343 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2344 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2345 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2346 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2347 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2348 * @systemapi 2349 * @since 10 2350 */ 2351 function isAbilityEnabledSync(info: AbilityInfo): boolean; 2352 2353 /** 2354 * Obtains the Want for starting the main ability of an application based on the 2355 * given bundle name. The main ability of an application is the ability that has the 2356 * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file. 2357 * 2358 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2359 * @param { string } bundleName - Indicates the bundle name of the application. 2360 * @param { number } userId - Indicates the user ID or do not pass user ID. 2361 * @param { AsyncCallback<Want> } callback - The callback for starting the application's main ability. 2362 * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. 2363 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2364 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2365 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2366 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2367 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2368 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2369 * @systemapi 2370 * @since 9 2371 */ 2372 function getLaunchWantForBundle(bundleName: string, userId: number, callback: AsyncCallback<Want>): void; 2373 2374 /** 2375 * Obtains the Want for starting the main ability of an application based on the 2376 * given bundle name. The main ability of an application is the ability that has the 2377 * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file. 2378 * 2379 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2380 * @param { string } bundleName - Indicates the bundle name of the application. 2381 * @param { AsyncCallback<Want> } callback - The callback for starting the application's main ability. 2382 * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. 2383 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2384 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2385 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2386 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2387 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2388 * @systemapi 2389 * @since 9 2390 */ 2391 function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback<Want>): void; 2392 2393 /** 2394 * Obtains the Want for starting the main ability of an application based on the 2395 * given bundle name. The main ability of an application is the ability that has the 2396 * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file. 2397 * 2398 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2399 * @param { string } bundleName - Indicates the bundle name of the application. 2400 * @param { number } userId - Indicates the user ID or do not pass user ID. 2401 * @returns { Promise<Want> } the Want for starting the application's main ability. 2402 * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. 2403 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2404 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2405 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2406 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2407 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2408 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2409 * @systemapi 2410 * @since 9 2411 */ 2412 function getLaunchWantForBundle(bundleName: string, userId?: number): Promise<Want>; 2413 2414 /** 2415 * Obtains the Want for starting the main ability of an application based on the 2416 * given bundle name. The main ability of an application is the ability that has the 2417 * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file. 2418 * 2419 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2420 * @param { string } bundleName - Indicates the bundle name of the application. 2421 * @param { number } userId - Indicates the user ID or do not pass user ID. 2422 * @returns { Want } the Want for starting the application's main ability. 2423 * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. 2424 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2425 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2426 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2427 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2428 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2429 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2430 * @systemapi 2431 * @since 10 2432 */ 2433 function getLaunchWantForBundleSync(bundleName: string, userId?: number): Want; 2434 2435 /** 2436 * Obtains the Want for starting the main ability of own application. 2437 * The main ability of an application is the ability that has the 2438 * #ACTION_HOME and #ENTITY_HOME Want filters set in the application's <b>config.json</b> or <b>module.json</b> file. 2439 * 2440 * @returns { Want } the Want for starting the application's main ability. 2441 * @throws { BusinessError } 17700072 - The launch want is not found. 2442 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2443 * @atomicservice 2444 * @since 13 2445 */ 2446 function getLaunchWant(): Want; 2447 2448 /** 2449 * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. 2450 * 2451 * @param { string } moduleName - Indicates the moduleName of the application. 2452 * @param { string } abilityName - Indicates the abilityName of the application. 2453 * @param { string } metadataName - Indicates the name of metadata in ability. 2454 * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file. 2455 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2456 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2457 * @throws { BusinessError } 17700003 - The specified abilityName is not existed. 2458 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2459 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2460 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2461 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2462 * @since 9 2463 */ 2464 /** 2465 * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. 2466 * 2467 * @param { string } moduleName - Indicates the moduleName of the application. 2468 * @param { string } abilityName - Indicates the abilityName of the application. 2469 * @param { string } metadataName - Indicates the name of metadata in ability. 2470 * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file. 2471 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2472 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2473 * @throws { BusinessError } 17700003 - The specified abilityName is not existed. 2474 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2475 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2476 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2477 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2478 * @atomicservice 2479 * @since 11 2480 */ 2481 function getProfileByAbility(moduleName: string, abilityName: string, metadataName: string, callback: AsyncCallback<Array<string>>): void; 2482 2483 /** 2484 * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. 2485 * 2486 * @param { string } moduleName - Indicates the moduleName of the application. 2487 * @param { string } abilityName - Indicates the abilityName of the application. 2488 * @param { string } metadataName - Indicates the name of metadata in ability. 2489 * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file. 2490 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2491 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2492 * @throws { BusinessError } 17700003 - The specified abilityName is not existed. 2493 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2494 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2495 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2496 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2497 * @since 9 2498 */ 2499 /** 2500 * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. 2501 * 2502 * @param { string } moduleName - Indicates the moduleName of the application. 2503 * @param { string } abilityName - Indicates the abilityName of the application. 2504 * @param { string } metadataName - Indicates the name of metadata in ability. 2505 * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file. 2506 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2507 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2508 * @throws { BusinessError } 17700003 - The specified abilityName is not existed. 2509 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2510 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2511 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2512 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2513 * @atomicservice 2514 * @since 11 2515 */ 2516 function getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise<Array<string>>; 2517 2518 /** 2519 * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. 2520 * 2521 * @param { string } moduleName - Indicates the moduleName of the application. 2522 * @param { string } abilityName - Indicates the abilityName of the application. 2523 * @param { string } metadataName - Indicates the name of metadata in ability. 2524 * @returns { Array<string> } Returns string in json-format of the corresponding config file. 2525 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2526 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2527 * @throws { BusinessError } 17700003 - The specified abilityName is not existed. 2528 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2529 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2530 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2531 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2532 * @since 10 2533 */ 2534 /** 2535 * Obtains the profile designated by metadata name, abilityName and moduleName from the current application. 2536 * 2537 * @param { string } moduleName - Indicates the moduleName of the application. 2538 * @param { string } abilityName - Indicates the abilityName of the application. 2539 * @param { string } metadataName - Indicates the name of metadata in ability. 2540 * @returns { Array<string> } Returns string in json-format of the corresponding config file. 2541 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2542 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2543 * @throws { BusinessError } 17700003 - The specified abilityName is not existed. 2544 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2545 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2546 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2547 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2548 * @atomicservice 2549 * @since 11 2550 */ 2551 function getProfileByAbilitySync(moduleName: string, abilityName: string, metadataName?: string): Array<string>; 2552 2553 /** 2554 * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. 2555 * 2556 * @param { string } moduleName - Indicates the moduleName of the application. 2557 * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application. 2558 * @param { string } metadataName - Indicates the name of metadata in ability. 2559 * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file. 2560 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2561 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2562 * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. 2563 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2564 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2565 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2566 * @since 9 2567 */ 2568 /** 2569 * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. 2570 * 2571 * @param { string } moduleName - Indicates the moduleName of the application. 2572 * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application. 2573 * @param { string } metadataName - Indicates the name of metadata in ability. 2574 * @param { AsyncCallback<Array<string>> } callback - The callback of returning string in json-format of the corresponding config file. 2575 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2576 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2577 * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. 2578 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2579 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2580 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2581 * @atomicservice 2582 * @since 11 2583 */ 2584 function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName: string, callback: AsyncCallback<Array<string>>): void; 2585 2586 /** 2587 * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. 2588 * 2589 * @param { string } moduleName - Indicates the moduleName of the application. 2590 * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application. 2591 * @param { string } metadataName - Indicates the name of metadata in ability. 2592 * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file. 2593 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2594 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2595 * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. 2596 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2597 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2598 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2599 * @since 9 2600 */ 2601 /** 2602 * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. 2603 * 2604 * @param { string } moduleName - Indicates the moduleName of the application. 2605 * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application. 2606 * @param { string } metadataName - Indicates the name of metadata in ability. 2607 * @returns { Promise<Array<string>> } Returns string in json-format of the corresponding config file. 2608 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2609 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2610 * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. 2611 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2612 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2613 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2614 * @atomicservice 2615 * @since 11 2616 */ 2617 function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName?: string): Promise<Array<string>>; 2618 2619 /** 2620 * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. 2621 * 2622 * @param { string } moduleName - Indicates the moduleName of the application. 2623 * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application. 2624 * @param { string } metadataName - Indicates the name of metadata in ability. 2625 * @returns { Array<string> } Returns string in json-format of the corresponding config file. 2626 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2627 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2628 * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. 2629 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2630 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2631 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2632 * @since 10 2633 */ 2634 /** 2635 * Obtains the profile designated by metadata name, extensionAbilityName and moduleName from the current application. 2636 * 2637 * @param { string } moduleName - Indicates the moduleName of the application. 2638 * @param { string } extensionAbilityName - Indicates the extensionAbilityName of the application. 2639 * @param { string } metadataName - Indicates the name of metadata in ability. 2640 * @returns { Array<string> } Returns string in json-format of the corresponding config file. 2641 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2642 * @throws { BusinessError } 17700002 - The specified moduleName is not existed. 2643 * @throws { BusinessError } 17700003 - The specified extensionAbilityName not existed. 2644 * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. 2645 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2646 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2647 * @atomicservice 2648 * @since 11 2649 */ 2650 function getProfileByExtensionAbilitySync(moduleName: string, extensionAbilityName: string, metadataName?: string): Array<string>; 2651 2652 /** 2653 * Get the permission details by permission name. 2654 * 2655 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2656 * @param { string } permissionName - Indicates permission name. 2657 * @param { AsyncCallback<PermissionDef> } callback - The callback of get permissionDef object result. 2658 * @throws { BusinessError } 201 - Permission denied. 2659 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2660 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2661 * @throws { BusinessError } 17700006 - The specified permission is not found. 2662 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2663 * @systemapi 2664 * @since 9 2665 */ 2666 function getPermissionDef(permissionName: string, callback: AsyncCallback<PermissionDef>): void; 2667 2668 /** 2669 * Get the permission details by permission name. 2670 * 2671 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2672 * @param { string } permissionName - Indicates permission name. 2673 * @returns { Promise<PermissionDef> } Returns permissionDef object. 2674 * @throws { BusinessError } 201 - Permission denied. 2675 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2676 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2677 * @throws { BusinessError } 17700006 - The specified permission is not found. 2678 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2679 * @systemapi 2680 * @since 9 2681 */ 2682 function getPermissionDef(permissionName: string): Promise<PermissionDef>; 2683 2684 /** 2685 * Get the permission details by permission name. 2686 * 2687 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2688 * @param { string } permissionName - Indicates permission name. 2689 * @returns { PermissionDef } Returns permissionDef object. 2690 * @throws { BusinessError } 201 - Permission denied. 2691 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2692 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2693 * @throws { BusinessError } 17700006 - The specified permission is not found. 2694 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2695 * @systemapi 2696 * @since 10 2697 */ 2698 function getPermissionDefSync(permissionName: string): PermissionDef; 2699 2700 /** 2701 * Obtains the label of a specified ability. 2702 * 2703 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2704 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2705 * @param { string } moduleName - Indicates the module name. 2706 * @param { string } abilityName - Indicates the ability name. 2707 * @param { AsyncCallback<string> } callback - The callback of getting ability label result. 2708 * @throws { BusinessError } 201 - Permission denied. 2709 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2710 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2711 * @throws { BusinessError } 801 - Capability not supported. 2712 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2713 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 2714 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2715 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2716 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2717 * @syscap SystemCapability.BundleManager.BundleFramework.Resource 2718 * @systemapi 2719 * @since 9 2720 */ 2721 function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback<string>): void; 2722 2723 /** 2724 * Obtains the label of a specified ability. 2725 * 2726 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2727 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2728 * @param { string } moduleName - Indicates the module name. 2729 * @param { string } abilityName - Indicates the ability name. 2730 * @returns { Promise<string> } Returns the label representing the label of the specified ability. 2731 * @throws { BusinessError } 201 - Permission denied. 2732 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2733 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2734 * @throws { BusinessError } 801 - Capability not supported. 2735 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2736 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 2737 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2738 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2739 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2740 * @syscap SystemCapability.BundleManager.BundleFramework.Resource 2741 * @systemapi 2742 * @since 9 2743 */ 2744 function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Promise<string>; 2745 2746 /** 2747 * Obtains the label of a specified ability. 2748 * 2749 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2750 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2751 * @param { string } moduleName - Indicates the module name. 2752 * @param { string } abilityName - Indicates the ability name. 2753 * @returns { string } Returns the label representing the label of the specified ability. 2754 * @throws { BusinessError } 201 - Permission denied. 2755 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2756 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2757 * @throws { BusinessError } 801 - Capability not supported. 2758 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2759 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 2760 * @throws { BusinessError } 17700003 - The specified abilityName is not found. 2761 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2762 * @throws { BusinessError } 17700029 - The specified ability is disabled. 2763 * @syscap SystemCapability.BundleManager.BundleFramework.Resource 2764 * @systemapi 2765 * @since 10 2766 */ 2767 function getAbilityLabelSync(bundleName: string, moduleName: string, abilityName: string): string; 2768 2769 /** 2770 * Obtains applicationInfo based on a given bundleName and bundleFlags. 2771 * 2772 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2773 * @param { string } bundleName - Indicates the application bundle name to be queried. 2774 * @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. 2775 * @param { number } userId - Indicates the user ID or do not pass user ID. 2776 * @returns { ApplicationInfo } - Returns the ApplicationInfo object. 2777 * @throws { BusinessError } 201 - Permission denied. 2778 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2779 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2780 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2781 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2782 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2783 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2784 * @systemapi 2785 * @since 9 2786 */ 2787 function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number): ApplicationInfo; 2788 2789 /** 2790 * Obtains applicationInfo based on a given bundleName and bundleFlags. 2791 * 2792 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2793 * @param { string } bundleName - Indicates the application bundle name to be queried. 2794 * @param { number } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. 2795 * @returns { ApplicationInfo } - Returns the ApplicationInfo object. 2796 * @throws { BusinessError } 201 - Permission denied. 2797 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2798 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2799 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2800 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2801 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2802 * @systemapi 2803 * @since 9 2804 */ 2805 function getApplicationInfoSync(bundleName: string, applicationFlags: number): ApplicationInfo; 2806 2807 /** 2808 * Obtains bundleInfo based on bundleName, bundleFlags and userId. 2809 * 2810 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2811 * @param { string } bundleName - Indicates the application bundle name to be queried. 2812 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object that will be returned. 2813 * @param { number } userId - Indicates the user ID or do not pass user ID. 2814 * @returns { BundleInfo } - Returns the BundleInfo object. 2815 * @throws { BusinessError } 201 - Permission denied. 2816 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2817 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2818 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2819 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2820 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2821 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2822 * @systemapi 2823 * @since 9 2824 */ 2825 function getBundleInfoSync(bundleName: string, bundleFlags: number, userId: number): BundleInfo; 2826 2827 /** 2828 * Obtains bundleInfo based on bundleName, bundleFlags. 2829 * 2830 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 2831 * @param { string } bundleName - Indicates the application bundle name to be queried. 2832 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo object that will be returned. 2833 * @returns { BundleInfo } - Returns the BundleInfo object. 2834 * @throws { BusinessError } 201 - Permission denied. 2835 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2836 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2837 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2838 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 2839 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2840 * @systemapi 2841 * @since 9 2842 */ 2843 function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo; 2844 2845 /** 2846 * Obtains SharedBundleInfo of all shared bundle available in the system. 2847 * 2848 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2849 * @param { AsyncCallback<Array<SharedBundleInfo>> } callback - The callback of getting a list of SharedBundleInfo objects. 2850 * @throws { BusinessError } 201 - Permission denied. 2851 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2852 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2853 * @systemapi 2854 * @since 10 2855 */ 2856 function getAllSharedBundleInfo(callback: AsyncCallback<Array<SharedBundleInfo>>): void; 2857 2858 /** 2859 * Obtains SharedBundleInfo of all shared bundle available in the system. 2860 * 2861 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2862 * @returns { Promise<Array<SharedBundleInfo>> } Returns a list of SharedBundleInfo objects. 2863 * @throws { BusinessError } 201 - Permission denied. 2864 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2865 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2866 * @systemapi 2867 * @since 10 2868 */ 2869 function getAllSharedBundleInfo(): Promise<Array<SharedBundleInfo>>; 2870 2871 /** 2872 * Obtains SharedBundleInfo of shared bundle by bundle name and module name. 2873 * 2874 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2875 * @param { string } bundleName - Indicates the bundleName of the application. 2876 * @param { string } moduleName - Indicates the moduleName of the application. 2877 * @param { AsyncCallback<Array<SharedBundleInfo>> } callback - The callback of getting a list of SharedBundleInfo objects. 2878 * @throws { BusinessError } 201 - Permission denied. 2879 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2880 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2881 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2882 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 2883 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2884 * @systemapi 2885 * @since 10 2886 */ 2887 function getSharedBundleInfo(bundleName: string, moduleName: string, callback: AsyncCallback<Array<SharedBundleInfo>>): void; 2888 2889 /** 2890 * Obtains SharedBundleInfo of shared bundle by bundle name and module name. 2891 * 2892 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2893 * @param { string } bundleName - Indicates the bundleName of the application. 2894 * @param { string } moduleName - Indicates the moduleName of the application. 2895 * @returns { Promise<Array<SharedBundleInfo>> } Returns a list of SharedBundleInfo objects. 2896 * @throws { BusinessError } 201 - Permission denied. 2897 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2898 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2899 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2900 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 2901 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2902 * @systemapi 2903 * @since 10 2904 */ 2905 function getSharedBundleInfo(bundleName: string, moduleName: string): Promise<Array<SharedBundleInfo>>; 2906 2907 /** 2908 * Obtains the profile file information of a specified bundle. 2909 * 2910 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2911 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2912 * @param { AsyncCallback<AppProvisionInfo> } callback - Indicates the callback of getting AppProvisionInfo result. 2913 * @throws { BusinessError } 201 - Permission denied. 2914 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2915 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2916 * 2. Incorrect parameter types; 3. Parameter bundleName is empty. 2917 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2918 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2919 * @systemapi 2920 * @since 10 2921 */ 2922 function getAppProvisionInfo(bundleName: string, callback: AsyncCallback<AppProvisionInfo>): void; 2923 2924 /** 2925 * Obtains the profile file information of a specified bundle. 2926 * 2927 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2928 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2929 * @param { number } userId - Indicates the user ID or do not pass user ID. 2930 * @param { AsyncCallback<AppProvisionInfo> } callback - Indicates the callback of getting AppProvisionInfo result. 2931 * @throws { BusinessError } 201 - Permission denied. 2932 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2933 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2934 * 2. Incorrect parameter types; 3. Parameter bundleName is empty. 2935 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2936 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2937 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2938 * @systemapi 2939 * @since 10 2940 */ 2941 function getAppProvisionInfo(bundleName: string, userId: number, callback: AsyncCallback<AppProvisionInfo>): void; 2942 2943 /** 2944 * Obtains the profile file information of a specified bundle. 2945 * 2946 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2947 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2948 * @param { number } userId - Indicates the user ID or do not pass user ID. 2949 * @returns { Promise<AppProvisionInfo> } Returns the AppProvisionInfo object. 2950 * @throws { BusinessError } 201 - Permission denied. 2951 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2952 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2953 * 2. Incorrect parameter types; 3. Parameter bundleName is empty. 2954 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2955 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2956 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2957 * @systemapi 2958 * @since 10 2959 */ 2960 function getAppProvisionInfo(bundleName: string, userId?: number): Promise<AppProvisionInfo>; 2961 2962 /** 2963 * Obtains the profile file information of a specified bundle. 2964 * 2965 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2966 * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. 2967 * @param { number } userId - Indicates the user ID or do not pass user ID. 2968 * @returns { AppProvisionInfo } Returns the AppProvisionInfo object. 2969 * @throws { BusinessError } 201 - Permission denied. 2970 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2971 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2972 * 2. Incorrect parameter types; 3. Parameter bundleName is empty. 2973 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2974 * @throws { BusinessError } 17700004 - The specified user ID is not found. 2975 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2976 * @systemapi 2977 * @since 10 2978 */ 2979 function getAppProvisionInfoSync(bundleName: string, userId?: number): AppProvisionInfo; 2980 2981 /** 2982 * Obtains the distribution type specified during bundle installation. 2983 * 2984 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 2985 * @param { string } bundleName - Indicates the application bundle name to be queried. 2986 * @returns { string } The specified distribution type. 2987 * @throws { BusinessError } 201 - Permission denied. 2988 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 2989 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 2990 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 2991 * @syscap SystemCapability.BundleManager.BundleFramework.Core 2992 * @systemapi 2993 * @since 10 2994 */ 2995 function getSpecifiedDistributionType(bundleName: string): string; 2996 2997 /** 2998 * Obtains the additional information during bundle installation. 2999 * 3000 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3001 * @param { string } bundleName - Indicates the application bundle name to be queried. 3002 * @returns { string } The additional information. 3003 * @throws { BusinessError } 201 - Permission denied. 3004 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3005 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3006 * 2. Incorrect parameter types; 3. Parameter bundleName is empty. 3007 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3008 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3009 * @systemapi 3010 * @since 10 3011 */ 3012 function getAdditionalInfo(bundleName: string): string; 3013 3014 /** 3015 * Obtains the JSON profile designated by profileType, bundleName and moduleName. 3016 * 3017 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 3018 * @param { ProfileType } profileType - Indicates the type of profile to be obtained. 3019 * @param { string } bundleName - Indicates the name of the bundle to which the profile belongs. 3020 * @param { string } moduleName - Indicates the name of the module to which the profile belongs. 3021 * @returns { string } Returns string in json-format of the designated profile. 3022 * @throws { BusinessError } 201 - Permission denied. 3023 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3024 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3025 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3026 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 3027 * @throws { BusinessError } 17700024 - Failed to get the profile because the specified profile is not found in the HAP. 3028 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 3029 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3030 * @systemapi 3031 * @since 11 3032 */ 3033 /** 3034 * Obtains the JSON profile designated by profileType, bundleName, moduleName and userId. 3035 * 3036 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 3037 * @param { ProfileType } profileType - Indicates the type of profile to be obtained. 3038 * @param { string } bundleName - Indicates the name of the bundle to which the profile belongs. 3039 * @param { string } moduleName - Indicates the name of the module to which the profile belongs. 3040 * @param { number } userId - Indicates the user ID or do not pass user ID. 3041 * @returns { string } Returns string in json-format of the designated profile. 3042 * @throws { BusinessError } 201 - Permission denied. 3043 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3044 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3045 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3046 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 3047 * @throws { BusinessError } 17700004 - The specified user ID is not found. 3048 * @throws { BusinessError } 17700024 - Failed to get the profile because the specified profile is not found in the HAP. 3049 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 3050 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3051 * @systemapi 3052 * @since 12 3053 */ 3054 function getJsonProfile(profileType: ProfileType, bundleName: string, moduleName?: string, userId?: number): string; 3055 3056 /** 3057 * Get extend resources. 3058 * 3059 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 3060 * @param { string } bundleName - Indicates the bundleName. 3061 * @returns { Promise<Array<string>> } Returns getExtResource result. 3062 * @throws { BusinessError } 201 - Permission denied. 3063 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3064 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3065 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3066 * @throws { BusinessError } 17700303 - Failed to obtain extended resources. 3067 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3068 * @systemapi 3069 * @since 12 3070 */ 3071 function getExtResource(bundleName: string): Promise<Array<string>>; 3072 3073 /** 3074 * Enable dynamic icon. 3075 * 3076 * @permission ohos.permission.ACCESS_DYNAMIC_ICON 3077 * @param { string } bundleName - Indicates the bundleName. 3078 * @param { string } moduleName - Indicates the moduleName for extend resource. 3079 * @returns { Promise<void> } Returns enableDynamicIcon result. 3080 * @throws { BusinessError } 201 - Permission denied. 3081 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3082 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3083 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3084 * @throws { BusinessError } 17700002 - The specified moduleName is not found. 3085 * @throws { BusinessError } 17700304 - Failed to enable the dynamic icon. 3086 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3087 * @systemapi 3088 * @since 12 3089 */ 3090 function enableDynamicIcon(bundleName: string, moduleName: string): Promise<void>; 3091 3092 /** 3093 * Disable dynamic icon. 3094 * 3095 * @permission ohos.permission.ACCESS_DYNAMIC_ICON 3096 * @param { string } bundleName - Indicates the bundleName. 3097 * @returns { Promise<void> } Returns disableDynamicIcon result. 3098 * @throws { BusinessError } 201 - Permission denied. 3099 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3100 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3101 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3102 * @throws { BusinessError } 17700305 - Failed to disable the dynamic icon. 3103 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3104 * @systemapi 3105 * @since 12 3106 */ 3107 function disableDynamicIcon(bundleName: string): Promise<void>; 3108 3109 /** 3110 * Get dynamic icon. 3111 * 3112 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO 3113 * @param { string } bundleName - Indicates the bundleName. 3114 * @returns { Promise<string> } Returns dynamic icon key. 3115 * @throws { BusinessError } 201 - Permission denied. 3116 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3117 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3118 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3119 * @throws { BusinessError } 17700306 - Failed to obtain the dynamic icon. 3120 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3121 * @systemapi 3122 * @since 12 3123 */ 3124 function getDynamicIcon(bundleName: string): Promise<string>; 3125 3126 /** 3127 * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM. 3128 * 3129 * @permission ohos.permission.RUN_DYN_CODE 3130 * @param { Array<string> } abcPaths - The abc path. 3131 * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files. 3132 * @param { AsyncCallback<void> } callback - Indicates the callback of verifyAbc result. 3133 * @throws { BusinessError } 201 - Permission denied. 3134 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3135 * @throws { BusinessError } 17700201 - Failed to verify the abc file. 3136 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3137 * @since 11 3138 */ 3139 /** 3140 * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM. 3141 * 3142 * @permission ohos.permission.RUN_DYN_CODE 3143 * @param { Array<string> } abcPaths - The abc path. 3144 * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files. 3145 * @param { AsyncCallback<void> } callback - Indicates the callback of verifyAbc result. 3146 * @throws { BusinessError } 201 - Permission denied. 3147 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3148 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3149 * @throws { BusinessError } 17700201 - Failed to verify the abc file. 3150 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3151 * @systemapi 3152 * @since 12 3153 */ 3154 function verifyAbc(abcPaths: Array<string>, deleteOriginalFiles: boolean, callback: AsyncCallback<void>): void; 3155 3156 /** 3157 * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM. 3158 * 3159 * @permission ohos.permission.RUN_DYN_CODE 3160 * @param { Array<string> } abcPaths - The abc path. 3161 * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files. 3162 * @returns { Promise<void> } Returns verifyAbc result. 3163 * @throws { BusinessError } 201 - Permission denied. 3164 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3165 * @throws { BusinessError } 17700201 - Failed to verify the abc file. 3166 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3167 * @since 11 3168 */ 3169 /** 3170 * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM. 3171 * 3172 * @permission ohos.permission.RUN_DYN_CODE 3173 * @param { Array<string> } abcPaths - The abc path. 3174 * @param { boolean } deleteOriginalFiles - Used to decide whether to delete the original files. 3175 * @returns { Promise<void> } Returns verifyAbc result. 3176 * @throws { BusinessError } 201 - Permission denied. 3177 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3178 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3179 * @throws { BusinessError } 17700201 - Failed to verify the abc file. 3180 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3181 * @systemapi 3182 * @since 12 3183 */ 3184 function verifyAbc(abcPaths: Array<string>, deleteOriginalFiles: boolean): Promise<void>; 3185 3186 /** 3187 * Obtains recoverable preinstalled applications. 3188 * 3189 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3190 * @param { AsyncCallback<Array<RecoverableApplicationInfo>> } callback - The callback of getting a list of RecoverableApplicationInfo objects. 3191 * @throws { BusinessError } 201 - Permission denied. 3192 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3193 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3194 * @systemapi 3195 * @since 11 3196 */ 3197 function getRecoverableApplicationInfo(callback: AsyncCallback<Array<RecoverableApplicationInfo>>): void; 3198 3199 /** 3200 * Obtains recoverable preinstalled applications. 3201 * 3202 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3203 * @returns { Promise<Array<RecoverableApplicationInfo>> } Returns a list of RecoverableApplicationInfo objects. 3204 * @throws { BusinessError } 201 - Permission denied. 3205 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3206 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3207 * @systemapi 3208 * @since 11 3209 */ 3210 function getRecoverableApplicationInfo(): Promise<Array<RecoverableApplicationInfo>>; 3211 3212 /** 3213 * Set additional information to the specified application. 3214 * 3215 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3216 * @param { string } bundleName - Indicates the bundle name of the application. 3217 * @param { string } additionalInfo - The additional information. 3218 * @throws { BusinessError } 201 - Permission denied. 3219 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3220 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3221 * 2. Incorrect parameter types; 3. Parameter bundleName is empty. 3222 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3223 * @throws { BusinessError } 17700053 - The caller is not AppGallery. 3224 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3225 * @systemapi 3226 * @since 11 3227 */ 3228 function setAdditionalInfo(bundleName: string, additionalInfo: string): void; 3229 3230 /** 3231 * Delete the verified .abc file. 3232 * 3233 * @permission ohos.permission.RUN_DYN_CODE 3234 * @param { string } abcPath - The abc path. 3235 * @returns { Promise<void> } Returns deleteAbc result. 3236 * @throws { BusinessError } 201 - Permission denied. 3237 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3238 * @throws { BusinessError } 17700202 - Failed to delete the abc file. 3239 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3240 * @since 11 3241 */ 3242 /** 3243 * Delete the verified .abc file. 3244 * 3245 * @permission ohos.permission.RUN_DYN_CODE 3246 * @param { string } abcPath - The abc path. 3247 * @returns { Promise<void> } Returns deleteAbc result. 3248 * @throws { BusinessError } 201 - Permission denied. 3249 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3250 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3251 * @throws { BusinessError } 17700202 - Failed to delete the abc file. 3252 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3253 * @systemapi 3254 * @since 12 3255 */ 3256 function deleteAbc(abcPath: string): Promise<void>; 3257 3258 /** 3259 * Check whether the link can be opened. 3260 * 3261 * @param { string } link - Indicates the link to be opened. 3262 * @returns { boolean } Returns true if the link can be opened; returns false otherwise. 3263 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3264 * @throws { BusinessError } 17700055 - The specified link is invalid. 3265 * @throws { BusinessError } 17700056 - The scheme of the specified link is not in the querySchemes. 3266 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3267 * @atomicservice 3268 * @since 12 3269 */ 3270 function canOpenLink(link: string): boolean; 3271 3272 /** 3273 * Obtains PreinstalledApplicationInfo of all applications preinstalled in the system. 3274 * 3275 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3276 * @returns { Promise<Array<PreinstalledApplicationInfo>> } Returns a list of PreinstalledApplicationInfo objects. 3277 * @throws { BusinessError } 201 - Permission denied. 3278 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3279 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3280 * @systemapi 3281 * @since 12 3282 */ 3283 function getAllPreinstalledApplicationInfo(): Promise<Array<PreinstalledApplicationInfo>>; 3284 3285 /** 3286 * Get a list of BundleInfo objects by developerId. 3287 * 3288 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3289 * @param { string } developerId - Indicates the developerId of the application. 3290 * @returns { Array<BundleInfo> } Returns a list of BundleInfo objects. 3291 * @throws { BusinessError } 201 - Permission denied. 3292 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3293 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 3294 * 2. Incorrect parameter types; 3. Parameter developerId is empty. 3295 * @throws { BusinessError } 17700059 - The specified developerId is invalid. 3296 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3297 * @systemapi 3298 * @since 12 3299 */ 3300 function getAllBundleInfoByDeveloperId(developerId: string): Array<BundleInfo>; 3301 3302 /** 3303 * Get a list of developedId by distribution type. 3304 * 3305 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3306 * @param { number } appDistributionType - Indicates the distribution type of the application, and if not passed in, it gets all the developerId. 3307 * @returns { Array<String> } Returns a list of developerId. 3308 * @throws { BusinessError } 201 - Permission denied. 3309 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3310 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3311 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3312 * @systemapi 3313 * @since 12 3314 */ 3315 function getDeveloperIds(appDistributionType?: number): Array<String>; 3316 3317 /** 3318 * Switch uninstall state of a specified application. 3319 * 3320 * @permission ohos.permission.CHANGE_BUNDLE_UNINSTALL_STATE 3321 * @param { string } bundleName - Indicates the bundle name of the application. 3322 * @param { boolean } state - Indicates whether the specified application can be uninstalled. 3323 * @throws { BusinessError } 201 - Permission denied. 3324 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3325 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3326 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3327 * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled. 3328 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3329 * @systemapi 3330 * @since 12 3331 */ 3332 function switchUninstallState(bundleName: string, state: boolean): void; 3333 3334 /** 3335 * Get the BundleInfo of the specified MultiIsolation App. 3336 * 3337 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3338 * @param { string } bundleName - Indicates the application bundle name to be queried. 3339 * @param { number } appIndex - Indicates the index of clone app. 3340 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 3341 * @param { number } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default. 3342 * @returns { Promise<BundleInfo> } Returns A BundleInfo Of MultiApp Mode. 3343 * @throws { BusinessError } 201 - Permission denied. 3344 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3345 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3346 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3347 * @throws { BusinessError } 17700004 - The specified user ID is not found. 3348 * @throws { BusinessError } 17700026 - The specified bundle is disabled. 3349 * @throws { BusinessError } 17700061 - AppIndex not in valid range. 3350 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3351 * @systemapi 3352 * @since 12 3353 */ 3354 function getAppCloneBundleInfo(bundleName: string, appIndex: number, bundleFlags: number, userId?: number): Promise<BundleInfo>; 3355 3356 /** 3357 * Get all BundleInfo of clone app. 3358 * 3359 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3360 * @param { string } bundleName - Indicates the application bundle name to be queried. 3361 * @param { number } bundleFlags - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. 3362 * @param { number } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default. 3363 * @returns { Promise<Array<BundleInfo>> } Returns BundleInfo Arrays Of MultiApp Mode. 3364 * @throws { BusinessError } 201 - Permission denied. 3365 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3366 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3367 * @throws { BusinessError } 17700001 - The specified bundleName is not found. 3368 * @throws { BusinessError } 17700004 - The specified user ID is not found. 3369 * @throws { BusinessError } 17700026 - The specified bundle and clone apps are all disabled. 3370 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3371 * @systemapi 3372 * @since 12 3373 */ 3374 function getAllAppCloneBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise<Array<BundleInfo>>; 3375 3376 /** 3377 * Obtains AppCloneIdentity contains bundleName and appIndex by the given uid. 3378 * 3379 * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED 3380 * @param { number } uid - Indicates the UID of an application. 3381 * @returns { Promise<AppCloneIdentity> } Returns the clone Identity contains bundleName and appIndex. 3382 * @throws { BusinessError } 201 - Permission denied. 3383 * @throws { BusinessError } 202 - Permission denied, non-system app called system api. 3384 * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. 3385 * @throws { BusinessError } 17700021 - The uid is not found. 3386 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3387 * @systemapi 3388 * @since 12 3389 */ 3390 function getAppCloneIdentity(uid: number): Promise<AppCloneIdentity>; 3391 3392 /** 3393 * Obtains configuration information about an application. 3394 * 3395 * @typedef { _ApplicationInfo } 3396 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3397 * @since 9 3398 */ 3399 /** 3400 * Obtains configuration information about an application. 3401 * 3402 * @typedef { _ApplicationInfo } 3403 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3404 * @atomicservice 3405 * @since 11 3406 */ 3407 export type ApplicationInfo = _ApplicationInfo; 3408 3409 /** 3410 * Indicates the metadata information about a module. 3411 * 3412 * @typedef { _ModuleMetadata } 3413 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3414 * @since 10 3415 */ 3416 /** 3417 * Indicates the metadata information about a module. 3418 * 3419 * @typedef { _ModuleMetadata } 3420 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3421 * @atomicservice 3422 * @since 11 3423 */ 3424 export type ModuleMetadata = _ModuleMetadata; 3425 3426 /** 3427 * Indicates the Metadata. 3428 * 3429 * @typedef { _Metadata } 3430 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3431 * @since 9 3432 */ 3433 /** 3434 * Indicates the Metadata. 3435 * 3436 * @typedef { _Metadata } 3437 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3438 * @atomicservice 3439 * @since 11 3440 */ 3441 export type Metadata = _Metadata; 3442 3443 /** 3444 * Obtains configuration information about a bundle. 3445 * 3446 * @typedef { _BundleInfo.BundleInfo } 3447 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3448 * @since 9 3449 */ 3450 /** 3451 * Obtains configuration information about a bundle. 3452 * 3453 * @typedef { _BundleInfo.BundleInfo } 3454 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3455 * @atomicservice 3456 * @since 11 3457 */ 3458 export type BundleInfo = _BundleInfo.BundleInfo; 3459 3460 /** 3461 * The scene which is used. 3462 * 3463 * @typedef { _BundleInfo.UsedScene } 3464 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3465 * @since 9 3466 */ 3467 /** 3468 * The scene which is used. 3469 * 3470 * @typedef { _BundleInfo.UsedScene } 3471 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3472 * @atomicservice 3473 * @since 11 3474 */ 3475 export type UsedScene = _BundleInfo.UsedScene; 3476 3477 /** 3478 * Indicates the required permissions details defined in file config.json. 3479 * 3480 * @typedef { _BundleInfo.ReqPermissionDetail } 3481 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3482 * @since 9 3483 */ 3484 /** 3485 * Indicates the required permissions details defined in file config.json. 3486 * 3487 * @typedef { _BundleInfo.ReqPermissionDetail } 3488 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3489 * @atomicservice 3490 * @since 11 3491 */ 3492 export type ReqPermissionDetail = _BundleInfo.ReqPermissionDetail; 3493 3494 /** 3495 * Indicates the SignatureInfo. 3496 * 3497 * @typedef { _BundleInfo.SignatureInfo } 3498 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3499 * @since 9 3500 */ 3501 /** 3502 * Indicates the SignatureInfo. 3503 * 3504 * @typedef { _BundleInfo.SignatureInfo } 3505 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3506 * @atomicservice 3507 * @since 11 3508 */ 3509 export type SignatureInfo = _BundleInfo.SignatureInfo; 3510 3511 /** 3512 * AppCloneIdentity Contain BundleName and appIndex. 3513 * 3514 * @typedef { _BundleInfo.AppCloneIdentity } 3515 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3516 * @systemapi 3517 * @since 12 3518 */ 3519 export type AppCloneIdentity = _BundleInfo.AppCloneIdentity; 3520 3521 /** 3522 * Obtains configuration information about a module. 3523 * 3524 * @typedef { _HapModuleInfo.HapModuleInfo } 3525 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3526 * @since 9 3527 */ 3528 /** 3529 * Obtains configuration information about a module. 3530 * 3531 * @typedef { _HapModuleInfo.HapModuleInfo } 3532 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3533 * @atomicservice 3534 * @since 11 3535 */ 3536 export type HapModuleInfo = _HapModuleInfo.HapModuleInfo; 3537 3538 /** 3539 * Obtains preload information about a module. 3540 * 3541 * @typedef { _HapModuleInfo.PreloadItem } 3542 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3543 * @since 9 3544 */ 3545 /** 3546 * Obtains preload information about a module. 3547 * 3548 * @typedef { _HapModuleInfo.PreloadItem } 3549 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3550 * @atomicservice 3551 * @since 11 3552 */ 3553 export type PreloadItem = _HapModuleInfo.PreloadItem; 3554 3555 /** 3556 * Obtains dependency information about a module. 3557 * 3558 * @typedef { _HapModuleInfo.Dependency } 3559 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3560 * @since 9 3561 */ 3562 /** 3563 * Obtains dependency information about a module. 3564 * 3565 * @typedef { _HapModuleInfo.Dependency } 3566 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3567 * @atomicservice 3568 * @since 11 3569 */ 3570 export type Dependency = _HapModuleInfo.Dependency; 3571 3572 /** 3573 * Obtains the router item about a module. 3574 * 3575 * @typedef { _HapModuleInfo.RouterItem} 3576 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3577 * @atomicservice 3578 * @since 12 3579 */ 3580 export type RouterItem = _HapModuleInfo.RouterItem; 3581 3582 /** 3583 * Obtains the data item within router item. 3584 * 3585 * @typedef { _HapModuleInfo.DataItem } 3586 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3587 * @atomicservice 3588 * @since 12 3589 */ 3590 export type DataItem = _HapModuleInfo.DataItem; 3591 3592 /** 3593 * Obtains configuration information about an ability. 3594 * 3595 * @typedef { _AbilityInfo.AbilityInfo } 3596 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3597 * @since 9 3598 */ 3599 /** 3600 * Obtains configuration information about an ability. 3601 * 3602 * @typedef { _AbilityInfo.AbilityInfo } 3603 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3604 * @atomicservice 3605 * @since 11 3606 */ 3607 export type AbilityInfo = _AbilityInfo.AbilityInfo; 3608 3609 /** 3610 * Contains basic Ability information. Indicates the window size.. 3611 * 3612 * @typedef { _AbilityInfo.WindowSize } 3613 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3614 * @since 9 3615 */ 3616 /** 3617 * Contains basic Ability information. Indicates the window size.. 3618 * 3619 * @typedef { _AbilityInfo.WindowSize } 3620 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3621 * @atomicservice 3622 * @since 11 3623 */ 3624 export type WindowSize = _AbilityInfo.WindowSize; 3625 3626 /** 3627 * Obtains extension information about a bundle. 3628 * 3629 * @typedef { _ExtensionAbilityInfo.ExtensionAbilityInfo } 3630 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3631 * @since 9 3632 */ 3633 /** 3634 * Obtains extension information about a bundle. 3635 * 3636 * @typedef { _ExtensionAbilityInfo.ExtensionAbilityInfo } 3637 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3638 * @atomicservice 3639 * @since 11 3640 */ 3641 export type ExtensionAbilityInfo = _ExtensionAbilityInfo.ExtensionAbilityInfo; 3642 3643 /** 3644 * Indicates the defined permission details in file config.json. 3645 * 3646 * @typedef { _PermissionDef } 3647 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3648 * @systemapi 3649 * @since 9 3650 */ 3651 export type PermissionDef = _PermissionDef; 3652 3653 /** 3654 * Contains basic Ability information, which uniquely identifies an ability. 3655 * 3656 * @typedef { _ElementName } 3657 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3658 * @since 9 3659 */ 3660 /** 3661 * Contains basic Ability information, which uniquely identifies an ability. 3662 * 3663 * @typedef { _ElementName } 3664 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3665 * @atomicservice 3666 * @since 11 3667 */ 3668 export type ElementName = _ElementName; 3669 3670 /** 3671 * Contains shared bundle info. 3672 * 3673 * @typedef { _SharedBundleInfo } 3674 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3675 * @systemapi 3676 * @since 10 3677 */ 3678 export type SharedBundleInfo = _SharedBundleInfo; 3679 3680 /** 3681 * Obtains profile file information about a bundle. 3682 * 3683 * @typedef { _AppProvisionInfo.AppProvisionInfo } 3684 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3685 * @systemapi 3686 * @since 10 3687 */ 3688 export type AppProvisionInfo = _AppProvisionInfo.AppProvisionInfo; 3689 3690 /** 3691 * Obtains profile file validity about a bundle. 3692 * 3693 * @typedef { _AppProvisionInfo.Validity } 3694 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3695 * @systemapi 3696 * @since 10 3697 */ 3698 export type Validity = _AppProvisionInfo.Validity; 3699 3700 /** 3701 * Obtains information about a recoverable preinstalled application. 3702 * 3703 * @typedef { _RecoverableApplicationInfo } 3704 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3705 * @systemapi 3706 * @since 11 3707 */ 3708 export type RecoverableApplicationInfo = _RecoverableApplicationInfo; 3709 3710 /** 3711 * Obtains configuration information about an skill 3712 * 3713 * @typedef { _Skill.Skill } 3714 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3715 * @atomicservice 3716 * @since 12 3717 */ 3718 export type Skill = _Skill.Skill; 3719 3720 /** 3721 * Obtains configuration information about an skillUri 3722 * 3723 * @typedef { _Skill.SkillUri } 3724 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3725 * @atomicservice 3726 * @since 12 3727 */ 3728 export type SkillUrl = _Skill.SkillUri; 3729 3730 /** 3731 * Indicates the information of preinstalled application. 3732 * 3733 * @typedef { _PreinstalledApplicationInfo } 3734 * @syscap SystemCapability.BundleManager.BundleFramework.Core 3735 * @systemapi 3736 * @since 12 3737 */ 3738 export type PreinstalledApplicationInfo = _PreinstalledApplicationInfo; 3739} 3740 3741export default bundleManager; 3742