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