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