diff --git a/CODEOWNERS b/CODEOWNERS index b7c33947e016ffae77f0151419d9ab5b9f05cbe3..992063644bb1f3aecb056401021ea507a038d87f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -13,4 +13,11 @@ # any change to xxx_ipc_interface_code.h needs to be reviewed by @wang19954 interfaces/inner_api/appexecfwk_core/include/bundle_framework_core_ipc_interface_code.h @wang19954 -services/bundlemgr/include/bundle_framework_services_ipc_interface_code.h @wang19954 \ No newline at end of file +services/bundlemgr/include/bundle_framework_services_ipc_interface_code.h @wang19954 + +[BUNDLE MANAGER] +common/ @aafwk_ability +etc/ @aafwk_ability +interfaces/ @aafwk_ability +services/ @aafwk_ability +test/ @aafwk_ability \ No newline at end of file diff --git a/appexecfwk.gni b/appexecfwk.gni index 18a45d52033627e984ecea5048ad6726d9e6270b..edce6037249a41513fed38244434cdb494981589 100644 --- a/appexecfwk.gni +++ b/appexecfwk.gni @@ -53,7 +53,6 @@ declare_args() { bundle_framework_bundle_resource = true bundle_framework_form_dimension_2_3 = false bundle_framework_form_dimension_3_3 = false - bundle_framework_form_dimension_3_4 = false ability_runtime_enable = true account_enable = true diff --git a/bundle.json b/bundle.json index c321683c3307445b7ee59e9431ea2f97f61745b2..8568a6a53d7685db36de860e160f30f06ec34c54 100644 --- a/bundle.json +++ b/bundle.json @@ -28,8 +28,7 @@ "bundle_framework_sandbox_app", "bundle_framework_quick_fix", "bundle_framework_form_dimension_2_3", - "bundle_framework_form_dimension_3_3", - "bundle_framework_form_dimension_3_4" + "bundle_framework_form_dimension_3_3" ], "hisysevent_config": [ "//foundation/bundlemanager/bundle_framework/hisysevent.yaml", diff --git a/interfaces/inner_api/appexecfwk_base/BUILD.gn b/interfaces/inner_api/appexecfwk_base/BUILD.gn index b29b024697691a2f87f195bf4990253a4701e8cf..315fcc686cbcda0b7002ebb3f1a01d4aa72efce3 100644 --- a/interfaces/inner_api/appexecfwk_base/BUILD.gn +++ b/interfaces/inner_api/appexecfwk_base/BUILD.gn @@ -99,6 +99,7 @@ ohos_shared_library("appexecfwk_base") { "src/shared/shared_module_info.cpp", "src/shortcut_info.cpp", "src/skill.cpp", + "src/module_test_runner.cpp", ] public_configs = [ @@ -145,9 +146,6 @@ ohos_shared_library("appexecfwk_base") { if (bundle_framework_form_dimension_3_3) { defines += [ "FORM_DIMENSION_3_3" ] } - if (bundle_framework_form_dimension_3_4) { - defines += [ "FORM_DIMENSION_3_4" ] - } public_external_deps = [ "ability_base:base", diff --git a/interfaces/inner_api/appexecfwk_base/include/ability_info.h b/interfaces/inner_api/appexecfwk_base/include/ability_info.h index 40f85b6dd85e88e7447b6f114f4593d5b3fe2196..1bd83bede86996ad1406584f3bee40943fa2526f 100644 --- a/interfaces/inner_api/appexecfwk_base/include/ability_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/ability_info.h @@ -255,7 +255,7 @@ struct AbilityInfo : public Parcelable { std::string extensionTypeName; std::string srcPath; std::string srcLanguage = "js"; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; std::string process; std::string uri; diff --git a/interfaces/inner_api/appexecfwk_base/include/appexecfwk_errors.h b/interfaces/inner_api/appexecfwk_base/include/appexecfwk_errors.h index 62f8bae1aaf6b5444167845599a8c7a98649397c..4540eb1edd24f74907a2ab046b2739e1df5e49b7 100644 --- a/interfaces/inner_api/appexecfwk_base/include/appexecfwk_errors.h +++ b/interfaces/inner_api/appexecfwk_base/include/appexecfwk_errors.h @@ -626,6 +626,10 @@ enum { // ark startup cache ERR_APPEXECFWK_ARK_STARTUP_CACHE_ONLY_ALLOW_CREATE_APP_OR_ATOMIC = 8522591, ERR_APPEXECFWK_ARK_STARTUP_CACHE_ONLY_ALLOW_CREATE_IN_WHITE_LIST = 8522592, + + // ark white list + ERR_APPEXECFWK_INSTALL_ARK_RUNTIME_NOT_IN_ARK_WHITE_LIST = 8522630, + ERR_APPEXECFWK_INSTALL_ARK_RUNTIME_SIGNATURE_NOT_MATCH = 8522631, }; // Error code for Hidump diff --git a/interfaces/inner_api/appexecfwk_base/include/application_info.h b/interfaces/inner_api/appexecfwk_base/include/application_info.h index 2a23c18f87ae333d185b4fd1bfe130a8b1fe6d9e..8ce25fc7b373cd63ca5c6c073a928e7d4d8e0423 100644 --- a/interfaces/inner_api/appexecfwk_base/include/application_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/application_info.h @@ -329,7 +329,7 @@ struct ApplicationInfo : public Parcelable { std::string installSource; std::string configuration; - std::string codeLanguage; + std::string arkTSMode; Resource iconResource; Resource labelResource; Resource descriptionResource; diff --git a/interfaces/inner_api/appexecfwk_base/include/bundle_constants.h b/interfaces/inner_api/appexecfwk_base/include/bundle_constants.h index 5d4e5813e206408b070678bf1d258c6a522f34a7..542332f6e24646b39d8e88d374bf68c35e9c383e 100644 --- a/interfaces/inner_api/appexecfwk_base/include/bundle_constants.h +++ b/interfaces/inner_api/appexecfwk_base/include/bundle_constants.h @@ -184,11 +184,11 @@ constexpr const char* VERIFY_UNINSTALL_RULE_VALUE = "true"; constexpr const char* SUPPORT_APP_TYPES_SEPARATOR = ","; constexpr const char* APP_DISTRIBUTION_TYPE_WHITE_LIST = "appDistributionTypeWhiteList"; -constexpr const char* CODE_LANGUAGE = "codeLanguage"; -constexpr const char* ABILITY_STAGE_CODE_LANGUAGE = "abilityStageCodeLanguage"; -constexpr const char* CODE_LANGUAGE_1_1 = "1.1"; -constexpr const char* CODE_LANGUAGE_1_2 = "1.2"; -constexpr const char* CODE_LANGUAGE_HYBRID = "hybrid"; +constexpr const char* ARKTS_MODE = "arkTSMode"; +constexpr const char* MODULE_ARKTS_MODE = "moduleArkTSMode"; +constexpr const char* ARKTS_MODE_DYNAMIC = "dynamic"; +constexpr const char* ARKTS_MODE_STATIC = "static"; +constexpr const char* ARKTS_MODE_HYBRID = "hybrid"; } // namespace Constants } // namespace AppExecFwk } // namespace OHOS diff --git a/interfaces/inner_api/appexecfwk_base/include/extension_ability_info.h b/interfaces/inner_api/appexecfwk_base/include/extension_ability_info.h index 21a5c7c0d92d1abed89c979e20174a9711887575..35e30b0f4557a72ff9905966bbe5312fa117832f 100644 --- a/interfaces/inner_api/appexecfwk_base/include/extension_ability_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/extension_ability_info.h @@ -183,7 +183,7 @@ struct ExtensionAbilityInfo : public Parcelable { std::string hapPath; std::string process; std::string customProcess; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; std::vector permissions; std::vector appIdentifierAllowList; std::vector metadata; diff --git a/interfaces/inner_api/appexecfwk_base/include/hap_module_info.h b/interfaces/inner_api/appexecfwk_base/include/hap_module_info.h index c6a2602837795f0cb038f476375b66057318ad26..6b2b74e13afb472e1733567308f261cafc1a1716 100644 --- a/interfaces/inner_api/appexecfwk_base/include/hap_module_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/hap_module_info.h @@ -168,8 +168,8 @@ struct HapModuleInfo : public Parcelable { std::string appStartup; std::string formExtensionModule; std::string formWidgetModule; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; - std::string abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; // quick fix hqf info HqfInfo hqfInfo; diff --git a/interfaces/inner_api/appexecfwk_base/include/module_test_runner.h b/interfaces/inner_api/appexecfwk_base/include/module_test_runner.h new file mode 100644 index 0000000000000000000000000000000000000000..7d7f321e05a407942f353127c7c8f601715d52ab --- /dev/null +++ b/interfaces/inner_api/appexecfwk_base/include/module_test_runner.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_MODULE_TEST_RUNNER_H +#define FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_MODULE_TEST_RUNNER_H + +#include + +#include "parcel.h" + +namespace OHOS { +namespace AppExecFwk { +struct ModuleTestRunner : public Parcelable { + std::string name; + std::string srcPath; + std::string arkTSMode; + bool ReadFromParcel(Parcel &parcel); + virtual bool Marshalling(Parcel &parcel) const override; + static ModuleTestRunner *Unmarshalling(Parcel &parcel); + std::string ToString() const; +}; +} // namespace AppExecFwk +} // namespace OHOS +#endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_BASE_INCLUDE_MODULE_TEST_RUNNER_H + \ No newline at end of file diff --git a/interfaces/inner_api/appexecfwk_base/include/plugin/plugin_module_info.h b/interfaces/inner_api/appexecfwk_base/include/plugin/plugin_module_info.h index 6046108144ad504ca45850408b23f4b698fa034d..25ecf275785fc7100b96a36bb9fbfd875e0eaf97 100644 --- a/interfaces/inner_api/appexecfwk_base/include/plugin/plugin_module_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/plugin/plugin_module_info.h @@ -19,6 +19,7 @@ #include #include +#include "bundle_constants.h" #include "parcel.h" namespace OHOS { @@ -34,6 +35,7 @@ struct PluginModuleInfo : public Parcelable { std::string hapPath; std::string cpuAbi; std::string nativeLibraryPath; + std::string moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; std::vector nativeLibraryFileNames; bool ReadFromParcel(Parcel &parcel); diff --git a/interfaces/inner_api/appexecfwk_base/include/shared/base_shared_bundle_info.h b/interfaces/inner_api/appexecfwk_base/include/shared/base_shared_bundle_info.h index 586e013951314a1399a539c07ea25c92c4a92b4f..8b8a0f1ca837ccc7dac0df1a335283b53e32c43a 100644 --- a/interfaces/inner_api/appexecfwk_base/include/shared/base_shared_bundle_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/shared/base_shared_bundle_info.h @@ -19,6 +19,7 @@ #include #include +#include "bundle_constants.h" #include "parcel.h" namespace OHOS { @@ -30,6 +31,7 @@ struct BaseSharedBundleInfo : public Parcelable { std::string moduleName; std::string nativeLibraryPath; std::string hapPath; + std::string moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; std::vector nativeLibraryFileNames; bool ReadFromParcel(Parcel &parcel); diff --git a/interfaces/inner_api/appexecfwk_base/include/shared/shared_module_info.h b/interfaces/inner_api/appexecfwk_base/include/shared/shared_module_info.h index 5647620653bc67f48ecf85b44a98ef819d3c3afa..17e0ca570f2ab7f1954f09ea98a040dd353ff952 100644 --- a/interfaces/inner_api/appexecfwk_base/include/shared/shared_module_info.h +++ b/interfaces/inner_api/appexecfwk_base/include/shared/shared_module_info.h @@ -19,6 +19,7 @@ #include #include +#include "bundle_constants.h" #include "parcel.h" namespace OHOS { @@ -33,6 +34,7 @@ struct SharedModuleInfo : public Parcelable { std::string hapPath; std::string cpuAbi; std::string nativeLibraryPath; + std::string moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; std::vector nativeLibraryFileNames; bool ReadFromParcel(Parcel &parcel); diff --git a/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp index 18c1a52e9c80c4754e55c2d33d585754af6d1dfa..3ed515f7ec684d01e38d8cccf2731459e127bfb2 100644 --- a/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/ability_info.cpp @@ -142,7 +142,7 @@ bool AbilityInfo::ReadFromParcel(Parcel &parcel) launchMode = static_cast(parcel.ReadInt32()); srcPath = Str16ToStr8(parcel.ReadString16()); srcLanguage = Str16ToStr8(parcel.ReadString16()); - codeLanguage = parcel.ReadString(); + arkTSMode = parcel.ReadString(); int32_t permissionsSize; READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, permissionsSize); @@ -379,7 +379,7 @@ bool AbilityInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, static_cast(launchMode)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(srcPath)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(srcLanguage)); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, arkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, permissions.size()); for (auto &permission : permissions) { WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(permission)); @@ -655,7 +655,7 @@ void to_json(nlohmann::json &jsonObject, const AbilityInfo &abilityInfo) {JSON_KEY_LAUNCH_MODE, abilityInfo.launchMode}, {JSON_KEY_SRC_PATH, abilityInfo.srcPath}, {JSON_KEY_SRC_LANGUAGE, abilityInfo.srcLanguage}, - {Constants::CODE_LANGUAGE, abilityInfo.codeLanguage}, + {Constants::ARKTS_MODE, abilityInfo.arkTSMode}, {JSON_KEY_PERMISSIONS, abilityInfo.permissions}, {JSON_KEY_PROCESS, abilityInfo.process}, {JSON_KEY_DEVICE_TYPES, abilityInfo.deviceTypes}, @@ -923,8 +923,8 @@ void from_json(const nlohmann::json &jsonObject, AbilityInfo &abilityInfo) parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - abilityInfo.codeLanguage, + Constants::ARKTS_MODE, + abilityInfo.arkTSMode, false, parseResult); GetValueIfFindKey>(jsonObject, diff --git a/interfaces/inner_api/appexecfwk_base/src/application_info.cpp b/interfaces/inner_api/appexecfwk_base/src/application_info.cpp index fd91d5b670600b5bfb22571de42fcd1d50c67953..f01589c671abb907753a55c2829a6232b83266df 100644 --- a/interfaces/inner_api/appexecfwk_base/src/application_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/application_info.cpp @@ -601,7 +601,7 @@ bool ApplicationInfo::ReadFromParcel(Parcel &parcel) installSource = Str16ToStr8(parcel.ReadString16()); configuration = Str16ToStr8(parcel.ReadString16()); - codeLanguage = parcel.ReadString(); + arkTSMode = parcel.ReadString(); cloudFileSyncEnabled = parcel.ReadBool(); applicationFlags = parcel.ReadInt32(); ubsanEnabled = parcel.ReadBool(); @@ -788,7 +788,7 @@ bool ApplicationInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(installSource)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(configuration)); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, arkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, cloudFileSyncEnabled); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, applicationFlags); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, ubsanEnabled); @@ -1045,7 +1045,7 @@ void to_json(nlohmann::json &jsonObject, const ApplicationInfo &applicationInfo) {APPLICATION_APP_INDEX, applicationInfo.appIndex}, {APPLICATION_INSTALL_SOURCE, applicationInfo.installSource}, {APPLICATION_CONFIGURATION, applicationInfo.configuration}, - {Constants::CODE_LANGUAGE, applicationInfo.codeLanguage}, + {Constants::ARKTS_MODE, applicationInfo.arkTSMode}, {APPLICATION_CLOUD_FILE_SYNC_ENABLED, applicationInfo.cloudFileSyncEnabled}, {APPLICATION_APPLICATION_FLAGS, applicationInfo.applicationFlags}, {APPLICATION_UBSAN_ENABLED, applicationInfo.ubsanEnabled}, @@ -1261,8 +1261,8 @@ void from_json(const nlohmann::json &jsonObject, ApplicationInfo &applicationInf applicationInfo.hwasanEnabled, false, parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, APPLICATION_CONFIGURATION, applicationInfo.configuration, false, parseResult); - BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, Constants::CODE_LANGUAGE, - applicationInfo.codeLanguage, false, parseResult); + BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, Constants::ARKTS_MODE, + applicationInfo.arkTSMode, false, parseResult); BMSJsonUtil::GetBoolValueIfFindKey(jsonObject, jsonObjectEnd, APPLICATION_CLOUD_FILE_SYNC_ENABLED, applicationInfo.cloudFileSyncEnabled, false, parseResult); GetValueIfFindKey(jsonObject, jsonObjectEnd, APPLICATION_APPLICATION_FLAGS, diff --git a/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp b/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp index 305ec044d19258fedcac430d1d0f336e3e97c819..1ae999fc271950ce102016b18f30b40167899778 100644 --- a/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/extension_ability_info.cpp @@ -278,7 +278,7 @@ bool ExtensionAbilityInfo::ReadFromParcel(Parcel &parcel) dataGroupIds.emplace_back(Str16ToStr8(parcel.ReadString16())); } customProcess = Str16ToStr8(parcel.ReadString16()); - codeLanguage = parcel.ReadString(); + arkTSMode = parcel.ReadString(); return true; } @@ -369,7 +369,7 @@ bool ExtensionAbilityInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(dataGroupId)); } WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(customProcess)); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, arkTSMode); return true; } @@ -411,7 +411,7 @@ void to_json(nlohmann::json &jsonObject, const ExtensionAbilityInfo &extensionIn {JSON_KEY_VALID_DATA_GROUP_IDS, extensionInfo.validDataGroupIds}, {JSON_KEY_CUSTOM_PROCESS, extensionInfo.customProcess}, {JSON_KEY_ISOLATION_PROCESS, extensionInfo.isolationProcess}, - {Constants::CODE_LANGUAGE, extensionInfo.codeLanguage} + {Constants::ARKTS_MODE, extensionInfo.arkTSMode} }; } @@ -656,8 +656,8 @@ void from_json(const nlohmann::json &jsonObject, ExtensionAbilityInfo &extension parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - extensionInfo.codeLanguage, + Constants::ARKTS_MODE, + extensionInfo.arkTSMode, false, parseResult); diff --git a/interfaces/inner_api/appexecfwk_base/src/extension_form_profile.cpp b/interfaces/inner_api/appexecfwk_base/src/extension_form_profile.cpp index d37b5a9f97b2362b2723b169de4bd90e345249e5..1a85f8718740d1f33f7e416c4bbf7b8ef77e0969 100644 --- a/interfaces/inner_api/appexecfwk_base/src/extension_form_profile.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/extension_form_profile.cpp @@ -37,9 +37,6 @@ const int8_t DIMENSION_2_3 = 8; #ifndef FORM_DIMENSION_3_3 const int8_t DIMENSION_3_3 = 9; #endif -#ifndef FORM_DIMENSION_3_4 -const int8_t DIMENSION_3_4 = 10; -#endif constexpr const char* FORM_COLOR_MODE_MAP_KEY[] = { "auto", "dark", @@ -545,13 +542,6 @@ void supportFormDimension(std::set &supportDimensionSet, const Extensio } #endif - #ifndef FORM_DIMENSION_3_4 - if (dimensionItem == DIMENSION_3_4) { - APP_LOGW("dimension invalid in TV Device form %{public}d", dimensionItem); - continue; - } - #endif - supportDimensionSet.emplace(dimensionItem); } } diff --git a/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp b/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp index b6e91bf1ef04814d91539d315def4c3c24cecf65..b46b5eb4d7dca6d94a7acb95b20e204293626e99 100644 --- a/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/hap_module_info.cpp @@ -511,8 +511,8 @@ bool HapModuleInfo::ReadFromParcel(Parcel &parcel) appStartup = Str16ToStr8(parcel.ReadString16()); formExtensionModule = Str16ToStr8(parcel.ReadString16()); formWidgetModule = Str16ToStr8(parcel.ReadString16()); - codeLanguage = parcel.ReadString(); - abilityStageCodeLanguage = parcel.ReadString(); + moduleArkTSMode = parcel.ReadString(); + arkTSMode = parcel.ReadString(); int32_t reqCapabilitiesSize; READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, reqCapabilitiesSize); @@ -724,8 +724,8 @@ bool HapModuleInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(appStartup)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(formExtensionModule)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(formWidgetModule)); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, abilityStageCodeLanguage); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, arkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, reqCapabilities.size()); for (auto &reqCapability : reqCapabilities) { @@ -895,8 +895,8 @@ void to_json(nlohmann::json &jsonObject, const HapModuleInfo &hapModuleInfo) {HAP_MODULE_INFO_FORM_EXTENSION_MODULE, hapModuleInfo.formExtensionModule}, {HAP_MODULE_INFO_FORM_WIDGET_MODULE, hapModuleInfo.formWidgetModule}, {HAP_MODULE_INFO_HAS_INTENT, hapModuleInfo.hasIntent}, - {Constants::CODE_LANGUAGE, hapModuleInfo.codeLanguage}, - {Constants::ABILITY_STAGE_CODE_LANGUAGE, hapModuleInfo.abilityStageCodeLanguage} + {Constants::MODULE_ARKTS_MODE, hapModuleInfo.moduleArkTSMode}, + {Constants::ARKTS_MODE, hapModuleInfo.arkTSMode} }; } @@ -1352,14 +1352,14 @@ void from_json(const nlohmann::json &jsonObject, HapModuleInfo &hapModuleInfo) parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - hapModuleInfo.codeLanguage, + Constants::MODULE_ARKTS_MODE, + hapModuleInfo.moduleArkTSMode, false, parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::ABILITY_STAGE_CODE_LANGUAGE, - hapModuleInfo.abilityStageCodeLanguage, + Constants::ARKTS_MODE, + hapModuleInfo.arkTSMode, false, parseResult); if (parseResult != ERR_OK) { diff --git a/interfaces/inner_api/appexecfwk_base/src/module_test_runner.cpp b/interfaces/inner_api/appexecfwk_base/src/module_test_runner.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b0a11779b93c8e823d5b48e5b1c959e25c1786e --- /dev/null +++ b/interfaces/inner_api/appexecfwk_base/src/module_test_runner.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "module_test_runner.h" + +#include "app_log_wrapper.h" +#include "parcel_macro.h" +#include "string_ex.h" + +namespace OHOS { +namespace AppExecFwk { +bool ModuleTestRunner::ReadFromParcel(Parcel &parcel) +{ + name = Str16ToStr8(parcel.ReadString16()); + srcPath = Str16ToStr8(parcel.ReadString16()); + arkTSMode = Str16ToStr8(parcel.ReadString16()); + return true; +} + +bool ModuleTestRunner::Marshalling(Parcel &parcel) const +{ + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(name)); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(srcPath)); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(arkTSMode)); + return true; +} + +ModuleTestRunner *ModuleTestRunner::Unmarshalling(Parcel &parcel) +{ + ModuleTestRunner *testRunner = new (std::nothrow) ModuleTestRunner(); + if (testRunner && !testRunner->ReadFromParcel(parcel)) { + APP_LOGW("read from parcel failed"); + delete testRunner; + testRunner = nullptr; + } + return testRunner; +} + +std::string ModuleTestRunner::ToString() const +{ + return "[ name = " + name + + ", srcPath = " + srcPath + + ", arkTSMode = " + arkTSMode + + "]"; +} +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/inner_api/appexecfwk_base/src/plugin/plugin_module_info.cpp b/interfaces/inner_api/appexecfwk_base/src/plugin/plugin_module_info.cpp index 3e3d979ec7d35178998e622dd25554ebd6fd2e51..376b8032265848688db174b18337ea08b43e8e95 100644 --- a/interfaces/inner_api/appexecfwk_base/src/plugin/plugin_module_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/plugin/plugin_module_info.cpp @@ -48,6 +48,7 @@ bool PluginModuleInfo::ReadFromParcel(Parcel &parcel) cpuAbi = parcel.ReadString(); nativeLibraryPath = parcel.ReadString(); packageName = parcel.ReadString(); + moduleArkTSMode = parcel.ReadString(); int32_t nativeLibraryFileNamesSize; READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, nativeLibraryFileNamesSize); CONTAINER_SECURITY_VERIFY(parcel, nativeLibraryFileNamesSize, &nativeLibraryFileNames); @@ -68,6 +69,7 @@ bool PluginModuleInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, cpuAbi); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, nativeLibraryPath); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, packageName); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, nativeLibraryFileNames.size()); for (auto &fileName : nativeLibraryFileNames) { WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, fileName); @@ -99,6 +101,7 @@ void to_json(nlohmann::json &jsonObject, const PluginModuleInfo &pluginModuleInf {PLUGIN_MODULE_INFO_COMPRESS_NATIVE_LIBS, pluginModuleInfo.compressNativeLibs}, {PLUGIN_MODULE_INFO_IS_LIB_ISOLATED, pluginModuleInfo.isLibIsolated}, {PLUGIN_MODULE_INFO_PACKAGE_NAME, pluginModuleInfo.packageName}, + {Constants::MODULE_ARKTS_MODE, pluginModuleInfo.moduleArkTSMode} }; } @@ -138,6 +141,9 @@ void from_json(const nlohmann::json &jsonObject, PluginModuleInfo &pluginModuleI BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, PLUGIN_MODULE_INFO_PACKAGE_NAME, pluginModuleInfo.packageName, false, parseResult); + BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, + Constants::MODULE_ARKTS_MODE, + pluginModuleInfo.moduleArkTSMode, false, parseResult); if (parseResult != ERR_OK) { APP_LOGE("read pluginModuleInfo error : %{public}d", parseResult); } diff --git a/interfaces/inner_api/appexecfwk_base/src/shared/base_shared_bundle_info.cpp b/interfaces/inner_api/appexecfwk_base/src/shared/base_shared_bundle_info.cpp index a1f108925125c094d7aa18cd411fc9d9221ac8e2..f621237040dc30d864e8a047ae96a36850e1f5d3 100644 --- a/interfaces/inner_api/appexecfwk_base/src/shared/base_shared_bundle_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/shared/base_shared_bundle_info.cpp @@ -30,6 +30,7 @@ bool BaseSharedBundleInfo::ReadFromParcel(Parcel &parcel) versionCode = parcel.ReadUint32(); nativeLibraryPath = Str16ToStr8(parcel.ReadString16()); hapPath = Str16ToStr8(parcel.ReadString16()); + moduleArkTSMode = parcel.ReadString(); compressNativeLibs = parcel.ReadBool(); int32_t nativeLibraryFileNamesSize; READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, nativeLibraryFileNamesSize); @@ -47,6 +48,7 @@ bool BaseSharedBundleInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, versionCode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(nativeLibraryPath)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(hapPath)); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, compressNativeLibs); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, nativeLibraryFileNames.size()); for (auto &fileName : nativeLibraryFileNames) { diff --git a/interfaces/inner_api/appexecfwk_base/src/shared/shared_module_info.cpp b/interfaces/inner_api/appexecfwk_base/src/shared/shared_module_info.cpp index c6b2713d8d6fd267f9945a31628419eeec0b2463..7e96da0dc7496093e246f3c6c1a3d80e3a3356c0 100644 --- a/interfaces/inner_api/appexecfwk_base/src/shared/shared_module_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/shared/shared_module_info.cpp @@ -47,6 +47,7 @@ bool SharedModuleInfo::ReadFromParcel(Parcel &parcel) hapPath = Str16ToStr8(parcel.ReadString16()); cpuAbi = Str16ToStr8(parcel.ReadString16()); nativeLibraryPath = Str16ToStr8(parcel.ReadString16()); + moduleArkTSMode = parcel.ReadString(); int32_t nativeLibraryFileNamesSize; READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, nativeLibraryFileNamesSize); CONTAINER_SECURITY_VERIFY(parcel, nativeLibraryFileNamesSize, &nativeLibraryFileNames); @@ -67,6 +68,7 @@ bool SharedModuleInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(hapPath)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(cpuAbi)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(nativeLibraryPath)); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Int32, parcel, nativeLibraryFileNames.size()); for (auto &fileName : nativeLibraryFileNames) { WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(fileName)); @@ -97,7 +99,8 @@ void to_json(nlohmann::json &jsonObject, const SharedModuleInfo &sharedModuleInf {SHARED_MODULE_INFO_HAP_PATH, sharedModuleInfo.hapPath}, {SHARED_MODULE_INFO_CPU_ABI, sharedModuleInfo.cpuAbi}, {SHARED_MODULE_INFO_NATIVE_LIBRARY_PATH, sharedModuleInfo.nativeLibraryPath}, - {SHARED_MODULE_INFO_NATIVE_LIBRARY_FILE_NAMES, sharedModuleInfo.nativeLibraryFileNames} + {SHARED_MODULE_INFO_NATIVE_LIBRARY_FILE_NAMES, sharedModuleInfo.nativeLibraryFileNames}, + {Constants::MODULE_ARKTS_MODE, sharedModuleInfo.moduleArkTSMode} }; } @@ -134,6 +137,9 @@ void from_json(const nlohmann::json &jsonObject, SharedModuleInfo &sharedModuleI BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, SHARED_MODULE_INFO_NATIVE_LIBRARY_PATH, sharedModuleInfo.nativeLibraryPath, false, parseResult); + BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, + Constants::MODULE_ARKTS_MODE, + sharedModuleInfo.moduleArkTSMode, false, parseResult); GetValueIfFindKey>(jsonObject, jsonObjectEnd, SHARED_MODULE_INFO_NATIVE_LIBRARY_FILE_NAMES, sharedModuleInfo.nativeLibraryFileNames, JsonType::ARRAY, false, parseResult, diff --git a/interfaces/inner_api/appexecfwk_core/include/bundle_framework_core_ipc_interface_code.h b/interfaces/inner_api/appexecfwk_core/include/bundle_framework_core_ipc_interface_code.h index 6505aed18c20eba8d48818f3ce2949ff0ec667e0..acdfc6590795a25f4265846de1c6f04c60f860fd 100644 --- a/interfaces/inner_api/appexecfwk_core/include/bundle_framework_core_ipc_interface_code.h +++ b/interfaces/inner_api/appexecfwk_core/include/bundle_framework_core_ipc_interface_code.h @@ -221,6 +221,7 @@ enum class BundleMgrInterfaceCode : uint32_t { BATCH_GET_ADDITIONAL_INFO = 195, BATCH_GET_BUNDLE_STATS = 196, GET_SHORTCUT_INFO_BY_APPINDEX = 197, + GET_TEST_RUNNER = 198, }; /* SAID: 401-85 Interface No.85 subservice also provides the following interfaces */ diff --git a/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h b/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h index 1d940bb76ef7f88cb7872931cabf2f6223c95629..8de873cb49afccbcd66755678ba5564ac3284b3f 100644 --- a/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h +++ b/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h @@ -915,6 +915,7 @@ private: ErrCode HandleGreatOrEqualTargetAPIVersion(MessageParcel &data, MessageParcel &reply); ErrCode HandleSetShortcutVisibleForSelf(MessageParcel &data, MessageParcel &reply); ErrCode HandleGetAllShortcutInfoForSelf(MessageParcel &data, MessageParcel &reply); + ErrCode HandleGetTestRunner(MessageParcel &data, MessageParcel &reply); private: /** * @brief Write a parcelabe vector objects to the proxy node. diff --git a/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h b/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h index 9fb263296e76bcf59a64078ea3bddc39e7503ab8..0a837596b7dc0b81e11f6670d02ea2fad5787cc2 100644 --- a/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h +++ b/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h @@ -46,6 +46,7 @@ #include "distributed_bundle_info.h" #include "form_info.h" #include "hap_module_info.h" +#include "module_test_runner.h" #include "permission_define.h" #include "preinstalled_application_info.h" #include "process_cache_callback_interface.h" @@ -1827,6 +1828,12 @@ public: { return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; } + + virtual ErrCode GetTestRunner(const std::string &bundleName, const std::string &moduleName, + ModuleTestRunner &testRunner) + { + return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; + } }; #define WRITE_PARCEL(func) \ diff --git a/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h b/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h index ece541e8d2b0876edd883eb7c3dc792624b15043..b30b7eeb3ada98813787e8b850bcc3b5bf45c27d 100644 --- a/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h +++ b/interfaces/inner_api/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h @@ -1245,6 +1245,9 @@ public: virtual bool GreatOrEqualTargetAPIVersion(const int32_t platformVersion, const int32_t minorVersion, const int32_t patchVersion) override; + + virtual ErrCode GetTestRunner(const std::string &bundleName, const std::string &moduleName, + ModuleTestRunner &testRunner) override; private: /** * @brief Send a command message from the proxy object. diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp index 682a25889b1c0dab568e7c7501d3f7d59b1fac0b..e394e75625d8b43f08be889d255bc8d96235e5fa 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp @@ -701,6 +701,9 @@ int BundleMgrHost::OnRemoteRequest(uint32_t code, MessageParcel &data, MessagePa case static_cast(BundleMgrInterfaceCode::GREAT_OR_EQUAL_API_TARGET_VERSION): errCode = HandleGreatOrEqualTargetAPIVersion(data, reply); break; + case static_cast(BundleMgrInterfaceCode::GET_TEST_RUNNER): + errCode = HandleGetTestRunner(data, reply); + break; default : APP_LOGW("bundleMgr host receives unknown code %{public}u", code); return IPCObjectStub::OnRemoteRequest(code, data, reply, option); @@ -4875,5 +4878,28 @@ ErrCode BundleMgrHost::HandleGreatOrEqualTargetAPIVersion(MessageParcel &data, M } return ERR_OK; } + +ErrCode BundleMgrHost::HandleGetTestRunner(MessageParcel &data, MessageParcel &reply) +{ + HITRACE_METER_NAME_EX(HITRACE_LEVEL_INFO, HITRACE_TAG_APP, __PRETTY_FUNCTION__, nullptr); + std::string bundleName = data.ReadString(); + std::string moduleName = data.ReadString(); + if (bundleName.empty() || moduleName.empty()) { + APP_LOGE("bundleName or moduleName is empty"); + return ERR_BUNDLE_MANAGER_PARAM_ERROR; + } + APP_LOGD("-n %{public}s, -m %{public}s", bundleName.c_str(), moduleName.c_str()); + ModuleTestRunner testRunner; + auto ret = GetTestRunner(bundleName, moduleName, testRunner); + if (!reply.WriteInt32(ret)) { + APP_LOGE("write failed"); + return ERR_APPEXECFWK_PARCEL_ERROR; + } + if (ret == ERR_OK) { + reply.SetDataCapacity(Constants::CAPACITY_SIZE); + return WriteParcelInfoIntelligent(testRunner, reply); + } + return ERR_OK; +} } // namespace AppExecFwk } // namespace OHOS diff --git a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp index 5f4937e3eb9f56a2a73818a8db9070a7ba6bb13b..831d159909571410301305c7e27ebff506a17266 100644 --- a/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp +++ b/interfaces/inner_api/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp @@ -6374,5 +6374,40 @@ bool BundleMgrProxy::GreatOrEqualTargetAPIVersion(const int32_t platformVersion, } return reply.ReadBool(); } + +ErrCode BundleMgrProxy::GetTestRunner( + const std::string &bundleName, const std::string &moduleName, ModuleTestRunner &testRunner) +{ + HITRACE_METER_NAME_EX(HITRACE_LEVEL_INFO, HITRACE_TAG_APP, __PRETTY_FUNCTION__, nullptr); + LOG_D(BMS_TAG_QUERY, "GetTestRunner -n %{public}s -m %{public}s", bundleName.c_str(), moduleName.c_str()); + if (bundleName.empty() || moduleName.empty()) { + LOG_NOFUNC_E(BMS_TAG_QUERY, "GetTestRunner failed -n %{public}s -m %{public}s", + bundleName.c_str(), moduleName.c_str()); + return ERR_BUNDLE_MANAGER_PARAM_ERROR; + } + + MessageParcel data; + if (!data.WriteInterfaceToken(GetDescriptor())) { + LOG_NOFUNC_E(BMS_TAG_QUERY, "GetTestRunner write InterfaceToken fail"); + return ERR_APPEXECFWK_PARCEL_ERROR; + } + if (!data.WriteString(bundleName)) { + LOG_NOFUNC_E(BMS_TAG_QUERY, "GetTestRunner write bundleName fail"); + return ERR_APPEXECFWK_PARCEL_ERROR; + } + if (!data.WriteString(moduleName)) { + LOG_NOFUNC_E(BMS_TAG_QUERY, "GetTestRunner write moduleName fail"); + return ERR_APPEXECFWK_PARCEL_ERROR; + } + + auto res = GetParcelInfoIntelligent( + BundleMgrInterfaceCode::GET_TEST_RUNNER, data, testRunner); + if (res != ERR_OK) { + LOG_NOFUNC_E(BMS_TAG_QUERY, "GetTestRunner failed -n %{public}s -m %{public}s error: %{public}d", + bundleName.c_str(), moduleName.c_str(), res); + return res; + } + return ERR_OK; +} } // namespace AppExecFwk } // namespace OHOS diff --git a/interfaces/kits/ani/BUILD.gn b/interfaces/kits/ani/BUILD.gn index 09533748d73ffc6f24b5743f52b7770af0b3f852..96db5c8429af2ddd3f504eb9f5295f809d8ac70c 100644 --- a/interfaces/kits/ani/BUILD.gn +++ b/interfaces/kits/ani/BUILD.gn @@ -20,20 +20,43 @@ group("ani_common") { group("ani_bms_packages") { deps = [ + "app_control:ani_app_control", + "app_control:app_control_etc", + "bundle_installer:ani_bundle_installer", + "bundle_installer:bundle_installer_etc", "bundle_manager:ability_info_etc", "bundle_manager:ani_bundle_manager", + "bundle_manager:app_provision_info_etc", "bundle_manager:application_info_etc", "bundle_manager:bundle_info_etc", "bundle_manager:bundle_manager_etc", "bundle_manager:extension_ability_info_etc", "bundle_manager:hap_module_info_etc", "bundle_manager:metadata_etc", + "bundle_manager:permission_def_etc", + "bundle_manager:plugin_bundle_info_etc", + "bundle_manager:recoverable_application_info_etc", + "bundle_manager:share_bundle_info_etc", "bundle_manager:skill_etc", + "bundle_monitor:ani_bundle_monitor", + "bundle_monitor:bundle_monitor_etc", + "default_app_manager:ani_default_app_manager", + "default_app_manager:default_app_manager_etc", + "freeInstall:ani_freeInstall", + "freeInstall:bundle_pack_info_etc", + "freeInstall:dispatch_info_etc", + "freeInstall:freeInstall_etc", "launcher_bundle_manager:ani_launcher_bundle_manager", + "launcher_bundle_manager:element_name_etc", + "launcher_bundle_manager:launcher_ability_info_etc", "launcher_bundle_manager:launcher_bundle_manager_etc", + "overlay:ani_overlay", + "overlay:overlay_etc", + "overlay:overlay_module_info_etc", "resource_manager:ani_bundle_res_manager", "resource_manager:bundle_resource_info_etc", "resource_manager:bundle_resource_manager_etc", + "resource_manager:launcher_ability_resource_info_etc", "shortcut_manager:ani_shortcut_manager", "shortcut_manager:shortcut_info_etc", "shortcut_manager:shortcut_manager_etc", diff --git a/interfaces/kits/ani/app_control/BUILD.gn b/interfaces/kits/ani/app_control/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..fd85e23f8fa5f893caf29550e7883d4b6dd72f74 --- /dev/null +++ b/interfaces/kits/ani/app_control/BUILD.gn @@ -0,0 +1,99 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") + +ohos_shared_library("ani_app_control") { + shlib_type = "ani" + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + + include_dirs = [ + "${inner_api_path}/appexecfwk_core/include", + "${kits_path}/ani/common", + "${kits_path}/js/common", + ] + + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + if (bundle_framework_app_control) { + sources = [ + "ani_app_control.cpp", + "ani_app_control_common.cpp", + ] + } else { + sources = [ "ani_app_control_unsupported.cpp" ] + } + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/common:bundle_napi_common", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + external_deps = [ + "ability_base:want", + "ability_runtime:ani_common", + "ability_runtime:runtime", + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_single", + "napi:ace_napi", + "runtime_core:ani", + "runtime_core:ani_helpers", + "samgr:samgr_proxy", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + +generate_static_abc("app_control") { + base_url = "./ets" + files = [ "./ets/@ohos.bundle.appControl.ets" ] + is_boot_abc = "True" + device_dst_file = "/system/framework/app_control.abc" +} + +ohos_prebuilt_etc("app_control_etc") { + source = "$target_out_dir/app_control.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":app_control" ] +} diff --git a/interfaces/kits/ani/app_control/ani_app_control.cpp b/interfaces/kits/ani/app_control/ani_app_control.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0eea1ee2af0121d1ab66f20f974cf598f59ae142 --- /dev/null +++ b/interfaces/kits/ani/app_control/ani_app_control.cpp @@ -0,0 +1,467 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "ani_app_control_common.h" +#include "ani_common_want.h" +#include "app_control_interface.h" +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "ipc_skeleton.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +using namespace OHOS::AAFwk; +namespace { +constexpr const char* NS_NAME_APPCONTROL = "@ohos.bundle.appControl.appControl"; +constexpr const char* PROPERTYNAME_APPID = "appId"; +constexpr const char* PROPERTYNAME_APPINDEX = "appIndex"; +constexpr const char* PROPERTYNAME_DISPOSEDRULE = "disposedRule"; +} // namespace + +static void AniSetDisposedStatus(ani_env* env, ani_string aniAppId, ani_object aniWant, ani_boolean aniIsSync) +{ + APP_LOGD("ani SetDisposedStatus called"); + std::string appId; + if (!CommonFunAni::ParseString(env, aniAppId, appId)) { + APP_LOGE("appId %{public}s invalid", appId.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); + return; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (appId.empty()) { + APP_LOGE("appId is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPID, + isSync ? SET_DISPOSED_STATUS_SYNC : SET_DISPOSED_STATUS, + isSync ? "" : PERMISSION_DISPOSED_STATUS); + return; + } + Want want; + if (!AniAppControlCommon::ParseWantWithoutVerification(env, aniWant, want)) { + APP_LOGE("want invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_WANT, TYPE_WANT); + return; + } + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? SET_DISPOSED_STATUS_SYNC : SET_DISPOSED_STATUS, + isSync ? "" : PERMISSION_DISPOSED_STATUS); + return; + } + + ErrCode ret = appControlProxy->SetDisposedStatus(appId, want); + if (ret != ERR_OK) { + APP_LOGE("SetDisposedStatus failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? SET_DISPOSED_STATUS_SYNC : SET_DISPOSED_STATUS, PERMISSION_DISPOSED_STATUS); + } +} + +static ani_object AniGetDisposedStatus(ani_env* env, ani_string aniAppId, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetDisposedStatus called"); + std::string appId; + if (!CommonFunAni::ParseString(env, aniAppId, appId)) { + APP_LOGE("appId %{public}s invalid", appId.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); + return nullptr; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (appId.empty()) { + APP_LOGE("appId is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPID, + isSync ? GET_DISPOSED_STATUS_SYNC : GET_DISPOSED_STATUS, + isSync ? "" : PERMISSION_DISPOSED_STATUS); + return nullptr; + } + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? GET_DISPOSED_STATUS_SYNC : GET_DISPOSED_STATUS, + isSync ? "" : PERMISSION_DISPOSED_STATUS); + return nullptr; + } + + Want want; + ErrCode ret = appControlProxy->GetDisposedStatus(appId, want); + if (ret != ERR_OK) { + APP_LOGE("GetDisposedStatusSync failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? GET_DISPOSED_STATUS_SYNC : GET_DISPOSED_STATUS, PERMISSION_DISPOSED_STATUS); + return nullptr; + } + + return CommonFunAni::ConvertWantInfo(env, want); +} + +static void AniDeleteDisposedStatus(ani_env* env, ani_string aniAppId, ani_int aniAppIndex, ani_boolean aniIsSync) +{ + APP_LOGD("ani DeleteDisposedStatus called"); + std::string appId; + if (!CommonFunAni::ParseString(env, aniAppId, appId)) { + APP_LOGE("appId %{public}s invalid", appId.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); + return; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (appId.empty()) { + APP_LOGE("appId is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPID, + isSync ? DELETE_DISPOSED_STATUS_SYNC : DELETE_DISPOSED_STATUS, + isSync ? "" : PERMISSION_DISPOSED_STATUS); + return; + } + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? DELETE_DISPOSED_STATUS_SYNC : DELETE_DISPOSED_STATUS, + isSync ? "" : PERMISSION_DISPOSED_STATUS); + return; + } + + ErrCode ret = ERR_OK; + if (aniAppIndex == Constants::MAIN_APP_INDEX) { + ret = appControlProxy->DeleteDisposedStatus(appId); + } else { + ret = appControlProxy->DeleteDisposedRuleForCloneApp(appId, aniAppIndex); + } + if (ret != ERR_OK) { + APP_LOGE("DeleteDisposedStatusSync failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? DELETE_DISPOSED_STATUS_SYNC : DELETE_DISPOSED_STATUS, PERMISSION_DISPOSED_STATUS); + } +} + +static ani_object AniGetDisposedRule(ani_env* env, ani_string aniAppId, ani_int aniAppIndex) +{ + APP_LOGD("ani GetDisposedRule called"); + std::string appId; + if (!CommonFunAni::ParseString(env, aniAppId, appId)) { + APP_LOGE("appId %{public}s invalid", appId.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); + return nullptr; + } + if (appId.empty()) { + APP_LOGE("appId is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPID, GET_DISPOSED_STATUS_SYNC, ""); + return nullptr; + } + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_DISPOSED_STATUS_SYNC, ""); + return nullptr; + } + + DisposedRule disposedRule; + ErrCode ret = ERR_OK; + if (aniAppIndex == Constants::MAIN_APP_INDEX) { + ret = appControlProxy->GetDisposedRule(appId, disposedRule); + } else { + ret = appControlProxy->GetDisposedRuleForCloneApp(appId, disposedRule, aniAppIndex); + } + if (ret != ERR_OK) { + APP_LOGE("GetDisposedRule failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_DISPOSED_STATUS_SYNC, PERMISSION_DISPOSED_STATUS); + return nullptr; + } + + return AniAppControlCommon::ConvertDisposedRule(env, disposedRule); +} + +static void AniSetDisposedRule(ani_env* env, ani_string aniAppId, ani_object aniRule, ani_int aniAppIndex) +{ + APP_LOGD("ani SetDisposedRule called"); + std::string appId; + if (!CommonFunAni::ParseString(env, aniAppId, appId)) { + APP_LOGE("appId %{public}s invalid", appId.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); + return; + } + if (appId.empty()) { + APP_LOGE("appId is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPID, SET_DISPOSED_RULE, ""); + return; + } + DisposedRule rule; + if (!AniAppControlCommon::ParseDisposedRule(env, aniRule, rule)) { + APP_LOGE("rule invalid!"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_RULE, DISPOSED_RULE_TYPE); + return; + } + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_DISPOSED_RULE, ""); + return; + } + + ErrCode ret = ERR_OK; + if (aniAppIndex == Constants::MAIN_APP_INDEX) { + ret = appControlProxy->SetDisposedRule(appId, rule); + } else { + ret = appControlProxy->SetDisposedRuleForCloneApp(appId, rule, aniAppIndex); + } + if (ret != ERR_OK) { + APP_LOGE("SetDisposedRule failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + SET_DISPOSED_RULE, PERMISSION_DISPOSED_STATUS); + } +} + +static void AniSetUninstallDisposedRule(ani_env* env, + ani_string aniAppIdentifier, ani_object aniRule, ani_int aniAppIndex) +{ + APP_LOGD("ani SetUninstallDisposedRule called"); + std::string appIdentifier; + if (!CommonFunAni::ParseString(env, aniAppIdentifier, appIdentifier)) { + APP_LOGE("appIdentifier %{public}s invalid", appIdentifier.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_IDENTIFIER, TYPE_STRING); + return; + } + if (appIdentifier.empty()) { + APP_LOGE("appIdentifier is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPIDENTIFIER, SET_UNINSTALL_DISPOSED_RULE, ""); + return; + } + UninstallDisposedRule rule; + if (!AniAppControlCommon::ParseUninstallDisposedRule(env, aniRule, rule)) { + APP_LOGE("rule invalid!"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, + UNINSTALL_DISPOSED_RULE, UNINSTALL_DISPOSED_RULE_TYPE); + return; + } + int32_t userId = Constants::UNSPECIFIED_USERID; + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_UNINSTALL_DISPOSED_RULE, ""); + return; + } + + ErrCode ret = appControlProxy->SetUninstallDisposedRule(appIdentifier, rule, aniAppIndex, userId); + if (ret != ERR_OK) { + APP_LOGE("SetUninstallDisposedRule failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + SET_UNINSTALL_DISPOSED_RULE, PERMISSION_DISPOSED_STATUS); + } +} + +static ani_object AniGetUninstallDisposedRule(ani_env* env, ani_string aniAppIdentifier, ani_int aniAppIndex) +{ + APP_LOGD("ani GetUninstallDisposedRule called"); + std::string appIdentifier; + if (!CommonFunAni::ParseString(env, aniAppIdentifier, appIdentifier)) { + APP_LOGE("appIdentifier %{public}s invalid", appIdentifier.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_IDENTIFIER, TYPE_STRING); + return nullptr; + } + if (appIdentifier.empty()) { + APP_LOGE("appIdentifier is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPIDENTIFIER, GET_UNINSTALL_DISPOSED_RULE, ""); + return nullptr; + } + int32_t userId = Constants::UNSPECIFIED_USERID; + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_UNINSTALL_DISPOSED_RULE, ""); + return nullptr; + } + + UninstallDisposedRule uninstallDisposedRule; + ErrCode ret = appControlProxy->GetUninstallDisposedRule(appIdentifier, aniAppIndex, userId, uninstallDisposedRule); + if (ret != ERR_OK) { + APP_LOGE("GetUninstallDisposedRule failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_UNINSTALL_DISPOSED_RULE, PERMISSION_DISPOSED_STATUS); + return nullptr; + } + + return AniAppControlCommon::ConvertUninstallDisposedRule(env, uninstallDisposedRule); +} + +static void AniDeleteUninstallDisposedRule(ani_env* env, ani_string aniAppIdentifier, ani_int aniAppIndex) +{ + APP_LOGD("ani DeleteUninstallDisposedRule called"); + std::string appIdentifier; + if (!CommonFunAni::ParseString(env, aniAppIdentifier, appIdentifier)) { + APP_LOGE("appIdentifier %{public}s invalid", appIdentifier.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_IDENTIFIER, TYPE_STRING); + return; + } + if (appIdentifier.empty()) { + APP_LOGE("appIdentifier is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPIDENTIFIER, DELETE_UNINSTALL_DISPOSED_RULE, ""); + return; + } + int32_t userId = Constants::UNSPECIFIED_USERID; + + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, DELETE_UNINSTALL_DISPOSED_RULE, ""); + return; + } + + ErrCode ret = appControlProxy->DeleteUninstallDisposedRule(appIdentifier, aniAppIndex, userId); + if (ret != ERR_OK) { + APP_LOGE("DeleteUninstallDisposedRule failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + DELETE_UNINSTALL_DISPOSED_RULE, PERMISSION_DISPOSED_STATUS); + } +} + +static bool ParseDisposedRuleConfiguration( + ani_env* env, ani_object object, DisposedRuleConfiguration& disposedRuleConfiguration) +{ + if (env == nullptr || object == nullptr) { + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_TYPE_CHECK_ERROR); + return false; + } + + // appId: string + ani_string appId = nullptr; + if (!CommonFunAni::CallGetter(env, object, PROPERTYNAME_APPID, &appId)) { + APP_LOGE("appId invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); + return false; + } + disposedRuleConfiguration.appId = CommonFunAni::AniStrToString(env, appId); + if (disposedRuleConfiguration.appId.empty()) { + APP_LOGE("appId empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPID, SET_DISPOSED_RULES, ""); + return false; + } + + // appIndex: int + ani_int appIndex = Constants::MAIN_APP_INDEX; + if (!CommonFunAni::CallGetter(env, object, PROPERTYNAME_APPINDEX, &appIndex)) { + APP_LOGE("appIndex invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_INDEX, TYPE_NUMBER); + return false; + } + if (appIndex < Constants::MAIN_APP_INDEX || appIndex > Constants::CLONE_APP_INDEX_MAX) { + APP_LOGE("appIndex invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPINDEX, SET_DISPOSED_RULES, ""); + return false; + } + disposedRuleConfiguration.appIndex = appIndex; + + // disposedRule: DisposedRule + ani_object disposedRuleObject = nullptr; + if (!CommonFunAni::CallGetter(env, object, PROPERTYNAME_DISPOSEDRULE, &disposedRuleObject) || + !AniAppControlCommon::ParseDisposedRule(env, disposedRuleObject, disposedRuleConfiguration.disposedRule)) { + APP_LOGE("disposedRule invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_RULE, DISPOSED_RULE_TYPE); + return false; + } + return true; +} + +static void SetDisposedRules(ani_env* env, ani_object aniDisposedRuleConfigurations) +{ + APP_LOGD("ani SetDisposedRules called"); + std::vector disposedRuleConfigurations; + if (!CommonFunAni::ParseAniArray(env, aniDisposedRuleConfigurations, disposedRuleConfigurations, + ParseDisposedRuleConfiguration)) { + APP_LOGE("Parse disposedRuleConfigurations invalid"); + return; + } + uint32_t arrayLength = disposedRuleConfigurations.size(); + if (arrayLength == 0 || arrayLength > MAX_VECTOR_NUM) { + APP_LOGE("disposedRuleConfigurations length invalid!"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_LENGTH_ERROR); + return; + } + auto appControlProxy = CommonFunc::GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("appControlProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_DISPOSED_RULES, ""); + return; + } + + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + ErrCode ret = appControlProxy->SetDisposedRules(disposedRuleConfigurations, userId); + if (ret != ERR_OK) { + APP_LOGE("SetDisposedRules failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, CommonFunc::ConvertErrCode(ret), SET_DISPOSED_RULES, PERMISSION_DISPOSED_STATUS); + } +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor appControl called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = + arkts::ani_signature::Builder::BuildNamespace(NS_NAME_APPCONTROL); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_APPCONTROL, status); + return status; + } + + std::array methods = { + ani_native_function { "setDisposedStatusNative", nullptr, reinterpret_cast(AniSetDisposedStatus) }, + ani_native_function { "getDisposedStatusNative", nullptr, reinterpret_cast(AniGetDisposedStatus) }, + ani_native_function { "deleteDisposedStatusNative", nullptr, reinterpret_cast(AniDeleteDisposedStatus) }, + ani_native_function { "getDisposedRuleNative", nullptr, reinterpret_cast(AniGetDisposedRule) }, + ani_native_function { "setDisposedRuleNative", nullptr, reinterpret_cast(AniSetDisposedRule) }, + ani_native_function { "setUninstallDisposedRuleNative", nullptr, + reinterpret_cast(AniSetUninstallDisposedRule) }, + ani_native_function { "getUninstallDisposedRuleNative", nullptr, + reinterpret_cast(AniGetUninstallDisposedRule) }, + ani_native_function { "deleteUninstallDisposedRuleNative", nullptr, + reinterpret_cast(AniDeleteUninstallDisposedRule) }, + ani_native_function { "setDisposedRules", nullptr, reinterpret_cast(SetDisposedRules) }, + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_APPCONTROL, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/app_control/ani_app_control_common.cpp b/interfaces/kits/ani/app_control/ani_app_control_common.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7ff5f3f38f6bcfc461f05c68d55d9ebf55a9cf55 --- /dev/null +++ b/interfaces/kits/ani/app_control/ani_app_control_common.cpp @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "ani_app_control_common.h" +#include "ani_common_want.h" +#include "common_fun_ani.h" + +namespace OHOS { +namespace AppExecFwk { +using Want = OHOS::AAFwk::Want; + +namespace { +constexpr const char* CLASSNAME_DISPOSED_RULE_INNER = "@ohos.bundle.appControl.appControl.DisposedRuleInner"; +constexpr const char* CLASSNAME_DISPOSED_UNINSTALL_RULE_INNER = + "@ohos.bundle.appControl.appControl.UninstallDisposedRuleInner"; +constexpr const char* CLASSNAME_WANT = "@ohos.app.ability.Want.Want"; +constexpr const char* PROPERTYNAME_WANT = "want"; +constexpr const char* PROPERTYNAME_COMPONENT_TYPE = "componentType"; +constexpr const char* PROPERTYNAME_DISPOSED_TYPE = "disposedType"; +constexpr const char* PROPERTYNAME_CONTROL_TYPE = "controlType"; +constexpr const char* PROPERTYNAME_ELEMENT_LIST = "elementList"; +constexpr const char* PROPERTYNAME_PRIORITY = "priority"; +constexpr const char* PROPERTYNAME_UNINSTALL_COMPONENT_TYPE = "uninstallComponentType"; +constexpr const char* PROPERTYNAME_BUNDLE_NAME = "bundleName"; +constexpr const char* PROPERTYNAME_ABILITY_NAME = "abilityName"; +constexpr const char* PROPERTYNAME_DEVICEID = "deviceId"; +constexpr const char* PROPERTYNAME_URI = "uri"; +constexpr const char* PROPERTYNAME_TYPE = "type"; +constexpr const char* PROPERTYNAME_FLAGS = "flags"; +constexpr const char* PROPERTYNAME_ACTION = "action"; +constexpr const char* PROPERTYNAME_ENTITIES = "entities"; +constexpr const char* PROPERTYNAME_MODULE_NAME = "moduleName"; +} + +ani_object AniAppControlCommon::ConvertDisposedRule(ani_env* env, const DisposedRule& disposedRule) +{ + RETURN_NULL_IF_NULL(env); + + // want: Want + ani_object want = nullptr; + if (disposedRule.want != nullptr) { + want = WrapWant(env, *disposedRule.want); + RETURN_NULL_IF_NULL(want); + } + + // elementList: Array + ani_object elementList = CommonFunAni::ConvertAniArray( + env, disposedRule.elementList, CommonFunAni::ConvertElementName); + RETURN_NULL_IF_NULL(elementList); + + ani_value args[] = { + { .r = EnumUtils::EnumNativeToETS_AppControl_ComponentType( + env, static_cast(disposedRule.componentType)) }, + { .r = EnumUtils::EnumNativeToETS_AppControl_DisposedType( + env, static_cast(disposedRule.disposedType)) }, + { .r = EnumUtils::EnumNativeToETS_AppControl_ControlType(env, static_cast(disposedRule.controlType)) }, + { .r = elementList }, + { .i = disposedRule.priority }, + { .r = want }, + }; + static const std::string ctorSig = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_COMPONENT_TYPE) // componentType: ComponentType + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_DISPOSED_TYPE) // disposedType: DisposedType + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_CONTROL_TYPE) // controlType: ControlType + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // elementList: Array + .AddInt() // priority: int + .BuildSignatureDescriptor(); + static const std::string ctorSigWithWant = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_COMPONENT_TYPE) // componentType: ComponentType + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_DISPOSED_TYPE) // disposedType: DisposedType + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_CONTROL_TYPE) // controlType: ControlType + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // elementList: Array + .AddInt() // priority: int + .AddClass(CLASSNAME_WANT) // want: Want + .BuildSignatureDescriptor(); + return CommonFunAni::CreateNewObjectByClassV2( + env, CLASSNAME_DISPOSED_RULE_INNER, disposedRule.want == nullptr? ctorSig: ctorSigWithWant, args); +} + +ani_object AniAppControlCommon::ConvertUninstallDisposedRule(ani_env* env, + const UninstallDisposedRule& uninstallDisposedRule) +{ + RETURN_NULL_IF_NULL(env); + + // want: Want + ani_object want = nullptr; + if (uninstallDisposedRule.want != nullptr) { + want = WrapWant(env, *uninstallDisposedRule.want); + RETURN_NULL_IF_NULL(want); + } + + ani_value args[] = { + { .r = EnumUtils::EnumNativeToETS_AppControl_UninstallComponentType( + env, static_cast(uninstallDisposedRule.uninstallComponentType)) }, + { .i = uninstallDisposedRule.priority }, + { .r = want }, + }; + static const std::string ctorSig = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_UNINSTALL_COMPONENT_TYPE) // uninstallComponentType + .AddInt() // priority: int + .BuildSignatureDescriptor(); + static const std::string ctorSigWithWant = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_APPCONTROL_UNINSTALL_COMPONENT_TYPE) // uninstallComponentType + .AddInt() // priority: int + .AddClass(CLASSNAME_WANT) // want: Want + .BuildSignatureDescriptor(); + return CommonFunAni::CreateNewObjectByClassV2(env, CLASSNAME_DISPOSED_UNINSTALL_RULE_INNER, + uninstallDisposedRule.want == nullptr ? ctorSig : ctorSigWithWant, args); +} + +bool AniAppControlCommon::ParseWantWithoutVerification(ani_env* env, ani_object object, Want& want) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + // bundleName?: string + ani_string string = nullptr; + std::string bundleName = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_BUNDLE_NAME, &string)) { + bundleName = CommonFunAni::AniStrToString(env, string); + } + + // abilityName?: string + std::string abilityName = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_ABILITY_NAME, &string)) { + abilityName = CommonFunAni::AniStrToString(env, string); + } + + // deviceId?: string + std::string deviceId = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_DEVICEID, &string)) { + deviceId = CommonFunAni::AniStrToString(env, string); + } + + // uri?: string + std::string uri = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_URI, &string)) { + uri = CommonFunAni::AniStrToString(env, string); + } + + // type?: string + std::string type = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_TYPE, &string)) { + type = CommonFunAni::AniStrToString(env, string); + } + + // flags?: int + ani_int intValue = 0; + int32_t flags = 0; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_FLAGS, &intValue)) { + flags = intValue; + } + + // action?: string + std::string action = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_ACTION, &string)) { + action = CommonFunAni::AniStrToString(env, string); + } + + // entities?: Array + ani_array array = nullptr; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_ENTITIES, &array)) { + std::vector entities; + if (CommonFunAni::ParseStrArray(env, array, entities)) { + for (size_t idx = 0; idx < entities.size(); ++idx) { + APP_LOGD("entity:%{public}s", entities[idx].c_str()); + want.AddEntity(entities[idx]); + } + } + } + + // moduleName?: string + std::string moduleName = ""; + if (CommonFunAni::CallGetFieldOptional(env, object, PROPERTYNAME_MODULE_NAME, &string)) { + moduleName = CommonFunAni::AniStrToString(env, string); + } + + want.SetAction(action); + want.SetUri(uri); + want.SetType(type); + want.SetFlags(flags); + ElementName elementName(deviceId, bundleName, abilityName, moduleName); + want.SetElement(elementName); + + return true; +} + +bool AniAppControlCommon::ParseDisposedRule(ani_env* env, ani_object object, DisposedRule& disposedRule) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_object objectValue = nullptr; + ani_enum_item enumItem = nullptr; + ani_array array = nullptr; + ani_int intValue = 0; + + // want: Want + Want want; + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_WANT, &objectValue)); + if (!UnwrapWant(env, objectValue, want)) { + APP_LOGE("parse want failed"); + return false; + } + disposedRule.want = std::make_shared(want); + + // componentType: ComponentType + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_COMPONENT_TYPE, &enumItem)); + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, disposedRule.componentType)); + + // disposedType: DisposedType + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_DISPOSED_TYPE, &enumItem)); + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, disposedRule.disposedType)); + + // controlType: ControlType + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_CONTROL_TYPE, &enumItem)); + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, disposedRule.controlType)); + + // elementList: Array + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_ELEMENT_LIST, &array)); + RETURN_FALSE_IF_FALSE(CommonFunAni::ParseAniArray( + env, array, disposedRule.elementList, CommonFunAni::ParseElementName)); + + // priority: int + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_PRIORITY, &intValue)); + disposedRule.priority = intValue; + + return true; +} + +bool AniAppControlCommon::ParseUninstallDisposedRule(ani_env* env, + ani_object object, UninstallDisposedRule& uninstallDisposedRule) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_object objectValue = nullptr; + ani_enum_item enumItem = nullptr; + ani_int intValue = 0; + + // want: Want + Want want; + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_WANT, &objectValue)); + if (!UnwrapWant(env, objectValue, want)) { + APP_LOGE("parse want failed"); + return false; + } + uninstallDisposedRule.want = std::make_shared(want); + + // uninstallComponentType: UninstallComponentType + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_UNINSTALL_COMPONENT_TYPE, &enumItem)); + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, uninstallDisposedRule.uninstallComponentType)); + + // priority: int + RETURN_FALSE_IF_FALSE(CommonFunAni::CallGetter(env, object, PROPERTYNAME_PRIORITY, &intValue)); + uninstallDisposedRule.priority = intValue; + + return true; +} +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/app_control/ani_app_control_common.h b/interfaces/kits/ani/app_control/ani_app_control_common.h new file mode 100644 index 0000000000000000000000000000000000000000..7eaa7a854bf12f5d3f371e49349d6a6a3b24b063 --- /dev/null +++ b/interfaces/kits/ani/app_control/ani_app_control_common.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_APP_CONTROL_COMMON_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_APP_CONTROL_COMMON_H + +#include +#include "disposed_rule.h" + +namespace OHOS { +namespace AppExecFwk { +using Want = OHOS::AAFwk::Want; + +class AniAppControlCommon { +public: + static ani_object ConvertDisposedRule(ani_env* env, const DisposedRule& disposedRule); + static ani_object ConvertUninstallDisposedRule(ani_env* env, const UninstallDisposedRule& uninstallDisposedRule); + static bool ParseWantWithoutVerification(ani_env* env, ani_object object, Want& want); + static bool ParseDisposedRule(ani_env* env, ani_object object, DisposedRule& disposedRule); + static bool ParseUninstallDisposedRule(ani_env* env, + ani_object object, UninstallDisposedRule& uninstallDisposedRule); +}; +} // namespace AppExecFwk +} // namespace OHOS +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_APP_CONTROL_COMMON_H \ No newline at end of file diff --git a/interfaces/kits/ani/app_control/ani_app_control_unsupported.cpp b/interfaces/kits/ani/app_control/ani_app_control_unsupported.cpp new file mode 100644 index 0000000000000000000000000000000000000000..31a9b3ef2a3125ee63bf6e0269d6a3ef56a77eec --- /dev/null +++ b/interfaces/kits/ani/app_control/ani_app_control_unsupported.cpp @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "app_control_interface.h" +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_APPCONTROL = "@ohos.bundle.appControl.appControl"; +} // namespace + +static void AniSetDisposedStatus(ani_env* env, ani_string aniAppId, ani_object aniWant, ani_boolean aniIsSync) +{ + APP_LOGI("AppControl not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? SET_DISPOSED_STATUS_SYNC : SET_DISPOSED_STATUS, ""); +} + +static ani_object AniGetDisposedStatus(ani_env* env, ani_string aniAppId, ani_boolean aniIsSync) +{ + APP_LOGI("AppControl not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? GET_DISPOSED_STATUS_SYNC : GET_DISPOSED_STATUS, ""); + return nullptr; +} + +static void AniDeleteDisposedStatus(ani_env* env, ani_string aniAppId, ani_int aniAppIndex, ani_boolean aniIsSync) +{ + APP_LOGI("AppControl not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? DELETE_DISPOSED_STATUS_SYNC : DELETE_DISPOSED_STATUS, ""); +} + +static ani_object AniGetDisposedRule(ani_env* env, ani_string aniAppId, ani_int aniAppIndex) +{ + APP_LOGI("AppControl not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_DISPOSED_STATUS_SYNC, ""); + return nullptr; +} + +static void AniSetDisposedRule(ani_env* env, ani_string aniAppId, ani_object aniRule, ani_int aniAppIndex) +{ + APP_LOGI("AppControl not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_DISPOSED_STATUS_SYNC, ""); +} + +static void AniSetUninstallDisposedRule(ani_env* env, + ani_string aniAppIdentifier, ani_object aniRule, ani_int aniAppIndex) +{ + APP_LOGI("AppControl not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_UNINSTALL_DISPOSED_RULE, ""); +} + +static ani_object AniGetUninstallDisposedRule(ani_env* env, ani_string aniAppIdentifier, ani_int aniAppIndex) +{ + APP_LOGI("AppControl not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_UNINSTALL_DISPOSED_RULE, ""); + return nullptr; +} + +static void AniDeleteUninstallDisposedRule(ani_env* env, ani_string aniAppIdentifier, ani_int aniAppIndex) +{ + APP_LOGI("AppControl not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, DELETE_UNINSTALL_DISPOSED_RULE, ""); +} + +static void SetDisposedRules(ani_env* env, ani_object aniDisposedRuleConfigurations) +{ + APP_LOGI("AppControl not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_DISPOSED_RULES, ""); +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor appControl called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = + arkts::ani_signature::Builder::BuildNamespace(NS_NAME_APPCONTROL); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_APPCONTROL, status); + return status; + } + + std::array methods = { + ani_native_function { "setDisposedStatusNative", nullptr, reinterpret_cast(AniSetDisposedStatus) }, + ani_native_function { "getDisposedStatusNative", nullptr, reinterpret_cast(AniGetDisposedStatus) }, + ani_native_function { "deleteDisposedStatusNative", nullptr, reinterpret_cast(AniDeleteDisposedStatus) }, + ani_native_function { "getDisposedRuleNative", nullptr, reinterpret_cast(AniGetDisposedRule) }, + ani_native_function { "setDisposedRuleNative", nullptr, reinterpret_cast(AniSetDisposedRule) }, + ani_native_function { "setUninstallDisposedRuleNative", nullptr, + reinterpret_cast(AniSetUninstallDisposedRule) }, + ani_native_function { "getUninstallDisposedRuleNative", nullptr, + reinterpret_cast(AniGetUninstallDisposedRule) }, + ani_native_function { "deleteUninstallDisposedRuleNative", nullptr, + reinterpret_cast(AniDeleteUninstallDisposedRule) }, + ani_native_function { "setDisposedRules", nullptr, reinterpret_cast(SetDisposedRules) }, + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_APPCONTROL, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/app_control/ets/@ohos.bundle.appControl.ets b/interfaces/kits/ani/app_control/ets/@ohos.bundle.appControl.ets new file mode 100644 index 0000000000000000000000000000000000000000..d967ae02dbe4aa523d04f3e0087281aa4147394d --- /dev/null +++ b/interfaces/kits/ani/app_control/ets/@ohos.bundle.appControl.ets @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +import { AsyncCallback, BusinessError } from '@ohos.base'; +import { ElementName } from 'bundleManager.ElementName'; +import Want from '@ohos.app.ability.Want'; + +export default namespace appControl { + loadLibrary("ani_app_control.z"); + + export enum ComponentType { + UI_ABILITY = 1, + UI_EXTENSION = 2 + } + + export enum UninstallComponentType { + EXTENSION = 1, + } + + export enum DisposedType { + BLOCK_APPLICATION = 1, + BLOCK_ABILITY = 2, + NON_BLOCK = 3 + } + + export enum ControlType { + ALLOWED_LIST = 1, + DISALLOWED_LIST = 2 + } + + export interface DisposedRule { + want: Want; + componentType: ComponentType; + disposedType: DisposedType; + controlType: ControlType; + elementList: Array; + priority: int; + } + + export interface UninstallDisposedRule { + want: Want; + uninstallComponentType: UninstallComponentType; + priority: int; + } + + export interface DisposedRuleConfiguration { + appId: string; + appIndex: int; + disposedRule: DisposedRule; + } + + export class DisposedRuleInner implements DisposedRule { + public want: Want = {}; + public componentType: ComponentType = ComponentType.UI_ABILITY; + public disposedType: DisposedType = DisposedType.BLOCK_APPLICATION; + public controlType: ControlType = ControlType.ALLOWED_LIST; + public elementList: Array; + public priority: int; + + constructor() { } + constructor(componentType: ComponentType, + disposedType: DisposedType, + controlType: ControlType, + elementList: Array, + priority: int) { + this.componentType = componentType; + this.disposedType = disposedType; + this.controlType = controlType; + this.elementList = elementList; + this.priority = priority; + } + constructor(componentType: ComponentType, + disposedType: DisposedType, + controlType: ControlType, + elementList: Array, + priority: int, + want: Want) { + this.componentType = componentType; + this.disposedType = disposedType; + this.controlType = controlType; + this.elementList = elementList; + this.priority = priority; + this.want = want; + } + } + + export class UninstallDisposedRuleInner implements UninstallDisposedRule { + public want: Want = {}; + public uninstallComponentType: UninstallComponentType = UninstallComponentType.EXTENSION; + public priority: int; + + constructor() { } + constructor(uninstallComponentType: UninstallComponentType, priority: int) { + this.uninstallComponentType = uninstallComponentType; + this.priority = priority; + } + constructor(uninstallComponentType: UninstallComponentType, priority: int, want: Want) { + this.uninstallComponentType = uninstallComponentType; + this.priority = priority; + this.want = want; + } + } + + export class DisposedRuleConfigurationInner implements DisposedRuleConfiguration { + public appId: string = ''; + public appIndex: int; + public disposedRule: DisposedRule = new DisposedRuleInner; + } + + export native function setDisposedStatusNative(appId: string, disposedWant: Want, isSync: boolean): void; + export native function getDisposedStatusNative(appId: string, isSync: boolean): Want; + export native function deleteDisposedStatusNative(appId: string, appIndex: int, isSync: boolean): void; + export native function getDisposedRuleNative(appId: string, appIndex: int): DisposedRule; + export native function setDisposedRuleNative(appId: string, rule: DisposedRule, appIndex: int): void; + export native function setUninstallDisposedRuleNative(appIdentifier: string, rule: UninstallDisposedRule, appIndex: int): void; + export native function getUninstallDisposedRuleNative(appIdentifier: string, appIndex: int): UninstallDisposedRule; + export native function deleteUninstallDisposedRuleNative(appIdentifier: string, appIndex: int): void; + export native function setDisposedRules(disposedRuleConfigurations: Array): void; + + + function setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback): void { + let cb = (): void => { + return appControl.setDisposedStatusNative(appId, disposedWant, false); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setDisposedStatus(appId: string, disposedWant: Want): Promise { + let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void) : void => { + let cb = (): void => { + return appControl.setDisposedStatusNative(appId, disposedWant, false); + }; + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setDisposedStatusSync(appId: string, disposedWant: Want): void { + return appControl.setDisposedStatusNative(appId, disposedWant, true); + } + + function getDisposedStatus(appId: string, callback: AsyncCallback): void { + let cb = (): Want => { + return appControl.getDisposedStatusNative(appId, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: Want = e as Want; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getDisposedStatus(appId: string): Promise { + let p = new Promise((resolve: (want: Want) => void, reject: (error: BusinessError) => void) => { + let cb = (): Want => { + return appControl.getDisposedStatusNative(appId, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: Want = e as Want; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getDisposedStatusSync(appId: string): Want { + return appControl.getDisposedStatusNative(appId, true); + } + + function deleteDisposedStatus(appId: string, callback: AsyncCallback): void { + let cb = (): void => { + return appControl.deleteDisposedStatusNative(appId, 0, false); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function deleteDisposedStatus(appId: string): Promise { + let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void) : void => { + let cb = (): void => { + return appControl.deleteDisposedStatusNative(appId, 0, false); + }; + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function deleteDisposedStatusSync(appId: string, appIndex?: int): void + { + let appIndexInfo = appIndex ?? 0; + return appControl.deleteDisposedStatusNative(appId, appIndexInfo, true); + } + + function getDisposedRule(appId: string, appIndex?: int): DisposedRule + { + let appIndexInfo = appIndex ?? 0; + return appControl.getDisposedRuleNative(appId, appIndexInfo); + } + + function setDisposedRule(appId: string, rule: DisposedRule, appIndex?: int): void + { + let appIndexInfo = appIndex ?? 0; + appControl.setDisposedRuleNative(appId, rule, appIndexInfo); + } + + function setUninstallDisposedRule(appIdentifier: string, rule: UninstallDisposedRule, appIndex?: int): void + { + let appIndexInfo = appIndex ?? 0; + appControl.setUninstallDisposedRuleNative(appIdentifier, rule, appIndexInfo); + } + + function getUninstallDisposedRule(appIdentifier: string, appIndex?: int): UninstallDisposedRule + { + let appIndexInfo = appIndex ?? 0; + return appControl.getUninstallDisposedRuleNative(appIdentifier, appIndexInfo); + } + + function deleteUninstallDisposedRule(appIdentifier: string, appIndex?: int): void + { + let appIndexInfo = appIndex ?? 0; + appControl.deleteUninstallDisposedRuleNative(appIdentifier, appIndexInfo); + } +} diff --git a/interfaces/kits/ani/bundle_installer/BUILD.gn b/interfaces/kits/ani/bundle_installer/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..e078b73c23d6c24030053aeb4cafec00d4d92ad3 --- /dev/null +++ b/interfaces/kits/ani/bundle_installer/BUILD.gn @@ -0,0 +1,104 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") + +ohos_shared_library("ani_bundle_installer") { + shlib_type = "ani" + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + include_dirs = [ + "${kits_path}/ani/common", + "${kits_path}/ani/bundle_installer", + "${kits_path}/js/bundlemgr", + "${kits_path}/js/installer", + ] + + sources = [ + "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", + "${kits_path}/js/bundlemgr/installer_callback.cpp", + "ani_bundle_installer.cpp", + ] + + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/bundlemgr:bundle", + "${kits_path}/js/common:bundle_napi_common", + "${kits_path}/js/installer:installer", + ] + + external_deps = [ + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_single", + "napi:ace_napi", + "runtime_core:ani", + "runtime_core:ani_helpers", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + +generate_static_abc("bundle_installer") { + base_url = "./ets" + files = [ + "./ets/@ohos.bundle.installer.ets", + "./ets/@ohos.bundle.installerInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/bundle_installer.abc" +} + +ohos_prebuilt_etc("bundle_installer_etc") { + source = "$target_out_dir/bundle_installer.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":bundle_installer" ] +} + +ohos_copy("copy_bundle_installer_etc") { + sources = [ "./ets/@ohos.bundle.installerInner.ets" ] + outputs = [ "$ohos_ets_inner_path/bundleManager/{{source_file_part}}" ] + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} diff --git a/interfaces/kits/ani/bundle_installer/ani_bundle_installer.cpp b/interfaces/kits/ani/bundle_installer/ani_bundle_installer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..981fc0a334504702bf126a47eb05b7b2e162ce31 --- /dev/null +++ b/interfaces/kits/ani/bundle_installer/ani_bundle_installer.cpp @@ -0,0 +1,592 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "app_log_wrapper.h" +#include "base_cb_info.h" +#include "bundle_death_recipient.h" +#include "bundle_errors.h" +#include "bundle_mgr_client.h" +#include "bundle_mgr_interface.h" +#include "bundle_mgr_proxy.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "install_param.h" +#include "installer_callback.h" +#include "installer_helper.h" +#include "ipc_skeleton.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr uint8_t INSTALLER_METHOD_COUNTS = 13; +constexpr const char* INNERINSTALLER_CLASSNAME = "@ohos.bundle.installerInner.BundleInstallerInner"; +} // namespace +static bool g_isSystemApp = false; +using namespace arkts::ani_signature; +static bool GetNativeInstallerWithDeathRecpt(InstallResult& installResult, + sptr& iBundleInstaller, sptr& callback) +{ + iBundleInstaller = CommonFunc::GetBundleInstaller(); + if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { + APP_LOGE("can not get iBundleInstaller"); + installResult.resultCode = static_cast(IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR); + return false; + } + callback = new (std::nothrow) InstallerCallback(); + sptr recipient(new (std::nothrow) BundleDeathRecipient(callback)); + if (callback == nullptr ||recipient == nullptr) { + APP_LOGE("callback or recipient is nullptr"); + installResult.resultCode = static_cast(IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR); + return false; + } + iBundleInstaller->AsObject()->AddDeathRecipient(recipient); + return true; +} + +static bool ParseInstallParamWithLog(ani_env* env, ani_object& aniInstParam, InstallParam& installParam) +{ + if (!CommonFunAni::ParseInstallParam(env, aniInstParam, installParam)) { + APP_LOGE("InstallParam parse invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAMETERS, CORRESPONDING_TYPE); + return false; + } + return true; +} + +static bool CheckInstallParam(ani_env* env, InstallParam& installParam) +{ + if (installParam.specifiedDistributionType.size() > SPECIFIED_DISTRIBUTION_TYPE_MAX_SIZE) { + APP_LOGE("Parse specifiedDistributionType size failed"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, + "BusinessError 401: The size of specifiedDistributionType is greater than 128"); + return false; + } + if (installParam.additionalInfo.size() > ADDITIONAL_INFO_MAX_SIZE) { + APP_LOGE("Parse additionalInfo size failed"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, + "BusinessError 401: The size of additionalInfo is greater than 3000"); + return false; + } + return true; +} + +static void ExecuteInstall(const std::vector& hapFiles, InstallParam& installParam, + InstallResult& installResult) +{ + if (hapFiles.empty() && installParam.sharedBundleDirPaths.empty()) { + installResult.resultCode = static_cast(IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID); + return; + } + sptr iBundleInstaller; + sptr callback; + if (!GetNativeInstallerWithDeathRecpt(installResult, iBundleInstaller, callback)) { + return; + } + ErrCode res = iBundleInstaller->StreamInstall(hapFiles, installParam, callback); + if (res == ERR_OK) { + installResult.resultCode = callback->GetResultCode(); + APP_LOGD("InnerInstall resultCode %{public}d", installResult.resultCode); + installResult.resultMsg = callback->GetResultMsg(); + APP_LOGD("InnerInstall resultMsg %{public}s", installResult.resultMsg.c_str()); + return; + } + APP_LOGE("install failed due to %{public}d", res); + std::unordered_map proxyErrCodeMap; + InstallerHelper::CreateProxyErrCode(proxyErrCodeMap); + if (proxyErrCodeMap.find(res) != proxyErrCodeMap.end()) { + installResult.resultCode = proxyErrCodeMap.at(res); + } else { + installResult.resultCode = IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR; + } +} + +static void ProcessResult(ani_env* env, InstallResult& result, const InstallOption& option) +{ + InstallerHelper::ConvertInstallResult(result); + if (result.resultCode != SUCCESS) { + switch (option) { + case InstallOption::INSTALL: + BusinessErrorAni::ThrowCommonError(env, result.resultCode, + RESOURCE_NAME_OF_INSTALL, INSTALL_PERMISSION); + break; + case InstallOption::RECOVER: + BusinessErrorAni::ThrowCommonError(env, result.resultCode, + RESOURCE_NAME_OF_RECOVER, RECOVER_PERMISSION); + break; + case InstallOption::UNINSTALL: + BusinessErrorAni::ThrowCommonError(env, result.resultCode, + RESOURCE_NAME_OF_UNINSTALL, UNINSTALL_PERMISSION); + break; + case InstallOption::UPDATE_BUNDLE_FOR_SELF: + BusinessErrorAni::ThrowCommonError(env, result.resultCode, + RESOURCE_NAME_OF_UPDATE_BUNDLE_FOR_SELF, INSTALL_SELF_PERMISSION); + break; + case InstallOption::UNINSTALL_AND_RECOVER: + BusinessErrorAni::ThrowCommonError(env, result.resultCode, + RESOURCE_NAME_OF_UNINSTALL_AND_RECOVER, UNINSTALL_PERMISSION); + break; + default: + break; + } + } +} + +static void UninstallOrRecoverExecuter(std::string& bundleName, InstallParam& installParam, + InstallResult& installResult, InstallOption option) +{ + if (bundleName.empty()) { + installResult.resultCode = static_cast(IStatusReceiver::ERR_RECOVER_INVALID_BUNDLE_NAME); + return; + } + sptr iBundleInstaller; + sptr callback; + if (!GetNativeInstallerWithDeathRecpt(installResult, iBundleInstaller, callback)) { + return; + } + if (option == InstallOption::RECOVER) { + iBundleInstaller->Recover(bundleName, installParam, callback); + } else if (option == InstallOption::UNINSTALL) { + iBundleInstaller->Uninstall(bundleName, installParam, callback); + } else if (option == InstallOption::UNINSTALL_AND_RECOVER) { + iBundleInstaller->UninstallAndRecover(bundleName, installParam, callback); + } else { + APP_LOGE("error install option %{public}d", option); + installResult.resultCode = static_cast(IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR); + return; + } + installResult.resultMsg = callback->GetResultMsg(); + APP_LOGD("%{public}d resultMsg %{public}s", option, installResult.resultMsg.c_str()); + installResult.resultCode = callback->GetResultCode(); + APP_LOGD("%{public}d resultCode %{public}d", option, installResult.resultCode); +} + +static bool GetInstallParamForInstall(ani_env* env, ani_array arrayObj, ani_object aniInstParam, + std::vector& hapFiles, InstallParam& installParam) +{ + APP_LOGI("Install"); + if (!CommonFunAni::ParseStrArray(env, arrayObj, hapFiles)) { + APP_LOGE("hapFiles parse invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAMETERS, CORRESPONDING_TYPE); + return false; + } + if (!ParseInstallParamWithLog(env, aniInstParam, installParam)) { + return false; + } + if (!CheckInstallParam(env, installParam)) { + return false; + } + if (hapFiles.empty() && !installParam.verifyCodeParams.empty()) { + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_HAPS_FILE_EMPTY_ERROR); + return false; + } + return true; +} + +static void AniInstall(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_array arrayObj, ani_object aniInstParam) +{ + APP_LOGD("ani Install called"); + std::vector hapFiles; + InstallParam installParam; + if (!GetInstallParamForInstall(env, arrayObj, aniInstParam, hapFiles, installParam)) { + return; + } + InstallResult result; + ExecuteInstall(hapFiles, installParam, result); + ProcessResult(env, result, InstallOption::INSTALL); +} + +static bool ParseBundleNameAndInstallParam(ani_env* env, ani_string& aniBundleName, ani_object& aniInstParam, + std::string& bundleName, InstallParam& installParam) +{ + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return false; + } + return ParseInstallParamWithLog(env, aniInstParam, installParam); +} + +static void AniUninstall(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_object aniInstParam) +{ + APP_LOGD("ani Uninstall called"); + std::string bundleName; + InstallParam installParam; + if (!ParseBundleNameAndInstallParam(env, aniBundleName, aniInstParam, bundleName, installParam)) { + return; + } + InstallResult result; + UninstallOrRecoverExecuter(bundleName, installParam, result, InstallOption::UNINSTALL); + ProcessResult(env, result, InstallOption::UNINSTALL); +} + +static void AniRecover(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_object aniInstParam) +{ + APP_LOGD("ani Recover called"); + std::string bundleName; + InstallParam installParam; + if (!ParseBundleNameAndInstallParam(env, aniBundleName, aniInstParam, bundleName, installParam)) { + return; + } + InstallResult result; + UninstallOrRecoverExecuter(bundleName, installParam, result, InstallOption::RECOVER); + ProcessResult(env, result, InstallOption::RECOVER); +} + +static void ExeUninstallByUninstallParam(UninstallParam& uninstallParam, InstallResult& installResult) +{ + const std::string bundleName = uninstallParam.bundleName; + if (bundleName.empty()) { + installResult.resultCode = + static_cast(IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST); + return; + } + sptr iBundleInstaller; + sptr callback; + if (!GetNativeInstallerWithDeathRecpt(installResult, iBundleInstaller, callback)) { + return; + } + iBundleInstaller->Uninstall(uninstallParam, callback); + installResult.resultMsg = callback->GetResultMsg(); + installResult.resultCode = callback->GetResultCode(); +} + +static void AniUninstallByUninstallParam(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_object aniUnInstParam) +{ + APP_LOGD("ani UninstallByUninstallParam called"); + UninstallParam uninstallParam; + if (!CommonFunAni::ParseUninstallParam(env, aniUnInstParam, uninstallParam)) { + APP_LOGE("InstallParam parse invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAMETERS, CORRESPONDING_TYPE); + return; + } + InstallResult result; + ExeUninstallByUninstallParam(uninstallParam, result); + ProcessResult(env, result, InstallOption::UNINSTALL); +} + +static void AniUpdateBundleForSelf(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_array arrayObj, ani_object aniInstParam) +{ + APP_LOGD("ani UpdateBundleForSelf called"); + std::vector hapFiles; + InstallParam installParam; + if (!GetInstallParamForInstall(env, arrayObj, aniInstParam, hapFiles, installParam)) { + return; + } + installParam.isSelfUpdate = true; + InstallResult result; + ExecuteInstall(hapFiles, installParam, result); + ProcessResult(env, result, InstallOption::UPDATE_BUNDLE_FOR_SELF); +} + +static void AniUninstallUpdates(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_object aniInstParam) +{ + APP_LOGD("ani UninstallUpdates called"); + std::string bundleName; + InstallParam installParam; + if (!ParseBundleNameAndInstallParam(env, aniBundleName, aniInstParam, bundleName, installParam)) { + return; + } + InstallResult result; + UninstallOrRecoverExecuter(bundleName, installParam, result, InstallOption::UNINSTALL_AND_RECOVER); + ProcessResult(env, result, InstallOption::UNINSTALL_AND_RECOVER); +} + +static bool ParseBundleNameAndFilePath(ani_env* env, ani_string aniBundleName, ani_object aniFilePaths, + std::string& bundleName, std::vector& filePaths) +{ + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return false; + } + if (!CommonFunAni::ParseStrArray(env, aniFilePaths, filePaths)) { + APP_LOGE("filePaths invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, FILE_PATH, TYPE_ARRAY); + return false; + } + return true; +} + +static void AniAddExtResource(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_object aniFilePaths) +{ + APP_LOGD("ani AddExtResource called"); + std::string bundleName; + std::vector filePaths; + if (!ParseBundleNameAndFilePath(env, aniBundleName, aniFilePaths, bundleName, filePaths)) { + return; + } + ErrCode err = InstallerHelper::InnerAddExtResource(bundleName, filePaths); + if (err != NO_ERROR) { + BusinessErrorAni::ThrowCommonError( + env, err, ADD_EXT_RESOURCE, Constants::PERMISSION_INSTALL_BUNDLE); + } +} + +static void AniRemoveExtResource(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_object aniModuleNames) +{ + APP_LOGD("ani RemoveExtResource called"); + std::string bundleName; + std::vector moduleNames; + if (!ParseBundleNameAndFilePath(env, aniBundleName, aniModuleNames, bundleName, moduleNames)) { + return; + } + ErrCode err = InstallerHelper::InnerRemoveExtResource(bundleName, moduleNames); + if (err != NO_ERROR) { + BusinessErrorAni::ThrowCommonError( + env, err, REMOVE_EXT_RESOURCE, UNINSTALL_PERMISSION); + } +} + +static ani_int AniCreateAppClone(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_object aniCrtAppCloneParam) +{ + APP_LOGD("ani CreateAppClone called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return static_cast(Constants::INITIAL_APP_INDEX); + } + int32_t userId; + int32_t appIdx; + CommonFunAni::ParseCreateAppCloneParam(env, aniCrtAppCloneParam, userId, appIdx); + if (userId == Constants::UNSPECIFIED_USERID) { + userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + ErrCode res = CommonFunc::ConvertErrCode(InstallerHelper::InnerCreateAppClone(bundleName, userId, appIdx)); + if (res != SUCCESS) { + BusinessErrorAni::ThrowCommonError(env, res, CREATE_APP_CLONE, Constants::PERMISSION_INSTALL_CLONE_BUNDLE); + } + return appIdx; +} + +static void AniDestroyAppClone(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_int aniAppIndex, ani_object aniDestroyAppCloneParam) +{ + APP_LOGD("ani DestroyAppClone called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + DestroyAppCloneParam destroyCloneParam; + if (!CommonFunAni::ParseDestroyAppCloneParam(env, aniDestroyAppCloneParam, destroyCloneParam)) { + APP_LOGE("DestroyAppCloneParam parse invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAMETERS, CORRESPONDING_TYPE); + return; + } + if (destroyCloneParam.userId == Constants::UNSPECIFIED_USERID) { + destroyCloneParam.userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + ErrCode result = CommonFunc::ConvertErrCode(InstallerHelper::InnerDestroyAppClone(bundleName, + destroyCloneParam.userId, aniAppIndex, destroyCloneParam)); + if (result != SUCCESS) { + BusinessErrorAni::ThrowCommonError(env, result, + DESTROY_APP_CLONE, Constants::PERMISSION_UNINSTALL_CLONE_BUNDLE); + } +} + +static void AniInstallPreexistingApp(ani_env* env, [[maybe_unused]] ani_object installerObj, + ani_string aniBundleName, ani_int aniUserId) +{ + APP_LOGD("ani InstallPreexistingApp called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + if (aniUserId == Constants::UNSPECIFIED_USERID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + ErrCode result = CommonFunc::ConvertErrCode(InstallerHelper::InnerInstallPreexistingApp(bundleName, aniUserId)); + if (result != SUCCESS) { + BusinessErrorAni::ThrowCommonError(env, result, + INSTALL_PREEXISTING_APP, Constants::PERMISSION_INSTALL_BUNDLE); + } +} + +static void AniInstallPlugin(ani_env* env, [[maybe_unused]] ani_object installerObj, ani_string aniHostBundleName, + ani_object aniPluginFilePaths, ani_object aniPluginParam) +{ + APP_LOGD("ani InstallPlugin called"); + + std::string hostBundleName; + if (!CommonFunAni::ParseString(env, aniHostBundleName, hostBundleName)) { + APP_LOGE("parse hostBundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + + std::vector pluginFilePaths; + if (aniPluginFilePaths == nullptr || !CommonFunAni::ParseStrArray(env, aniPluginFilePaths, pluginFilePaths)) { + APP_LOGE("pluginFilePaths parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, FILE_PATH, TYPE_ARRAY); + return; + } + + InstallPluginParam pluginParam; + if (aniPluginParam == nullptr || !CommonFunAni::ParsePluginParam(env, aniPluginParam, pluginParam)) { + APP_LOGE("pluginParam parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAMETERS, CORRESPONDING_TYPE); + return; + } + if (pluginParam.userId == Constants::UNSPECIFIED_USERID) { + pluginParam.userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + ErrCode result = + CommonFunc::ConvertErrCode(InstallerHelper::InnerInstallPlugin(hostBundleName, pluginFilePaths, pluginParam)); + if (result != SUCCESS) { + BusinessErrorAni::ThrowCommonError(env, result, INSTALL_PLUGIN, Constants::PERMISSION_INSTALL_PLUGIN); + } +} + +static void AniUninstallPlugin(ani_env* env, [[maybe_unused]] ani_object installerObj, ani_string aniHostBundleName, + ani_string aniPluginBundleName, ani_object aniPluginParam) +{ + APP_LOGD("ani UninstallPlugin called"); + + std::string hostBundleName; + if (!CommonFunAni::ParseString(env, aniHostBundleName, hostBundleName)) { + APP_LOGE("parse hostBundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + + std::string pluginBundleName; + if (!CommonFunAni::ParseString(env, aniPluginBundleName, pluginBundleName)) { + APP_LOGW("parse pluginBundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PLUGIN_BUNDLE_NAME, TYPE_STRING); + return; + } + + InstallPluginParam pluginParam; + if (aniPluginParam == nullptr || !CommonFunAni::ParsePluginParam(env, aniPluginParam, pluginParam)) { + APP_LOGE("pluginParam parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAMETERS, CORRESPONDING_TYPE); + return; + } + if (pluginParam.userId == Constants::UNSPECIFIED_USERID) { + pluginParam.userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + ErrCode result = CommonFunc::ConvertErrCode( + InstallerHelper::InnerUninstallPlugin(hostBundleName, pluginBundleName, pluginParam)); + if (result != SUCCESS) { + BusinessErrorAni::ThrowCommonError(env, result, UNINSTALL_PLUGIN, Constants::PERMISSION_UNINSTALL_PLUGIN); + } +} + +static ani_object AniGetBundleInstaller(ani_env* env, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetBundleInstaller called"); + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return nullptr; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (!g_isSystemApp && !iBundleMgr->VerifySystemApi(Constants::INVALID_API_VERSION)) { + APP_LOGE("non-system app calling system api"); + BusinessErrorAni::ThrowCommonError(env, ERROR_NOT_SYSTEM_APP, + isSync ? RESOURCE_NAME_OF_GET_BUNDLE_INSTALLER_SYNC : RESOURCE_NAME_OF_GET_BUNDLE_INSTALLER, + INSTALL_PERMISSION); + return nullptr; + } + g_isSystemApp = true; + static const std::string installerClzName = Builder::BuildClass(INNERINSTALLER_CLASSNAME).Descriptor(); + ani_class installerClz = CommonFunAni::CreateClassByName(env, installerClzName); + RETURN_NULL_IF_NULL(installerClz); + return CommonFunAni::CreateNewObjectByClass(env, installerClzName, installerClz); +} + +static void GetInstallerMethods(std::array &installerMethods) +{ + installerMethods = { + ani_native_function { "installNative", nullptr, reinterpret_cast(AniInstall) }, + ani_native_function { "uninstallNative", nullptr, reinterpret_cast(AniUninstall) }, + ani_native_function { "recoverNative", nullptr, reinterpret_cast(AniRecover) }, + ani_native_function { "uninstallByOwnParamNative", nullptr, + reinterpret_cast(AniUninstallByUninstallParam) }, + ani_native_function { "updateBundleForSelfNative", nullptr, reinterpret_cast(AniUpdateBundleForSelf) }, + ani_native_function { "uninstallUpdatesNative", nullptr, reinterpret_cast(AniUninstallUpdates) }, + ani_native_function { "addExtResourceNative", nullptr, reinterpret_cast(AniAddExtResource) }, + ani_native_function { "removeExtResourceNative", nullptr, reinterpret_cast(AniRemoveExtResource) }, + ani_native_function { "createAppCloneNative", nullptr, reinterpret_cast(AniCreateAppClone) }, + ani_native_function { "destroyAppCloneNative", nullptr, reinterpret_cast(AniDestroyAppClone) }, + ani_native_function { "installPreexistingAppNative", nullptr, + reinterpret_cast(AniInstallPreexistingApp) }, + ani_native_function { "installPluginNative", nullptr, reinterpret_cast(AniInstallPlugin) }, + ani_native_function { "uninstallPluginNative", nullptr, reinterpret_cast(AniUninstallPlugin) }, + }; +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("bundle_installer ANI_Constructor called"); + ani_env* env; + ani_status res = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(res, "Unsupported ANI_VERSION_1"); + Namespace installerNs = Builder::BuildNamespace("@ohos.bundle.installer.installer"); + ani_namespace kitNs; + res = env->FindNamespace(installerNs.Descriptor().c_str(), &kitNs); + RETURN_ANI_STATUS_IF_NOT_OK(res, "Not found nameSpace of @ohos.bundle.installer.installer"); + + std::array methods = { + ani_native_function { "getBundleInstallerNative", nullptr, reinterpret_cast(AniGetBundleInstaller) } + }; + res = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + RETURN_ANI_STATUS_IF_NOT_OK(res, "Cannot bind native methods"); + APP_LOGI("BundleInstaller class binding"); + ani_class installerClz; + res = env->FindClass(Builder::BuildClass(INNERINSTALLER_CLASSNAME).Descriptor().c_str(), &installerClz); + RETURN_ANI_STATUS_IF_NOT_OK(res, "Not found clsName"); + std::array installerMethods; + GetInstallerMethods(installerMethods); + res = env->Class_BindNativeMethods(installerClz, installerMethods.data(), installerMethods.size()); + RETURN_ANI_STATUS_IF_NOT_OK(res, "Cannot bind native methods to clsName"); + *result = ANI_VERSION_1; + APP_LOGI("bundle_installer ANI_Constructor finished"); + return ANI_OK; +} +} + +} // namespace AppExecFwk +} // namespace OHOS + \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_installer/ets/@ohos.bundle.installer.ets b/interfaces/kits/ani/bundle_installer/ets/@ohos.bundle.installer.ets new file mode 100644 index 0000000000000000000000000000000000000000..34329f8b52f62a4e93d7872a88afcdb8bfb9ef7a --- /dev/null +++ b/interfaces/kits/ani/bundle_installer/ets/@ohos.bundle.installer.ets @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback, BusinessError } from '@ohos.base'; + +namespace installer { + loadLibrary("ani_bundle_installer.z"); + + export native function getBundleInstallerNative(isSync: boolean): BundleInstaller; + + function getBundleInstaller(callback: AsyncCallback): void { + let execFun = (): BundleInstaller => { + return installer.getBundleInstallerNative(false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let installer: BundleInstaller = e as BundleInstaller; + callback(null, installer); + }, (err: Object): void => { + }); + } + + function getBundleInstaller(): Promise { + let p = new Promise((resolve: (bundleInstaller: BundleInstaller) => void, reject: (error: Error) => void) => { + let execFun = (): BundleInstaller => { + return installer.getBundleInstallerNative(false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let installer: BundleInstaller = e as BundleInstaller; + resolve(installer); + }, (err: Error): void => { + let br = err as BusinessError; + reject(br); + }); + }); + return p; + } + + function getBundleInstallerSync(): BundleInstaller { + return installer.getBundleInstallerNative(true); + } + + interface BundleInstaller { + + install(hapFilePaths: Array, installParam: InstallParam, callback: AsyncCallback): void; + + install(hapFilePaths: Array, callback: AsyncCallback): void; + + install(hapFilePaths: Array, installParam?: InstallParam): Promise; + + uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallback): void; + + uninstall(bundleName: string, callback: AsyncCallback): void; + + uninstall(bundleName: string, installParam?: InstallParam): Promise; + + recover(bundleName: string, installParam: InstallParam, callback: AsyncCallback): void; + + recover(bundleName: string, callback: AsyncCallback): void; + + recover(bundleName: string, installParam?: InstallParam): Promise; + + uninstall(uninstallParam: UninstallParam, callback: AsyncCallback): void; + + uninstall(uninstallParam: UninstallParam): Promise; + + updateBundleForSelf(hapFilePaths: Array, installParam: InstallParam, callback: AsyncCallback): void; + + updateBundleForSelf(hapFilePaths: Array, callback: AsyncCallback): void; + + updateBundleForSelf(hapFilePaths: Array, installParam?: InstallParam): Promise; + + uninstallUpdates(bundleName: string, installParam?: InstallParam): Promise; + + addExtResource(bundleName: string, filePaths: Array): Promise; + + removeExtResource(bundleName: string, moduleNames: Array): Promise; + + createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise; + + destroyAppClone(bundleName: string, appIndex: int, options?: int | DestroyAppCloneParam): Promise; + + installPreexistingApp(bundleName: string, userId?: int): Promise; + + installPlugin(hostBundleName: string, pluginFilePaths: Array, pluginParam?: PluginParam): Promise; + + uninstallPlugin(hostBundleName: string, pluginBundleName: string, pluginParam?: PluginParam): Promise; + } + + export interface HashParam { + moduleName: string; + hashValue: string; + } + + export interface PGOParam { + moduleName: string; + pgoFilePath: string; + } + + export interface Parameters { + key: string; + value: string; + } + + export interface InstallParam { + userId?: int; + installFlag?: int; + isKeepData?: boolean; + hashParams?: Array; + crowdtestDeadline?: long; + sharedBundleDirPaths?: Array; + specifiedDistributionType?: string; + additionalInfo?: string; + pgoParams?: Array; + parameters?: Array; + } + + export interface UninstallParam { + bundleName: string; + versionCode?: int; + } + + export interface CreateAppCloneParam { + userId?: int; + appIndex?: int; + } + + export interface DestroyAppCloneParam { + userId?: int; + parameters?: Array; + } + + export interface PluginParam { + userId?: int; + parameters?: Array; + } +} + +export default installer; diff --git a/interfaces/kits/ani/bundle_installer/ets/@ohos.bundle.installerInner.ets b/interfaces/kits/ani/bundle_installer/ets/@ohos.bundle.installerInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f93e354e65ab1755b07de306b245e8a13bfeec4 --- /dev/null +++ b/interfaces/kits/ani/bundle_installer/ets/@ohos.bundle.installerInner.ets @@ -0,0 +1,468 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback, BusinessError } from '@ohos.base'; +import installer from '@ohos.bundle.installer'; + +export class HashParamInner implements installer.HashParam { + moduleName: string = ""; + hashValue: string = ""; +} + +export class PGOParamInner implements installer.PGOParam { + moduleName: string = ""; + pgoFilePath: string = ""; +} + +export class ParametersInner implements installer.Parameters { + key: string = ""; + value: string = ""; +} + +export class InstallParamInner implements installer.InstallParam { + userId?: int; + installFlag?: int; + isKeepData?: boolean; + hashParams?: Array; + crowdtestDeadline?: long; + sharedBundleDirPaths?: Array; + specifiedDistributionType?: string; + additionalInfo?: string; + pgoParams?: Array; + parameters?: Array; +} + +export class UninstallParamInner implements installer.UninstallParam { + bundleName: string = ""; + versionCode?: int; +} + +export class CreateAppCloneParamInner implements installer.CreateAppCloneParam { + userId?: int; + appIndex?: int; +} + +export class DestroyAppCloneParamInner implements installer.DestroyAppCloneParam { + userId?: int; + parameters?: Array; + constructor() { + super(); + } + constructor(param: installer.DestroyAppCloneParam) { + super(); + this.userId = param.userId; + this.parameters = param.parameters; + } +} + +export class PluginParamInner implements installer.PluginParam { + userId?: int; + parameters?: Array; +} + +const UNSPECIFIED_USERID: int = -2; +const SPECIFIED_DISTRIBUTION_TYPE_MAX_SIZE : int = 128; +const ADDITIONAL_INFO_MAX_SIZE: int = 3000; +const ERROR_PARAM_CHECK_ERROR: int = 401; +const SPECIFIED_DISTRIBUTION_TYPE_ERROR: string = "BusinessError 401: The size of specifiedDistributionType is greater than 128"; +const ADDITIONALINFO_ERROR: string = "BusinessError 401: The size of additionalInfo is greater than 3000"; +const PARAMETERTYPE_ERROR: string = "BusinessError 401: Parameter error. The type of parameters must be corresponding type."; + +function createBusinessError(code: int, message: string) { + let err = new BusinessError(); + err.code = code; + err.name = 'Error'; + err.message = message; + return err; +} + +function checkInstallParam(params: installer.InstallParam, needExtras: boolean): void { + + const hashParams = params.hashParams ?? new Array; + const moduleNameSet = new Set(); + for (const hashParam of hashParams) { + if (hashParam.moduleName === "" || hashParam.hashValue === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAMETERTYPE_ERROR); + } + if (moduleNameSet.has(hashParam.moduleName)) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAMETERTYPE_ERROR); + } + moduleNameSet.add(hashParam.moduleName); + } + + const pgoParams = params.pgoParams ?? new Array; + for (const pgoParam of pgoParams) { + if (pgoParam.moduleName === "" || pgoParam.pgoFilePath === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAMETERTYPE_ERROR); + } + } + if (!needExtras) { + return; + } + let specifiedDistributionType: string = params.specifiedDistributionType ?? ""; + if (specifiedDistributionType.length > SPECIFIED_DISTRIBUTION_TYPE_MAX_SIZE) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, SPECIFIED_DISTRIBUTION_TYPE_ERROR); + } + let additionalInfo: string = params.additionalInfo ?? ""; + if (additionalInfo.length > ADDITIONAL_INFO_MAX_SIZE) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, ADDITIONALINFO_ERROR); + } +} + +export class BundleInstallerInner implements installer.BundleInstaller { + native installNative(hapFilePaths: Array, installParam: installer.InstallParam): void; + native uninstallNative(bundleName: string, installParam: installer.InstallParam): void; + native recoverNative(bundleName: string, installParam: installer.InstallParam): void; + native uninstallByOwnParamNative(uninstallParam: installer.UninstallParam): void; + native updateBundleForSelfNative(hapFilePaths: Array, installParam: installer.InstallParam): void; + native uninstallUpdatesNative(bundleName: string, installParam: installer.InstallParam): void; + native addExtResourceNative(bundleName: string, filePaths: Array): void; + native removeExtResourceNative(bundleName: string, moduleNames: Array): void; + native createAppCloneNative(bundleName: string, createAppCloneParam: installer.CreateAppCloneParam): int; + native destroyAppCloneNative(bundleName: string, appIndex: int, options: installer.DestroyAppCloneParam): void; + native installPreexistingAppNative(bundleName: string, userId: int): void; + native installPluginNative(hostBundleName: string, pluginFilePaths: Array, pluginParam: installer.PluginParam): void; + native uninstallPluginNative(hostBundleName: string, pluginBundleName: string, pluginParam: installer.PluginParam): void; + + install(hapFilePaths: Array, installParam?: installer.InstallParam): Promise { + if (installParam) { + checkInstallParam(installParam, true); + } + let emptyParam = new InstallParamInner(); + let params = installParam ?? emptyParam; + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.installNative(hapFilePaths, params); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + install(hapFilePaths: Array, installParam: installer.InstallParam, callback: AsyncCallback): void { + checkInstallParam(installParam, true); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.installNative(hapFilePaths, installParam); } + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + install(hapFilePaths: Array, callback: AsyncCallback): void { + let emptyParam = new InstallParamInner(); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.installNative(hapFilePaths, emptyParam); } + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + uninstall(bundleName: string, installParam?: installer.InstallParam): Promise { + if (installParam) { + checkInstallParam(installParam, false); + } + let emptyParam = new InstallParamInner(); + let params = installParam ?? emptyParam; + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.uninstallNative(bundleName, params); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + uninstall(bundleName: string, installParam: installer.InstallParam, callback: AsyncCallback): void { + checkInstallParam(installParam, false); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.uninstallNative(bundleName, installParam); } + + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + uninstall(bundleName: string, callback: AsyncCallback): void { + let emptyParam = new InstallParamInner(); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.uninstallNative(bundleName, emptyParam); } + + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + recover(bundleName: string, installParam?: installer.InstallParam): Promise { + if (installParam) { + checkInstallParam(installParam, false); + } + let emptyParam = new InstallParamInner(); + let params = installParam ?? emptyParam; + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.recoverNative(bundleName, params); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + recover(bundleName: string, installParam: installer.InstallParam, callback: AsyncCallback): void { + checkInstallParam(installParam, false); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.recoverNative(bundleName, installParam); } + + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + recover(bundleName: string, callback: AsyncCallback): void { + let emptyParam = new InstallParamInner(); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.recoverNative(bundleName, emptyParam); } + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + uninstall(uninstallParam: installer.UninstallParam): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.uninstallByOwnParamNative(uninstallParam); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + uninstall(uninstallParam: installer.UninstallParam, callback: AsyncCallback): void { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.uninstallByOwnParamNative(uninstallParam); } + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + updateBundleForSelf(hapFilePaths: Array, installParam?: installer.InstallParam): Promise { + if (installParam) { + checkInstallParam(installParam, true); + } + let emptyParam = new InstallParamInner(); + let params = installParam ?? emptyParam; + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.updateBundleForSelfNative(hapFilePaths, params); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + updateBundleForSelf(hapFilePaths: Array, installParam: installer.InstallParam, callback: AsyncCallback): void { + checkInstallParam(installParam, true); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.updateBundleForSelfNative(hapFilePaths, installParam); } + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + updateBundleForSelf(hapFilePaths: Array, callback: AsyncCallback): void { + let emptyParam = new InstallParamInner(); + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.updateBundleForSelfNative(hapFilePaths, emptyParam); } + + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + }); + } + + uninstallUpdates(bundleName: string, installParam?: installer.InstallParam): Promise { + if (installParam) { + checkInstallParam(installParam, false); + } + let emptyParam = new InstallParamInner(); + let params = installParam ?? emptyParam; + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.uninstallUpdatesNative(bundleName, params); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + addExtResource(bundleName: string, filePaths: Array): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.addExtResourceNative(bundleName, filePaths); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + removeExtResource(bundleName: string, moduleNames: Array): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.removeExtResourceNative(bundleName, moduleNames); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + createAppClone(bundleName: string, createAppCloneParam?: installer.CreateAppCloneParam): Promise { + let emptyParam = new CreateAppCloneParamInner(); + let params = createAppCloneParam ?? emptyParam; + let p = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():int=>{ return this.createAppCloneNative(bundleName, params); } + let p1 = taskpool.execute(execFun); + p1.then((appIdx: NullishType) => { + resolve(appIdx as int); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + destroyAppClone(bundleName: string, appIndex: int, options?: int | installer.DestroyAppCloneParam): Promise { + let defaultParam = new DestroyAppCloneParamInner(); + let option = options ?? defaultParam; + if (option instanceof installer.DestroyAppCloneParam) { + defaultParam = new DestroyAppCloneParamInner(option); + } else if (typeof option === "number") { + defaultParam.userId = option; + } + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ + this.destroyAppCloneNative(bundleName, appIndex, defaultParam); + } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + installPreexistingApp(bundleName: string, userId?: int): Promise { + let userIdNum = userId ?? UNSPECIFIED_USERID; + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void):void => { + let execFun = ():NullishType=>{ this.installPreexistingAppNative(bundleName, userIdNum); } + let p1 = taskpool.execute(execFun); + p1.then(():void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + installPlugin(hostBundleName: string, pluginFilePaths: Array, pluginParam?: installer.PluginParam): Promise { + let emptyParam = new PluginParamInner(); + let params = pluginParam ?? emptyParam; + let p = new Promise ((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { + let execFun = (): void => { return this.installPluginNative(hostBundleName, pluginFilePaths, params); } + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + uninstallPlugin(hostBundleName: string, pluginBundleName: string, pluginParam?: installer.PluginParam): Promise { + let emptyParam = new PluginParamInner(); + let params = pluginParam ?? emptyParam; + let p = new Promise ((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { + let execFun = (): void => { return this.uninstallPluginNative(hostBundleName, pluginBundleName, params); } + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } +} \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/BUILD.gn b/interfaces/kits/ani/bundle_manager/BUILD.gn index 8ddda176a36a9d4fe719a50e1a124ddaec130896..299a30f155b72dfa536c1bb5c8cb2af250e537b1 100644 --- a/interfaces/kits/ani/bundle_manager/BUILD.gn +++ b/interfaces/kits/ani/bundle_manager/BUILD.gn @@ -16,6 +16,7 @@ import("//build/ohos.gni") import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") ohos_shared_library("ani_bundle_manager") { + shlib_type = "ani" branch_protector_ret = "pac_ret" sanitize = { @@ -30,6 +31,7 @@ ohos_shared_library("ani_bundle_manager") { "${inner_api_path}/appexecfwk_core/include", "${kits_path}/ani/bundle_manager", "${kits_path}/ani/common", + "${kits_path}/js/bundle_manager", "${kits_path}/js/common", ] sources = [ "ani_bundle_manager.cpp" ] @@ -44,6 +46,7 @@ ohos_shared_library("ani_bundle_manager") { "${common_path}:libappexecfwk_common", "${core_path}:appexecfwk_core", "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/bundle_manager:bundle_manager_common", "${kits_path}/js/common:bundle_napi_common", ] @@ -59,6 +62,8 @@ ohos_shared_library("ani_bundle_manager") { external_deps = [ "ability_base:want", + "ability_runtime:ani_common", + "ability_runtime:runtime", "c_utils:utils", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", @@ -70,6 +75,10 @@ ohos_shared_library("ani_bundle_manager") { "samgr:samgr_proxy", ] + if (global_resmgr_enable) { + defines += [ "GLOBAL_RESMGR_ENABLE" ] + } + subsystem_name = "bundlemanager" part_name = "bundle_framework" } @@ -216,10 +225,101 @@ ohos_prebuilt_etc("skill_etc") { deps = [ ":skill" ] } +generate_static_abc("permission_def") { + base_url = "./ets" + files = [ + "./ets/bundleManager/PermissionDef.ets", + "./ets/bundleManager/PermissionDefInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/permission_def.abc" +} + +ohos_prebuilt_etc("permission_def_etc") { + source = "$target_out_dir/permission_def.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":permission_def" ] +} + +generate_static_abc("share_bundle_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/SharedBundleInfo.ets", + "./ets/bundleManager/SharedBundleInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/share_bundle_info.abc" +} + +ohos_prebuilt_etc("share_bundle_info_etc") { + source = "$target_out_dir/share_bundle_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":share_bundle_info" ] +} + +generate_static_abc("app_provision_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/AppProvisionInfo.ets", + "./ets/bundleManager/AppProvisionInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/app_provision_info.abc" +} + +ohos_prebuilt_etc("app_provision_info_etc") { + source = "$target_out_dir/app_provision_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":app_provision_info" ] +} + +generate_static_abc("recoverable_application_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/RecoverableApplicationInfo.ets", + "./ets/bundleManager/RecoverableApplicationInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/recoverable_application_info.abc" +} + +ohos_prebuilt_etc("recoverable_application_info_etc") { + source = "$target_out_dir/recoverable_application_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":recoverable_application_info" ] +} + +generate_static_abc("plugin_bundle_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/PluginBundleInfo.ets", + "./ets/bundleManager/PluginBundleInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/plugin_bundle_info.abc" +} + +ohos_prebuilt_etc("plugin_bundle_info_etc") { + source = "$target_out_dir/plugin_bundle_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":plugin_bundle_info" ] +} + ohos_copy("copy_bundleManager_ets") { sources = [ "./ets/bundleManager/AbilityInfoInner.ets", "./ets/bundleManager/ApplicationInfoInner.ets", + "./ets/bundleManager/BundleInfoInner.ets", "./ets/bundleManager/ExtensionAbilityInfoInner.ets", ] outputs = [ "$ohos_ets_inner_path/bundleManager/{{source_file_part}}" ] diff --git a/interfaces/kits/ani/bundle_manager/ani_bundle_manager.cpp b/interfaces/kits/ani/bundle_manager/ani_bundle_manager.cpp index 6d0943199f819cf8e2a257d1f7fd92dac4581ae6..01752596e690d4812316c642e24f5ae8f02fd59a 100644 --- a/interfaces/kits/ani/bundle_manager/ani_bundle_manager.cpp +++ b/interfaces/kits/ani/bundle_manager/ani_bundle_manager.cpp @@ -25,17 +25,22 @@ #include #include "ani_bundle_manager.h" +#include "ani_common_want.h" #include #include "app_log_wrapper.h" #include "bundle_errors.h" +#include "bundle_manager_helper.h" #include "bundle_mgr_client.h" #include "bundle_mgr_interface.h" #include "bundle_mgr_proxy.h" #include "business_error_ani.h" +#include "clean_cache_callback.h" #include "common_fun_ani.h" #include "common_func.h" +#include "enum_util.h" #include "ipc_skeleton.h" #include "napi_constants.h" +#include "process_cache_callback_host.h" namespace OHOS { namespace AppExecFwk { @@ -45,7 +50,25 @@ static std::mutex g_aniClearCacheListenerMutex; static std::shared_ptr g_aniClearCacheListener; static std::shared_mutex g_aniCacheMutex; static std::unordered_map g_aniCache; -constexpr int32_t EMPTY_USER_ID = -500; +static std::string g_aniOwnBundleName; +static std::mutex g_aniOwnBundleNameMutex; +static std::set g_supportedProfileList = { 1 }; +static std::map appDistributionTypeMap = { + { ENUM_ONE, Constants::APP_DISTRIBUTION_TYPE_APP_GALLERY }, + { ENUM_TWO, Constants::APP_DISTRIBUTION_TYPE_ENTERPRISE }, + { ENUM_THREE, Constants::APP_DISTRIBUTION_TYPE_ENTERPRISE_NORMAL }, + { ENUM_FOUR, Constants::APP_DISTRIBUTION_TYPE_ENTERPRISE_MDM }, + { ENUM_FIVE, Constants::APP_DISTRIBUTION_TYPE_OS_INTEGRATION }, + { ENUM_SIX, Constants::APP_DISTRIBUTION_TYPE_CROWDTESTING }, + { ENUM_SEVEN, Constants::APP_DISTRIBUTION_TYPE_NONE }, +}; +constexpr int32_t EMPTY_VALUE = -500; +constexpr const char* EMPTY_STRING = "ani empty string"; +enum AbilityProfileType : uint32_t { + ABILITY_PROFILE = 0, + EXTENSION_PROFILE = 1, + UNKNOWN_PROFILE = 2 +}; } // namespace static void CheckToCache( @@ -64,15 +87,113 @@ static void CheckToCache( } } -static ani_object GetBundleInfoForSelfNative(ani_env* env, ani_double aniBundleFlags, ani_boolean aniIsSync) +template +static void CheckInfoCache(ani_env* env, const ANIQuery& query, + const OHOS::AAFwk::Want& want, std::vector infos, ani_object aniObject) { - APP_LOGD("ani GetBundleInfoForSelf called"); - int32_t bundleFlags = 0; - if (!CommonFunAni::TryCastDoubleTo(aniBundleFlags, &bundleFlags)) { - APP_LOGE("Cast aniBundleFlags failed"); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_FLAGS, TYPE_NUMBER); - return nullptr; + RETURN_IF_NULL(aniObject); + ElementName element = want.GetElement(); + if (element.GetBundleName().empty() || element.GetAbilityName().empty()) { + return; + } + + if (infos.size() != EXPLICIT_QUERY_RESULT_LEN || infos[0].uid != IPCSkeleton::GetCallingUid()) { + return; + } + + ani_ref cacheInfo = nullptr; + ani_status status = env->GlobalReference_Create(aniObject, &cacheInfo); + if (status == ANI_OK) { + std::unique_lock lock(g_aniCacheMutex); + g_aniCache[query] = cacheInfo; + } +} + +static void CheckBatchAbilityInfoCache(ani_env* env, const ANIQuery &query, + const std::vector &wants, std::vector abilityInfos, ani_object aniObject) +{ + RETURN_IF_NULL(aniObject); + for (size_t i = 0; i < wants.size(); i++) { + ElementName element = wants[i].GetElement(); + if (element.GetBundleName().empty() || element.GetAbilityName().empty()) { + return; + } + } + + uint32_t explicitQueryResultLen = 1; + if (abilityInfos.size() != explicitQueryResultLen || + (abilityInfos.size() > 0 && abilityInfos[0].uid != IPCSkeleton::GetCallingUid())) { + return; + } + + ani_ref cacheInfo = nullptr; + ani_status status = env->GlobalReference_Create(aniObject, &cacheInfo); + if (status == ANI_OK) { + std::unique_lock lock(g_aniCacheMutex); + g_aniCache[query] = cacheInfo; + } +} + +static bool ParseAniWant(ani_env* env, ani_object aniWant, OHOS::AAFwk::Want& want) +{ + RETURN_FALSE_IF_NULL(aniWant); + ani_string string = nullptr; + std::string bundleName; + std::string abilityName; + std::string moduleName; + + if (CommonFunAni::CallGetterOptional(env, aniWant, BUNDLE_NAME, &string)) { + bundleName = CommonFunAni::AniStrToString(env, string); + } + if (CommonFunAni::CallGetterOptional(env, aniWant, Constants::ABILITY_NAME, &string)) { + abilityName = CommonFunAni::AniStrToString(env, string); + } + if (CommonFunAni::CallGetterOptional(env, aniWant, MODULE_NAME, &string)) { + moduleName = CommonFunAni::AniStrToString(env, string); } + if (!bundleName.empty() && !abilityName.empty()) { + ElementName elementName("", bundleName, abilityName, moduleName); + want.SetElement(elementName); + return true; + } + if (!UnwrapWant(env, aniWant, want)) { + APP_LOGW("parse want failed"); + return false; + } + bool isExplicit = !want.GetBundle().empty() && !want.GetElement().GetAbilityName().empty(); + if (!isExplicit && want.GetAction().empty() && want.GetEntities().empty() && + want.GetUriString().empty() && want.GetType().empty() && want.GetStringParam(LINK_FEATURE).empty()) { + APP_LOGW("implicit params all empty"); + return false; + } + return true; +} + +static bool ParseAniWantList(ani_env* env, ani_object aniWants, std::vector &wants) +{ + RETURN_FALSE_IF_NULL(aniWants); + return CommonFunAni::AniArrayForeach(env, aniWants, [env, &wants](ani_object aniWantItem) { + OHOS::AAFwk::Want want; + bool result = UnwrapWant(env, aniWantItem, want); + if (!result) { + wants.clear(); + return false; + } + bool isExplicit = !want.GetBundle().empty() && !want.GetElement().GetAbilityName().empty(); + if (!isExplicit && want.GetAction().empty() && want.GetEntities().empty() && + want.GetUriString().empty() && want.GetType().empty() && want.GetStringParam(LINK_FEATURE).empty()) { + APP_LOGW("implicit params all empty of want"); + return true; + } + wants.emplace_back(want); + + return true; + }); +} + +static ani_object GetBundleInfoForSelfNative(ani_env* env, ani_int aniBundleFlags, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetBundleInfoForSelf called"); auto iBundleMgr = CommonFunc::GetBundleMgr(); if (iBundleMgr == nullptr) { APP_LOGE("GetBundleMgr failed"); @@ -82,8 +203,8 @@ static ani_object GetBundleInfoForSelfNative(ani_env* env, ani_double aniBundleF const auto uid = IPCSkeleton::GetCallingUid(); std::string bundleName = std::to_string(uid); int32_t userId = uid / Constants::BASE_USER_RANGE; - const ANIQuery query(bundleName, GET_BUNDLE_INFO, bundleFlags, userId); - if (!CommonFunc::CheckBundleFlagWithPermission(bundleFlags)) { + const ANIQuery query(bundleName, GET_BUNDLE_INFO, aniBundleFlags, userId); + if (!CommonFunc::CheckBundleFlagWithPermission(aniBundleFlags)) { std::shared_lock lock(g_aniCacheMutex); auto item = g_aniCache.find(query); if (item != g_aniCache.end()) { @@ -92,7 +213,7 @@ static ani_object GetBundleInfoForSelfNative(ani_env* env, ani_double aniBundleF } BundleInfo bundleInfo; - ErrCode ret = iBundleMgr->GetBundleInfoForSelf(bundleFlags, bundleInfo); + ErrCode ret = iBundleMgr->GetBundleInfoForSelf(aniBundleFlags, bundleInfo); bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); if (ret != ERR_OK) { APP_LOGE("GetBundleInfoForSelf failed ret: %{public}d", ret); @@ -102,8 +223,8 @@ static ani_object GetBundleInfoForSelfNative(ani_env* env, ani_double aniBundleF return nullptr; } - ani_object objectBundleInfo = CommonFunAni::ConvertBundleInfo(env, bundleInfo, bundleFlags); - if (!CommonFunc::CheckBundleFlagWithPermission(bundleFlags)) { + ani_object objectBundleInfo = CommonFunAni::ConvertBundleInfo(env, bundleInfo, aniBundleFlags); + if (!CommonFunc::CheckBundleFlagWithPermission(aniBundleFlags)) { CheckToCache(env, bundleInfo.uid, uid, query, objectBundleInfo); } @@ -111,22 +232,12 @@ static ani_object GetBundleInfoForSelfNative(ani_env* env, ani_double aniBundleF } static ani_object GetBundleInfoNative(ani_env* env, - ani_string aniBundleName, ani_double aniBundleFlags, ani_double aniUserId, ani_boolean aniIsSync) + ani_string aniBundleName, ani_int aniBundleFlags, ani_int aniUserId, ani_boolean aniIsSync) { APP_LOGD("ani GetBundleInfo called"); - int32_t bundleFlags = 0; - if (!CommonFunAni::TryCastDoubleTo(aniBundleFlags, &bundleFlags)) { - APP_LOGE("Cast aniBundleFlags failed"); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_FLAGS, TYPE_NUMBER); - return nullptr; - } - int32_t userId = EMPTY_USER_ID; - if (!CommonFunAni::TryCastDoubleTo(aniUserId, &userId)) { - APP_LOGW("Parse userId failed, set this parameter to the caller userId"); - } int32_t callingUid = IPCSkeleton::GetCallingUid(); - if (userId == EMPTY_USER_ID) { - userId = callingUid / Constants::BASE_USER_RANGE; + if (aniUserId == EMPTY_USER_ID) { + aniUserId = callingUid / Constants::BASE_USER_RANGE; } std::string bundleName; if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { @@ -141,8 +252,8 @@ static ani_object GetBundleInfoNative(ani_env* env, return nullptr; } - ANIQuery query(bundleName, GET_BUNDLE_INFO, bundleFlags, userId); - if (!CommonFunc::CheckBundleFlagWithPermission(bundleFlags)) { + ANIQuery query(bundleName, GET_BUNDLE_INFO, aniBundleFlags, aniUserId); + if (!CommonFunc::CheckBundleFlagWithPermission(aniBundleFlags)) { std::shared_lock lock(g_aniCacheMutex); auto item = g_aniCache.find(query); if (item != g_aniCache.end()) { @@ -158,7 +269,7 @@ static ani_object GetBundleInfoNative(ani_env* env, return nullptr; } BundleInfo bundleInfo; - ErrCode ret = iBundleMgr->GetBundleInfoV9(bundleName, bundleFlags, bundleInfo, userId); + ErrCode ret = iBundleMgr->GetBundleInfoV9(bundleName, aniBundleFlags, bundleInfo, aniUserId); if (ret != ERR_OK) { APP_LOGE("GetBundleInfoV9 failed ret: %{public}d", ret); BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), @@ -167,8 +278,8 @@ static ani_object GetBundleInfoNative(ani_env* env, return nullptr; } - ani_object objectBundleInfo = CommonFunAni::ConvertBundleInfo(env, bundleInfo, bundleFlags); - if (!CommonFunc::CheckBundleFlagWithPermission(bundleFlags)) { + ani_object objectBundleInfo = CommonFunAni::ConvertBundleInfo(env, bundleInfo, aniBundleFlags); + if (!CommonFunc::CheckBundleFlagWithPermission(aniBundleFlags)) { CheckToCache(env, bundleInfo.uid, callingUid, query, objectBundleInfo); } @@ -176,19 +287,9 @@ static ani_object GetBundleInfoNative(ani_env* env, } static ani_object GetApplicationInfoNative(ani_env* env, - ani_string aniBundleName, ani_double aniApplicationFlags, ani_double aniUserId, ani_boolean aniIsSync) + ani_string aniBundleName, ani_int aniApplicationFlags, ani_int aniUserId, ani_boolean aniIsSync) { APP_LOGD("ani GetApplicationInfo called"); - int32_t applicationFlags = 0; - if (!CommonFunAni::TryCastDoubleTo(aniApplicationFlags, &applicationFlags)) { - APP_LOGE("Cast aniApplicationFlags failed"); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_FLAGS, TYPE_NUMBER); - return nullptr; - } - int32_t userId = EMPTY_USER_ID; - if (!CommonFunAni::TryCastDoubleTo(aniUserId, &userId)) { - APP_LOGW("Parse userId failed, set this parameter to the caller userId"); - } std::string bundleName; if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); @@ -196,8 +297,8 @@ static ani_object GetApplicationInfoNative(ani_env* env, return nullptr; } int32_t callingUid = IPCSkeleton::GetCallingUid(); - if (userId == EMPTY_USER_ID) { - userId = callingUid / Constants::BASE_USER_RANGE; + if (aniUserId == EMPTY_USER_ID) { + aniUserId = callingUid / Constants::BASE_USER_RANGE; } bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); @@ -207,7 +308,7 @@ static ani_object GetApplicationInfoNative(ani_env* env, return nullptr; } - const ANIQuery query(bundleName, GET_APPLICATION_INFO, applicationFlags, userId); + const ANIQuery query(bundleName, GET_APPLICATION_INFO, aniApplicationFlags, aniUserId); { std::shared_lock lock(g_aniCacheMutex); auto item = g_aniCache.find(query); @@ -223,9 +324,9 @@ static ani_object GetApplicationInfoNative(ani_env* env, return nullptr; } ApplicationInfo appInfo; - ErrCode ret = iBundleMgr->GetApplicationInfoV9(bundleName, applicationFlags, userId, appInfo); + ErrCode ret = iBundleMgr->GetApplicationInfoV9(bundleName, aniApplicationFlags, aniUserId, appInfo); if (ret != ERR_OK) { - APP_LOGE("GetApplicationInfoV9 failed ret: %{public}d,userId: %{public}d", ret, userId); + APP_LOGE("GetApplicationInfoV9 failed ret: %{public}d,userId: %{public}d", ret, aniUserId); BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), isSync ? GET_APPLICATION_INFO_SYNC : GET_APPLICATION_INFO, isSync ? BUNDLE_PERMISSIONS : Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); @@ -238,8 +339,60 @@ static ani_object GetApplicationInfoNative(ani_env* env, return objectApplicationInfo; } +static ani_object GetAllBundleInfoNative(ani_env* env, ani_int aniBundleFlags, ani_int aniUserId) +{ + APP_LOGD("ani GetAllBundleInfo called"); + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("Get bundle mgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::vector bundleInfos; + ErrCode ret = iBundleMgr->GetBundleInfosV9(aniBundleFlags, bundleInfos, aniUserId); + if (ret != ERR_OK) { + APP_LOGE("GetBundleInfosV9 failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_BUNDLE_INFOS, + Constants::PERMISSION_GET_INSTALLED_BUNDLE_LIST); + return nullptr; + } + APP_LOGD("GetBundleInfosV9 ret: %{public}d, bundleInfos size: %{public}zu", ret, bundleInfos.size()); + + return CommonFunAni::ConvertAniArray(env, bundleInfos, CommonFunAni::ConvertBundleInfo, aniBundleFlags); +} + +static ani_object GetAllApplicationInfoNative(ani_env* env, ani_int aniApplicationFlags, ani_int aniUserId) +{ + APP_LOGD("ani GetAllApplicationInfo called"); + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("nullptr iBundleMgr"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::vector appInfos; + ErrCode ret = iBundleMgr->GetApplicationInfosV9(aniApplicationFlags, aniUserId, appInfos); + if (ret != ERR_OK) { + APP_LOGE("GetApplicationInfosV9 failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_APPLICATION_INFOS, + Constants::PERMISSION_GET_INSTALLED_BUNDLE_LIST); + return nullptr; + } + APP_LOGD("applicationInfos size: %{public}zu", appInfos.size()); + + return CommonFunAni::ConvertAniArray(env, appInfos, CommonFunAni::ConvertApplicationInfo); +} + static ani_boolean IsApplicationEnabledNative(ani_env* env, - ani_string aniBundleName, ani_double aniAppIndex, ani_boolean aniIsSync) + ani_string aniBundleName, ani_int aniAppIndex, ani_boolean aniIsSync) { APP_LOGD("ani IsApplicationEnabled called"); bool isEnable = false; @@ -249,21 +402,20 @@ static ani_boolean IsApplicationEnabledNative(ani_env* env, BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); return isEnable; } - int32_t appIndex = 0; - if (!CommonFunAni::TryCastDoubleTo(aniAppIndex, &appIndex)) { - APP_LOGE("Cast aniAppIndex failed"); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_INDEX, TYPE_NUMBER); - return isEnable; - } auto iBundleMgr = CommonFunc::GetBundleMgr(); if (iBundleMgr == nullptr) { APP_LOGE("GetBundleMgr failed"); BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); return isEnable; } + if (bundleName.empty()) { + APP_LOGW("bundleName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + return isEnable; + } ErrCode ret = ERR_OK; - if (appIndex != 0) { - ret = iBundleMgr->IsCloneApplicationEnabled(bundleName, appIndex, isEnable); + if (aniAppIndex != 0) { + ret = iBundleMgr->IsCloneApplicationEnabled(bundleName, aniAppIndex, isEnable); } else { ret = iBundleMgr->IsApplicationEnabled(bundleName, isEnable); } @@ -276,6 +428,1501 @@ static ani_boolean IsApplicationEnabledNative(ani_env* env, return isEnable; } +static ani_object QueryAbilityInfoSyncNative(ani_env* env, + ani_object aniWant, ani_int aniAbilityFlags, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani QueryAbilityInfoSync called"); + OHOS::AAFwk::Want want; + if (!ParseAniWant(env, aniWant, want)) { + APP_LOGE("ParseAniWant failed"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_WANT_ERROR); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + const ANIQuery query(want.ToString(), QUERY_ABILITY_INFOS_SYNC, aniAbilityFlags, aniUserId); + { + std::shared_lock lock(g_aniCacheMutex); + auto item = g_aniCache.find(query); + if (item != g_aniCache.end()) { + return reinterpret_cast(item->second); + } + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::vector abilityInfos; + ErrCode ret = iBundleMgr->QueryAbilityInfosV9(want, aniAbilityFlags, aniUserId, abilityInfos); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("QueryAbilityInfosV9 failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? QUERY_ABILITY_INFOS_SYNC : QUERY_ABILITY_INFOS, BUNDLE_PERMISSIONS); + return nullptr; + } + ani_object aniAbilityInfos = + CommonFunAni::ConvertAniArray(env, abilityInfos, CommonFunAni::ConvertAbilityInfo); + CheckInfoCache(env, query, want, abilityInfos, aniAbilityInfos); + return aniAbilityInfos; +} + +static ani_object GetAppCloneIdentityNative(ani_env* env, ani_int aniUid) +{ + APP_LOGD("ani GetAppCloneIdentity called"); + bool queryOwn = (aniUid == IPCSkeleton::GetCallingUid()); + std::string bundleName; + int32_t appIndex = 0; + if (queryOwn) { + std::lock_guard lock(g_aniOwnBundleNameMutex); + if (!g_aniOwnBundleName.empty()) { + APP_LOGD("ani query own bundleName and appIndex, has cache, no need to query from host"); + CommonFunc::GetBundleNameAndIndexByName(g_aniOwnBundleName, bundleName, appIndex); + return CommonFunAni::ConvertAppCloneIdentity(env, bundleName, appIndex); + } + } + + ErrCode ret = BundleManagerHelper::InnerGetAppCloneIdentity(aniUid, bundleName, appIndex); + if (ret != ERR_OK) { + APP_LOGE("GetNameAndIndexForUid failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, GET_APP_CLONE_IDENTITY, APP_CLONE_IDENTITY_PERMISSIONS); + return nullptr; + } + + std::lock_guard lock(g_aniOwnBundleNameMutex); + if (queryOwn && g_aniOwnBundleName.empty()) { + g_aniOwnBundleName = bundleName; + if (appIndex > 0) { + g_aniOwnBundleName = CommonFunc::GetCloneBundleIdKey(bundleName, appIndex); + } + APP_LOGD("ani put own bundleName = %{public}s to cache", g_aniOwnBundleName.c_str()); + } + return CommonFunAni::ConvertAppCloneIdentity(env, bundleName, appIndex); +} + +static ani_string GetAbilityLabelNative(ani_env* env, + ani_string aniBundleName, ani_string aniModuleName, ani_string aniAbilityName, ani_boolean aniIsSync) +{ +#ifdef GLOBAL_RESMGR_ENABLE + APP_LOGD("ani GetAbilityLabel called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGE("moduleName %{public}s invalid", moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return nullptr; + } + std::string abilityName; + if (!CommonFunAni::ParseString(env, aniAbilityName, abilityName)) { + APP_LOGE("abilityName %{public}s invalid", abilityName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::ABILITY_NAME, TYPE_STRING); + return nullptr; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::string abilityLabel; + ErrCode ret = iBundleMgr->GetAbilityLabel(bundleName, moduleName, abilityName, abilityLabel); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("GetAbilityLabel failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? GET_ABILITY_LABEL_SYNC : GET_ABILITY_LABEL, BUNDLE_PERMISSIONS); + return nullptr; + } + ani_string aniAbilityLabel = nullptr; + if (!CommonFunAni::StringToAniStr(env, abilityLabel, aniAbilityLabel)) { + APP_LOGE("StringToAniStr failed"); + return nullptr; + } + return aniAbilityLabel; +#else + APP_LOGW("SystemCapability.BundleManager.BundleFramework.Resource not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_ABILITY_LABEL, ""); + return nullptr; +#endif +} + +static ani_object GetLaunchWantForBundleNative(ani_env* env, + ani_string aniBundleName, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetLaunchWantForBundle called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + OHOS::AAFwk::Want want; + ErrCode ret = iBundleMgr->GetLaunchWantForBundle(bundleName, want, aniUserId); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("GetLaunchWantForBundle failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? GET_LAUNCH_WANT_FOR_BUNDLE_SYNC : GET_LAUNCH_WANT_FOR_BUNDLE, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertWantInfo(env, want); +} + +static ani_object GetAppCloneBundleInfoNative(ani_env* env, ani_string aniBundleName, + ani_int aniAppIndex, ani_int aniBundleFlags, ani_int aniUserId) +{ + APP_LOGD("ani GetAppCloneBundleInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("Get bundle mgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + BundleInfo bundleInfo; + ErrCode ret = iBundleMgr->GetCloneBundleInfo(bundleName, aniBundleFlags, aniAppIndex, bundleInfo, aniUserId); + if (ret != ERR_OK) { + APP_LOGE("GetCloneBundleInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_APP_CLONE_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO); + return nullptr; + } + + return CommonFunAni::ConvertBundleInfo(env, bundleInfo, aniBundleFlags); +} + +static ani_string GetSpecifiedDistributionType(ani_env* env, ani_string aniBundleName) +{ + APP_LOGD("ani GetSpecifiedDistributionType called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("Get bundle mgr failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + RESOURCE_NAME_OF_GET_SPECIFIED_DISTRIBUTION_TYPE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + std::string specifiedDistributionType; + ErrCode ret = iBundleMgr->GetSpecifiedDistributionType(bundleName, specifiedDistributionType); + if (ret != ERR_OK) { + APP_LOGE("GetSpecifiedDistributionType failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + RESOURCE_NAME_OF_GET_SPECIFIED_DISTRIBUTION_TYPE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + ani_string aniSpecifiedDistributionType = nullptr; + if (!CommonFunAni::StringToAniStr(env, specifiedDistributionType, aniSpecifiedDistributionType)) { + APP_LOGE("StringToAniStr failed"); + return nullptr; + } + return aniSpecifiedDistributionType; +} + +static ani_string GetBundleNameByUidNative(ani_env* env, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetBundleNameByUid called"); + std::string bundleName; + ani_string aniBundleName = nullptr; + bool queryOwn = (aniUserId == IPCSkeleton::GetCallingUid()); + if (queryOwn) { + std::lock_guard lock(g_aniOwnBundleNameMutex); + if (!g_aniOwnBundleName.empty()) { + APP_LOGD("query own bundleName, has cache, no need to query from host"); + int32_t appIndex = 0; + CommonFunc::GetBundleNameAndIndexByName(g_aniOwnBundleName, bundleName, appIndex); + if (CommonFunAni::StringToAniStr(env, bundleName, aniBundleName)) { + return aniBundleName; + } else { + APP_LOGE("Convert ani_string failed"); + return nullptr; + } + } + } + int32_t appIndex = 0; + ErrCode ret = BundleManagerHelper::InnerGetAppCloneIdentity(aniUserId, bundleName, appIndex); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + BusinessErrorAni::ThrowCommonError( + env, ret, isSync ? GET_BUNDLE_NAME_BY_UID_SYNC : GET_BUNDLE_NAME_BY_UID, BUNDLE_PERMISSIONS); + return nullptr; + } + std::lock_guard lock(g_aniOwnBundleNameMutex); + if (queryOwn && g_aniOwnBundleName.empty()) { + g_aniOwnBundleName = bundleName; + if (appIndex > 0) { + g_aniOwnBundleName = std::to_string(appIndex) + "clone_" + bundleName; + } + APP_LOGD("put own bundleName = %{public}s to cache", g_aniOwnBundleName.c_str()); + } + + if (CommonFunAni::StringToAniStr(env, bundleName, aniBundleName)) { + return aniBundleName; + } else { + APP_LOGE("Convert ani_string failed"); + return nullptr; + } +} + +static ani_object QueryAbilityInfoWithWantsNative(ani_env* env, + ani_object aniWants, ani_int aniAbilityFlags, ani_int aniUserId) +{ + APP_LOGD("ani QueryAbilityInfoWithWants called"); + std::vector wants; + if (!ParseAniWantList(env, aniWants, wants) || wants.empty()) { + APP_LOGE("ParseAniWant failed"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_WANT_ERROR); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + std::string bundleNames = "["; + for (uint32_t i = 0; i < wants.size(); i++) { + bundleNames += ((i > 0) ? "," : ""); + bundleNames += wants[i].ToString(); + } + bundleNames += "]"; + const ANIQuery query(bundleNames, BATCH_QUERY_ABILITY_INFOS, aniAbilityFlags, aniUserId); + { + std::shared_lock lock(g_aniCacheMutex); + auto item = g_aniCache.find(query); + if (item != g_aniCache.end()) { + APP_LOGD("has cache, no need to query from host"); + return reinterpret_cast(item->second); + } + } + + std::vector abilityInfos; + ErrCode ret = BundleManagerHelper::InnerBatchQueryAbilityInfos(wants, aniAbilityFlags, aniUserId, abilityInfos); + if (ret != ERR_OK) { + APP_LOGE("BatchQueryAbilityInfos failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, BATCH_QUERY_ABILITY_INFOS, BUNDLE_PERMISSIONS); + return nullptr; + } + ani_object aniAbilityInfos = + CommonFunAni::ConvertAniArray(env, abilityInfos, CommonFunAni::ConvertAbilityInfo); + CheckBatchAbilityInfoCache(env, query, wants, abilityInfos, aniAbilityInfos); + return aniAbilityInfos; +} + +static ani_string GetDynamicIconNative(ani_env* env, ani_string aniBundleName) +{ + APP_LOGD("ani GetDynamicIcon called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::string moduleName; + ErrCode ret = BundleManagerHelper::InnerGetDynamicIcon(bundleName, moduleName); + if (ret != ERR_OK) { + APP_LOGE("GetDynamicIcon failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, + GET_DYNAMIC_ICON, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + ani_string aniModuleName = nullptr; + if (!CommonFunAni::StringToAniStr(env, moduleName, aniModuleName)) { + APP_LOGE("StringToAniStr failed"); + return nullptr; + } + return aniModuleName; +} + +static ani_boolean IsAbilityEnabledNative(ani_env* env, + ani_object aniAbilityInfo, ani_int aniAppIndex, ani_boolean aniIsSync) +{ + APP_LOGD("ani IsAbilityEnabled called"); + bool isEnable = false; + AbilityInfo abilityInfo; + if (!CommonFunAni::ParseAbilityInfo(env, aniAbilityInfo, abilityInfo)) { + APP_LOGE("ParseAbilityInfo failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, ABILITY_INFO, TYPE_OBJECT); + return isEnable; + } + ErrCode ret = BundleManagerHelper::InnerIsAbilityEnabled(abilityInfo, isEnable, aniAppIndex); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("IsAbilityEnabled failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, isSync ? IS_ABILITY_ENABLED_SYNC : "", ""); + } + return isEnable; +} + +static void SetAbilityEnabledNative(ani_env* env, + ani_object aniAbilityInfo, ani_boolean aniIsEnable, ani_int aniAppIndex, ani_boolean aniIsSync) +{ + APP_LOGD("ani SetAbilityEnabled called"); + AbilityInfo abilityInfo; + bool isEnable = CommonFunAni::AniBooleanToBool(aniIsEnable); + if (!CommonFunAni::ParseAbilityInfo(env, aniAbilityInfo, abilityInfo)) { + APP_LOGE("ParseAbilityInfo failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, ABILITY_INFO, TYPE_OBJECT); + return; + } + ErrCode ret = BundleManagerHelper::InnerSetAbilityEnabled(abilityInfo, isEnable, aniAppIndex); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("SetAbilityEnabled failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, isSync ? SET_ABILITY_ENABLED_SYNC : SET_ABILITY_ENABLED, + Constants::PERMISSION_CHANGE_ABILITY_ENABLED_STATE); + } +} + +static void SetApplicationEnabledNative(ani_env* env, + ani_string aniBundleName, ani_boolean aniIsEnable, ani_int aniAppIndex, ani_boolean aniIsSync) +{ + APP_LOGD("ani SetApplicationEnabled called"); + bool isEnable = CommonFunAni::AniBooleanToBool(aniIsEnable); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + ErrCode ret = BundleManagerHelper::InnerSetApplicationEnabled(bundleName, isEnable, aniAppIndex); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("SetApplicationEnabled failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, isSync ? SET_APPLICATION_ENABLED_SYNC : SET_APPLICATION_ENABLED, + Constants::PERMISSION_CHANGE_ABILITY_ENABLED_STATE); + } +} + +static ani_object QueryExtensionAbilityInfoNative(ani_env* env, + ani_object aniWant, ani_enum_item aniExtensionAbilityType, ani_string aniExtensionAbilityTypeName, + ani_int aniExtensionAbilityFlags, ani_int aniUserId, + ani_boolean aniIsExtensionTypeName, ani_boolean aniIsSync) +{ + APP_LOGD("ani QueryExtensionAbilityInfo called"); + OHOS::AAFwk::Want want; + ExtensionAbilityType extensionAbilityType = ExtensionAbilityType::UNSPECIFIED; + std::string extensionTypeName; + bool isExtensionTypeName = CommonFunAni::AniBooleanToBool(aniIsExtensionTypeName); + + if (!ParseAniWant(env, aniWant, want)) { + APP_LOGE("ParseAniWant failed"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_WANT_ERROR); + return nullptr; + } + if (isExtensionTypeName) { + if (!CommonFunAni::ParseString(env, aniExtensionAbilityTypeName, extensionTypeName)) { + APP_LOGE("parse extensionTypeName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, EXTENSION_TYPE_NAME, TYPE_STRING); + return nullptr; + } + } else { + if (!EnumUtils::EnumETSToNative(env, aniExtensionAbilityType, extensionAbilityType)) { + APP_LOGE("Parse extensionAbilityType failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, EXTENSION_ABILITY_TYPE, TYPE_NUMBER); + return nullptr; + } + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + std::string key = want.ToString() + std::to_string(static_cast(extensionAbilityType)); + const ANIQuery query(key, QUERY_EXTENSION_INFOS_SYNC, aniExtensionAbilityFlags, aniUserId); + { + std::shared_lock lock(g_aniCacheMutex); + auto item = g_aniCache.find(query); + if (item != g_aniCache.end()) { + APP_LOGD("ani extension has cache, no need to query from host"); + return reinterpret_cast(item->second); + } + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + ErrCode ret = ERR_OK; + std::vector extensionInfos; + if (!isExtensionTypeName) { + if (extensionAbilityType == ExtensionAbilityType::UNSPECIFIED) { + APP_LOGD("Query aniExtensionAbilityInfo sync without type"); + ret = iBundleMgr->QueryExtensionAbilityInfosV9(want, aniExtensionAbilityFlags, aniUserId, extensionInfos); + } else { + APP_LOGD("Query aniExtensionAbilityInfo sync with type %{public}d", + static_cast(extensionAbilityType)); + ret = iBundleMgr->QueryExtensionAbilityInfosV9( + want, extensionAbilityType, aniExtensionAbilityFlags, aniUserId, extensionInfos); + } + } else { + APP_LOGD("Query aniExtensionAbilityInfo sync with extensionTypeName %{public}s", extensionTypeName.c_str()); + ret = iBundleMgr->QueryExtensionAbilityInfosWithTypeName( + want, extensionTypeName, aniExtensionAbilityFlags, aniUserId, extensionInfos); + } + + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("QueryExtensionAbilityInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? QUERY_EXTENSION_INFOS_SYNC : QUERY_EXTENSION_INFOS, BUNDLE_PERMISSIONS); + return nullptr; + } + ani_object aniExtensionAbilityInfos = + CommonFunAni::ConvertAniArray(env, extensionInfos, CommonFunAni::ConvertExtensionInfo); + CheckInfoCache(env, query, want, extensionInfos, aniExtensionAbilityInfos); + return aniExtensionAbilityInfos; +} + +static ani_object QueryExAbilityInfoSyncWithoutWant(ani_env* env, ani_string aniExtensionAbilityTypeName, + ani_int aniExtensionAbilityFlags, ani_int aniUserId) +{ + APP_LOGD("ani QueryExAbilityInfoSyncWithoutWant called"); + std::string extensionTypeName; + if (!CommonFunAni::ParseString(env, aniExtensionAbilityTypeName, extensionTypeName)) { + APP_LOGE("parse extensionTypeName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, EXTENSION_TYPE_NAME, TYPE_STRING); + return nullptr; + } + if (extensionTypeName.empty()) { + APP_LOGE("the input extensionAbilityType is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_EXTENSION_ABILITY_TYPE_EMPTY_ERROR); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::vector extensionInfos; + ErrCode ret = iBundleMgr->QueryExtensionAbilityInfosOnlyWithTypeName(extensionTypeName, + (aniExtensionAbilityFlags < 0 ? 0 : static_cast(aniExtensionAbilityFlags)), aniUserId, + extensionInfos); + if (ret != ERR_OK) { + APP_LOGE("QueryExAbilityInfoSync without want failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + QUERY_EXTENSION_INFOS_SYNC, BUNDLE_PERMISSIONS); + return nullptr; + } + return CommonFunAni::ConvertAniArray(env, extensionInfos, CommonFunAni::ConvertExtensionInfo); +} + +static void EnableDynamicIconNative( + ani_env* env, ani_string aniBundleName, ani_string aniModuleName, ani_object aniBundleOptions) +{ + APP_LOGD("ani EnableDynamicIcon called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGE("moduleName %{public}s invalid", moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return; + } + int32_t appIndex = 0; + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + bool isDefault = CommonFunAni::ParseBundleOptions(env, aniBundleOptions, appIndex, userId); + + ErrCode ret = BundleManagerHelper::InnerEnableDynamicIcon(bundleName, moduleName, appIndex, userId, isDefault); + if (ret != ERR_OK) { + APP_LOGE("EnableDynamicIcon failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, ENABLE_DYNAMIC_ICON, + isDefault ? Constants::PERMISSION_ACCESS_DYNAMIC_ICON : BUNDLE_ENABLE_AND_DISABLE_ALL_DYNAMIC_PERMISSIONS); + } +} + +static ani_object GetBundleArchiveInfoNative( + ani_env* env, ani_string aniHapFilePath, ani_int aniBundleFlags, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetBundleArchiveInfoNative called"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + std::string hapFilePath; + if (!CommonFunAni::ParseString(env, aniHapFilePath, hapFilePath)) { + APP_LOGE("hapFilePath parse failed"); + if (isSync) { + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, HAP_FILE_PATH, TYPE_STRING); + } else { + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_TYPE_CHECK_ERROR); + } + return nullptr; + } + BundleInfo bundleInfo; + ErrCode ret = BundleManagerHelper::InnerGetBundleArchiveInfo(hapFilePath, aniBundleFlags, bundleInfo); + if (ret != ERR_OK) { + APP_LOGE("InnerGetBundleArchiveInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, isSync ? GET_BUNDLE_ARCHIVE_INFO_SYNC : GET_BUNDLE_ARCHIVE_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertBundleInfo(env, bundleInfo, aniBundleFlags); +} + +static ani_object GetLaunchWant(ani_env* env) +{ + APP_LOGD("ani GetLaunchWant called"); + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + OHOS::AAFwk::Want want; + ErrCode ret = iBundleMgr->GetLaunchWant(want); + if (ret != ERR_OK) { + APP_LOGE("GetLaunchWant failed ret: %{public}d", ret); + BusinessErrorAni::ThrowError(env, ERROR_GET_LAUNCH_WANT_INVALID, ERR_MSG_LAUNCH_WANT_INVALID); + return nullptr; + } + ElementName elementName = want.GetElement(); + if (elementName.GetBundleName().empty() || elementName.GetAbilityName().empty()) { + APP_LOGE("bundleName or abilityName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_GET_LAUNCH_WANT_INVALID, ERR_MSG_LAUNCH_WANT_INVALID); + return nullptr; + } + + return CommonFunAni::ConvertWantInfo(env, want); +} + +static ErrCode InnerGetProfile(const std::string& moduleName, const std::string& abilityName, + const std::string& metadataName, AbilityProfileType profileType, std::vector& profileVec) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + if (abilityName.empty()) { + APP_LOGE("InnerGetProfile failed due to empty abilityName"); + return ERR_BUNDLE_MANAGER_ABILITY_NOT_EXIST; + } + + if (moduleName.empty()) { + APP_LOGE("InnerGetProfile failed due to empty moduleName"); + return ERR_BUNDLE_MANAGER_MODULE_NOT_EXIST; + } + auto baseFlag = static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_HAP_MODULE) + + static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_METADATA) + + static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_DISABLE); + ErrCode result; + BundleMgrClient client; + BundleInfo bundleInfo; + if (profileType == AbilityProfileType::ABILITY_PROFILE) { + auto getAbilityFlag = baseFlag + + static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_ABILITY); + result = iBundleMgr->GetBundleInfoForSelf(getAbilityFlag, bundleInfo); + if (result != ERR_OK) { + APP_LOGE("GetBundleInfoForSelf failed"); + return result; + } + AbilityInfo targetAbilityInfo; + result = BundleManagerHelper::GetAbilityFromBundleInfo( + bundleInfo, abilityName, moduleName, targetAbilityInfo); + if (result != ERR_OK) { + return result; + } + if (!client.GetProfileFromAbility(targetAbilityInfo, metadataName, profileVec)) { + APP_LOGE("GetProfileFromExtension failed"); + return ERR_BUNDLE_MANAGER_PROFILE_NOT_EXIST; + } + return ERR_OK; + } + + if (profileType == AbilityProfileType::EXTENSION_PROFILE) { + auto getExtensionFlag = baseFlag + + static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_EXTENSION_ABILITY); + result = iBundleMgr->GetBundleInfoForSelf(getExtensionFlag, bundleInfo); + if (result != ERR_OK) { + APP_LOGE("GetBundleInfoForSelf failed"); + return result; + } + + ExtensionAbilityInfo targetExtensionInfo; + result = BundleManagerHelper::GetExtensionFromBundleInfo( + bundleInfo, abilityName, moduleName, targetExtensionInfo); + if (result != ERR_OK) { + return result; + } + if (!client.GetProfileFromExtension(targetExtensionInfo, metadataName, profileVec)) { + APP_LOGE("GetProfileFromExtension failed"); + return ERR_BUNDLE_MANAGER_PROFILE_NOT_EXIST; + } + return ERR_OK; + } + + APP_LOGE("InnerGetProfile failed due to type is invalid"); + return ERR_APPEXECFWK_SERVICE_INTERNAL_ERROR; +} + +static ani_object GetProfileByAbilityNative(ani_env* env, ani_string aniModuleName, ani_string aniAbilityName, + ani_string aniMetadataName, ani_enum_item aniProfileType, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetProfileByAbilityNative called"); + std::string moduleName; + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGE("moduleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::MODULE_NAME, TYPE_STRING); + return nullptr; + } + if (isSync && moduleName.empty()) { + APP_LOGE("param failed due to empty moduleName"); + BusinessErrorAni::ThrowCommonError(env, ERROR_MODULE_NOT_EXIST, "", ""); + return nullptr; + } + std::string abilityName; + if (!CommonFunAni::ParseString(env, aniAbilityName, abilityName)) { + APP_LOGE("abilityName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::ABILITY_NAME, TYPE_STRING); + return nullptr; + } + if (isSync && abilityName.empty()) { + APP_LOGE("param failed due to empty abilityName"); + BusinessErrorAni::ThrowCommonError(env, ERROR_ABILITY_NOT_EXIST, "", ""); + return nullptr; + } + std::string metadataName; + if (!CommonFunAni::ParseString(env, aniMetadataName, metadataName)) { + APP_LOGW("Parse metadataName failed, The default value is undefined"); + } + AbilityProfileType profileType = AbilityProfileType::UNKNOWN_PROFILE; + if (!EnumUtils::EnumETSToNative(env, aniProfileType, profileType)) { + APP_LOGE("Parse profileType failed"); + return nullptr; + } + std::vector profileVec; + ErrCode ret = InnerGetProfile(moduleName, abilityName, metadataName, profileType, profileVec); + if (ret != ERR_OK) { + APP_LOGE("InnerGetProfile failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + (isSync ? (profileType == AbilityProfileType::EXTENSION_PROFILE ? + GET_PROFILE_BY_EXTENSION_ABILITY_SYNC : GET_PROFILE_BY_ABILITY_SYNC) : ""), ""); + return nullptr; + } + return CommonFunAni::ConvertAniArrayString(env, profileVec); +} + +static ani_object GetPermissionDefNative(ani_env* env, ani_string aniPermissionName, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetPermissionDefNative called"); + std::string permissionName; + if (!CommonFunAni::ParseString(env, aniPermissionName, permissionName)) { + APP_LOGE("permissionName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PERMISSION_NAME, TYPE_STRING); + return nullptr; + } + PermissionDef permissionDef; + ErrCode ret = BundleManagerHelper::InnerGetPermissionDef(permissionName, permissionDef); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("InnerGetPermissionDef failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, isSync ? GET_PERMISSION_DEF_SYNC : GET_PERMISSION_DEF, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertPermissionDef(env, permissionDef); +} + +static void CleanBundleCacheFilesNative(ani_env* env, ani_string aniBundleName, ani_int aniAppIndex) +{ + APP_LOGD("ani CleanBundleCacheFilesNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return; + } + if (aniAppIndex < Constants::MAIN_APP_INDEX || aniAppIndex > Constants::CLONE_APP_INDEX_MAX) { + APP_LOGE("appIndex: %{public}d not in valid range", aniAppIndex); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPINDEX, Constants::APP_INDEX, TYPE_NUMBER); + return; + } + + sptr cleanCacheCallback = new (std::nothrow) CleanCacheCallback(); + ErrCode ret = BundleManagerHelper::InnerCleanBundleCacheCallback(bundleName, aniAppIndex, cleanCacheCallback); + if ((ret == ERR_OK) && (cleanCacheCallback != nullptr)) { + APP_LOGI("clean exec wait"); + if (cleanCacheCallback->WaitForCompletion()) { + ret = cleanCacheCallback->GetErr() ? ERR_OK : ERROR_BUNDLE_SERVICE_EXCEPTION; + } else { + APP_LOGI("clean exec timeout"); + ret = ERROR_BUNDLE_SERVICE_EXCEPTION; + } + } + if (ret != ERR_OK) { + APP_LOGE("CleanBundleCacheFiles failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, CLEAN_BUNDLE_CACHE_FILES, Constants::PERMISSION_REMOVECACHEFILE); + } +} + +static ani_long GetAllBundleCacheSizeNative(ani_env* env) +{ + APP_LOGD("ani GetAllBundleCacheSizeNative called"); + sptr cacheCallback = new (std::nothrow) ProcessCacheCallbackHost(); + if (cacheCallback == nullptr) { + APP_LOGE("cacheCallback is null"); + return 0; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return 0; + } + + ErrCode ret = CommonFunc::ConvertErrCode(iBundleMgr->GetAllBundleCacheStat(cacheCallback)); + APP_LOGI("GetAllBundleCacheStat call, result is %{public}d", ret); + if (ret != ERR_OK) { + APP_LOGE("GetAllBundleCacheSize failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_ALL_BUNDLE_CACHE_SIZE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return 0; + } + + uint64_t cacheSize = 0; + APP_LOGI("GetCacheStat wait"); + cacheSize = cacheCallback->GetCacheStat(); + APP_LOGI("GetCacheStat finished"); + if (cacheSize > uint64_t(INT64_MAX)) { + APP_LOGW("value out of range for int64"); + cacheSize = uint64_t(INT64_MAX); + } + + return static_cast(cacheSize); +} + +static void CleanAllBundleCacheNative(ani_env* env) +{ + APP_LOGD("ani CleanAllBundleCacheNative called"); + sptr cacheCallback = new (std::nothrow) ProcessCacheCallbackHost(); + if (cacheCallback == nullptr) { + APP_LOGE("cacheCallback is null"); + return; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return; + } + + ErrCode ret = CommonFunc::ConvertErrCode(iBundleMgr->CleanAllBundleCache(cacheCallback)); + APP_LOGI("CleanAllBundleCache call, result is %{public}d", ret); + if (ret != ERR_OK) { + APP_LOGE("CleanAllBundleCache failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, CLEAN_ALL_BUNDLE_CACHE, Constants::PERMISSION_REMOVECACHEFILE); + return; + } + + APP_LOGI("GetCleanRet wait"); + auto result = cacheCallback->GetCleanRet(); + APP_LOGI("GetCleanRet finished"); + if (result != 0) { + APP_LOGE("CleanAllBundleCache failed, result %{public}d", result); + } +} + +static ani_object GetAppProvisionInfoNative( + ani_env* env, ani_string aniBundleName, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetAppProvisionInfoNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (bundleName.empty()) { + APP_LOGE("bundleName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + AppProvisionInfo appProvisionInfo; + ErrCode ret = BundleManagerHelper::InnerGetAppProvisionInfo(bundleName, aniUserId, appProvisionInfo); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAppProvisionInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, isSync ? GET_APP_PROVISION_INFO_SYNC : GET_APP_PROVISION_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertAppProvisionInfo(env, appProvisionInfo); +} + +static ani_boolean CanOpenLink(ani_env* env, ani_string aniLink) +{ + APP_LOGD("ani CanOpenLink called"); + bool canOpen = false; + std::string link; + if (!CommonFunAni::ParseString(env, aniLink, link)) { + APP_LOGE("link parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, LINK, TYPE_STRING); + return canOpen; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return canOpen; + } + ErrCode ret = iBundleMgr->CanOpenLink(link, canOpen); + if (ret != ERR_OK) { + APP_LOGE("CanOpenLink failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), CAN_OPEN_LINK, ""); + } + return canOpen; +} + +static ani_object GetAllPreinstalledApplicationInfoNative(ani_env* env) +{ + APP_LOGD("ani GetAllPreinstalledApplicationInfoNative called"); + std::vector preinstalledApplicationInfos; + ErrCode ret = BundleManagerHelper::InnerGetAllPreinstalledApplicationInfos(preinstalledApplicationInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAllPreinstalledApplicationInfos failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_ALL_PREINSTALLED_APP_INFOS, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertAniArray( + env, preinstalledApplicationInfos, CommonFunAni::ConvertPreinstalledApplicationInfo); +} + +static ani_object GetAllBundleInfoByDeveloperId(ani_env* env, ani_string aniDeveloperId) +{ + APP_LOGD("ani GetAllBundleInfoByDeveloperId called"); + std::string developerId; + if (!CommonFunAni::ParseString(env, aniDeveloperId, developerId)) { + APP_LOGE("developerId parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, DEVELOPER_ID, TYPE_STRING); + return nullptr; + } + if (developerId.empty()) { + APP_LOGE("developerId is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_DEVELOPER_ID_EMPTY_ERROR); + return nullptr; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::vector bundleInfos; + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + ErrCode ret = iBundleMgr->GetAllBundleInfoByDeveloperId(developerId, bundleInfos, userId); + if (ret != ERR_OK) { + APP_LOGE("GetAllBundleInfoByDeveloperId failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_ALL_BUNDLE_INFO_BY_DEVELOPER_ID, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertAniArray(env, bundleInfos, CommonFunAni::ConvertBundleInfo, + static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_APPLICATION)); +} + +static void SwitchUninstallState(ani_env* env, ani_string aniBundleName, ani_boolean aniState) +{ + APP_LOGD("ani SwitchUninstallState called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return; + } + bool state = CommonFunAni::AniBooleanToBool(aniState); + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return; + } + ErrCode ret = iBundleMgr->SwitchUninstallState(bundleName, state); + if (ret != ERR_OK) { + APP_LOGE("SwitchUninstallState failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), SWITCH_UNINSTALL_STATE, ""); + } +} + +static ani_object GetSignatureInfo(ani_env* env, ani_int aniUid) +{ + APP_LOGD("ani GetSignatureInfo called"); + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + SignatureInfo signatureInfo; + ErrCode ret = iBundleMgr->GetSignatureInfoByUid(aniUid, signatureInfo); + if (ret != ERR_OK) { + APP_LOGE("GetSignatureInfoByUid failed ret: %{public}d, uid is %{public}d", ret, aniUid); + BusinessErrorAni::ThrowCommonError( + env, CommonFunc::ConvertErrCode(ret), GET_SIGNATURE_INFO, GET_SIGNATURE_INFO_PERMISSIONS); + return nullptr; + } + return CommonFunAni::ConvertSignatureInfo(env, signatureInfo); +} + +static ani_object GetAllAppCloneBundleInfoNative( + ani_env* env, ani_string aniBundleName, ani_int aniBundleFlags, ani_int aniUserId) +{ + APP_LOGD("ani GetAllAppCloneBundleInfoNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::vector bundleInfos; + ErrCode ret = BundleManagerHelper::InnerGetAllAppCloneBundleInfo( + bundleName, aniBundleFlags, aniUserId, bundleInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAllAppCloneBundleInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_ALL_APP_CLONE_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + APP_LOGD("GetAllAppCloneBundleInfoNative bundleInfos size: %{public}zu", bundleInfos.size()); + + return CommonFunAni::ConvertAniArray(env, bundleInfos, CommonFunAni::ConvertBundleInfo, aniBundleFlags); +} + +static ani_object GetAllSharedBundleInfoNative(ani_env* env) +{ + APP_LOGD("ani GetAllSharedBundleInfoNative called"); + std::vector sharedBundles; + ErrCode ret = BundleManagerHelper::InnerGetAllSharedBundleInfo(sharedBundles); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAllSharedBundleInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_ALL_SHARED_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertAniArray(env, sharedBundles, CommonFunAni::ConvertSharedBundleInfo); +} + +static ani_object GetSharedBundleInfoNative(ani_env* env, ani_string aniBundleName, ani_string aniModuleName) +{ + APP_LOGD("ani GetSharedBundleInfoNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGE("moduleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::MODULE_NAME, TYPE_STRING); + return nullptr; + } + if (bundleName.empty()) { + APP_LOGE("bundleName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + return nullptr; + } + if (moduleName.empty()) { + APP_LOGE("moduleName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + return nullptr; + } + std::vector sharedBundles; + ErrCode ret = BundleManagerHelper::InnerGetSharedBundleInfo(bundleName, moduleName, sharedBundles); + if (ret != ERR_OK) { + APP_LOGE("InnerGetSharedBundleInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_SHARED_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertAniArray(env, sharedBundles, CommonFunAni::ConvertSharedBundleInfo); +} + +static ani_string GetAdditionalInfo(ani_env* env, ani_string aniBundleName) +{ + APP_LOGD("ani GetAdditionalInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (bundleName.empty()) { + APP_LOGE("bundleName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + return nullptr; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + RESOURCE_NAME_OF_GET_SPECIFIED_DISTRIBUTION_TYPE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + std::string additionalInfo; + ErrCode ret = iBundleMgr->GetAdditionalInfo(bundleName, additionalInfo); + if (ret != ERR_OK) { + APP_LOGE("GetAdditionalInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), RESOURCE_NAME_OF_GET_ADDITIONAL_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + ani_string aniAdditionalInfo = nullptr; + if (!CommonFunAni::StringToAniStr(env, additionalInfo, aniAdditionalInfo)) { + APP_LOGE("StringToAniStr failed"); + return nullptr; + } + return aniAdditionalInfo; +} + +static ani_string GetJsonProfileNative(ani_env* env, ani_enum_item aniProfileType, ani_string aniBundleName, + ani_string aniModuleName, ani_int aniUserId) +{ + APP_LOGD("ani GetJsonProfileNative called"); + ProfileType profileType = ProfileType::INTENT_PROFILE; + if (!EnumUtils::EnumETSToNative(env, aniProfileType, profileType)) { + APP_LOGE("Parse profileType failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PROFILE_TYPE, TYPE_NUMBER); + return nullptr; + } + if (g_supportedProfileList.find(profileType) == g_supportedProfileList.end()) { + APP_LOGE("JS request profile error, type is %{public}d, profile not exist", profileType); + BusinessErrorAni::ThrowCommonError(env, ERROR_PROFILE_NOT_EXIST, PROFILE_TYPE, TYPE_NUMBER); + return nullptr; + } + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (bundleName.empty()) { + APP_LOGE("bundleName is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_NOT_EXIST, GET_JSON_PROFILE, BUNDLE_PERMISSIONS); + return nullptr; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGW("parse moduleName failed, try to get profile from entry module"); + } else if (moduleName.empty()) { + APP_LOGE("moduleName is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_MODULE_NOT_EXIST, GET_JSON_PROFILE, BUNDLE_PERMISSIONS); + return nullptr; + } + if (moduleName == EMPTY_STRING) { + moduleName = ""; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::string profile; + ErrCode ret = iBundleMgr->GetJsonProfile(profileType, bundleName, moduleName, profile, aniUserId); + if (ret != ERR_OK) { + APP_LOGE("GetJsonProfile failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_JSON_PROFILE, BUNDLE_PERMISSIONS); + return nullptr; + } + ani_string aniProfile = nullptr; + if (!CommonFunAni::StringToAniStr(env, profile, aniProfile)) { + APP_LOGE("StringToAniStr failed"); + return nullptr; + } + return aniProfile; +} + +static ani_object GetExtResourceNative(ani_env* env, ani_string aniBundleName) +{ + APP_LOGD("ani GetExtResourceNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::vector moduleNames; + ErrCode ret = BundleManagerHelper::InnerGetExtResource(bundleName, moduleNames); + if (ret != ERR_OK) { + APP_LOGE("InnerGetExtResource failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_EXT_RESOURCE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertAniArrayString(env, moduleNames); +} + +static void DisableDynamicIconNative(ani_env* env, ani_string aniBundleName, ani_object aniBundleOptions) +{ + APP_LOGD("ani DisableDynamicIconNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return; + } + int32_t appIndex = 0; + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + bool isDefault = CommonFunAni::ParseBundleOptions(env, aniBundleOptions, appIndex, userId); + + ErrCode ret = BundleManagerHelper::InnerDisableDynamicIcon(bundleName, appIndex, userId, isDefault); + if (ret != ERR_OK) { + APP_LOGE("InnerDisableDynamicIcon failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, DISABLE_DYNAMIC_ICON, + isDefault ? Constants::PERMISSION_ACCESS_DYNAMIC_ICON : BUNDLE_ENABLE_AND_DISABLE_ALL_DYNAMIC_PERMISSIONS); + } +} + +static ani_object GetDynamicIconInfoNative(ani_env* env, ani_string aniBundleName) +{ + APP_LOGD("ani GetDynamicIconInfoNative called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + + std::vector dynamicIconInfos; + ErrCode ret = BundleManagerHelper::InnerGetDynamicIconInfo(bundleName, dynamicIconInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetDynamicIconInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, GET_DYNAMIC_ICON_INFO, BUNDLE_GET_ALL_DYNAMIC_PERMISSIONS); + return nullptr; + } + return CommonFunAni::ConvertAniArray(env, dynamicIconInfos, CommonFunAni::ConvertDynamicIconInfo); +} + +static ani_object GetAllDynamicIconInfoNative(ani_env* env, ani_int aniUserId) +{ + APP_LOGD("ani GetAllDynamicIconInfoNative called"); + aniUserId = (aniUserId == EMPTY_USER_ID) ? Constants::UNSPECIFIED_USERID + : (aniUserId < 0) ? Constants::INVALID_USERID : aniUserId; + std::vector dynamicIconInfos; + ErrCode ret = BundleManagerHelper::InnerGetAllDynamicIconInfo(aniUserId, dynamicIconInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAllDynamicIconInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, GET_ALL_DYNAMIC_ICON, BUNDLE_GET_ALL_DYNAMIC_PERMISSIONS); + return nullptr; + } + return CommonFunAni::ConvertAniArray(env, dynamicIconInfos, CommonFunAni::ConvertDynamicIconInfo); +} + +static void VerifyAbcNative(ani_env* env, ani_object aniAbcPaths, ani_boolean aniDeleteOriginalFiles) +{ + APP_LOGD("ani VerifyAbcNative called"); + std::vector abcPaths; + if (!CommonFunAni::ParseStrArray(env, aniAbcPaths, abcPaths)) { + APP_LOGE("ParseStrArray failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, VERIFY_ABC, TYPE_ARRAY); + return; + } + bool flag = CommonFunAni::AniBooleanToBool(aniDeleteOriginalFiles); + + ErrCode ret = BundleManagerHelper::InnerVerify(abcPaths, flag); + if (ret != ERR_OK) { + APP_LOGE("InnerVerify failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, VERIFY_ABC, Constants::PERMISSION_RUN_DYN_CODE); + } +} + +static void DeleteAbcNative(ani_env* env, ani_string aniAbcPath) +{ + APP_LOGD("ani DeleteAbcNative called"); + std::string deletePath; + if (!CommonFunAni::ParseString(env, aniAbcPath, deletePath)) { + APP_LOGE("deletePath parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, DELETE_ABC, TYPE_STRING); + return; + } + + ErrCode ret = BundleManagerHelper::InnerDeleteAbc(deletePath); + if (ret != ERR_OK) { + APP_LOGE("InnerDeleteAbc failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, DELETE_ABC, Constants::PERMISSION_RUN_DYN_CODE); + } +} + +static ani_object GetRecoverableApplicationInfoNative(ani_env* env) +{ + APP_LOGD("ani GetRecoverableApplicationInfoNative called"); + std::vector recoverableApplicationInfos; + ErrCode ret = BundleManagerHelper::InnerGetRecoverableApplicationInfo(recoverableApplicationInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetRecoverableApplicationInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_RECOVERABLE_APPLICATION_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertAniArray( + env, recoverableApplicationInfos, CommonFunAni::ConvertRecoverableApplicationInfo); +} + +static void SetAdditionalInfo(ani_env* env, ani_string aniBundleName, ani_string aniAdditionalInfo) +{ + APP_LOGD("ani SetAdditionalInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, Constants::BUNDLE_NAME, TYPE_STRING); + return; + } + if (bundleName.empty()) { + APP_LOGE("bundleName is empty"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + return; + } + std::string additionalInfo; + if (!CommonFunAni::ParseString(env, aniAdditionalInfo, additionalInfo)) { + APP_LOGE("additionalInfo parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, ADDITIONAL_INFO, TYPE_STRING); + return; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return; + } + ErrCode ret = iBundleMgr->SetAdditionalInfo(bundleName, additionalInfo); + if (ret != ERR_OK) { + APP_LOGE("SetAdditionalInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), RESOURCE_NAME_OF_SET_ADDITIONAL_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + } +} + +static ani_object GetDeveloperIdsNative(ani_env* env, ani_int aniAppDistributionType) +{ + APP_LOGD("ani GetDeveloperIdsNative called"); + if (aniAppDistributionType != EMPTY_VALUE && + appDistributionTypeMap.find(aniAppDistributionType) == appDistributionTypeMap.end()) { + APP_LOGE("request error, type %{public}d is invalid", aniAppDistributionType); + BusinessErrorAni::ThrowEnumError(env, APP_DISTRIBUTION_TYPE, APP_DISTRIBUTION_TYPE_ENUM); + return nullptr; + } + std::string distributionType = std::string { appDistributionTypeMap[aniAppDistributionType] }; + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return nullptr; + } + std::vector developerIds; + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + ErrCode ret = iBundleMgr->GetDeveloperIds(distributionType, developerIds, userId); + if (ret != ERR_OK) { + APP_LOGE( + "GetDeveloperIds failed ret: %{public}d, appDistributionType is %{public}s", ret, distributionType.c_str()); + BusinessErrorAni::ThrowCommonError( + env, CommonFunc::ConvertErrCode(ret), GET_DEVELOPER_IDS, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertAniArrayString(env, developerIds); +} + +static ani_object GetAllPluginInfoNative(ani_env* env, ani_string aniHostBundleName, ani_int aniUserId) +{ + APP_LOGD("ani GetAllPluginInfoNative called"); + std::string hostBundleName; + if (!CommonFunAni::ParseString(env, aniHostBundleName, hostBundleName)) { + APP_LOGE("Plugin bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, HOST_BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + std::vector pluginBundleInfos; + ErrCode ret = BundleManagerHelper::InnerGetAllPluginInfo(hostBundleName, aniUserId, pluginBundleInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAllPluginInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_ALL_PLUGIN_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertAniArray(env, pluginBundleInfos, CommonFunAni::ConvertPluginBundleInfo); +} + +static void MigrateDataNative(ani_env* env, ani_object aniSourcePaths, ani_string aniDestinationPath) +{ + APP_LOGD("ani MigrateDataNative called"); + std::vector sourcePaths; + if (!CommonFunAni::ParseStrArray(env, aniSourcePaths, sourcePaths)) { + APP_LOGE("ParseStrArray failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, SOURCE_PATHS, TYPE_ARRAY); + return; + } + std::string destinationPath; + if (!CommonFunAni::ParseString(env, aniDestinationPath, destinationPath)) { + APP_LOGE("DestinationPath parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, DESTINATION_PATH, TYPE_STRING); + return; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); + return; + } + + ErrCode ret = iBundleMgr->MigrateData(sourcePaths, destinationPath); + if (ret != ERR_OK) { + APP_LOGE("MigrateData failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, + CommonFunc::ConvertErrCode(ret), MIGRATE_DATA, Constants::PERMISSION_MIGRATE_DATA); + } +} + +static ani_string GetSandboxDataDir(ani_env* env, ani_string aniBundleName, ani_int aniAppIndex) +{ + APP_LOGD("ani GetSandboxDataDir called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("bundleName parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (aniAppIndex < Constants::MAIN_APP_INDEX || aniAppIndex > Constants::CLONE_APP_INDEX_MAX) { + APP_LOGE("appIndex: %{public}d not in valid range", aniAppIndex); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPINDEX, Constants::APP_INDEX, TYPE_NUMBER); + return nullptr; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, GET_SANDBOX_DATA_DIR_SYNC, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + std::string sandboxDataDir; + ErrCode ret = iBundleMgr->GetSandboxDataDir(bundleName, aniAppIndex, sandboxDataDir); + if (ret != ERR_OK) { + APP_LOGE("GetSandboxDataDirSync failed ret %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_SANDBOX_DATA_DIR_SYNC, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + ani_string aniSandboxDataDir = nullptr; + if (!CommonFunAni::StringToAniStr(env, sandboxDataDir, aniSandboxDataDir)) { + APP_LOGE("StringToAniStr failed"); + return nullptr; + } + return aniSandboxDataDir; +} + +static ani_object GetAppCloneIdentityBySandboxDataDir(ani_env* env, ani_string aniSandboxDataDir) +{ + APP_LOGD("ani GetAppCloneIdentityBySandboxDataDir called"); + std::string sandboxDataDir; + if (!CommonFunAni::ParseString(env, aniSandboxDataDir, sandboxDataDir)) { + APP_LOGE("sandboxDataDir parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, SANDBOX_DATA_DIR, TYPE_STRING); + return nullptr; + } + std::string bundleName; + int32_t appIndex = 0; + CommonFunc::GetBundleNameAndIndexBySandboxDataDir(sandboxDataDir, bundleName, appIndex); + + return CommonFunAni::ConvertAppCloneIdentity(env, bundleName, appIndex); +} + +static ani_object GetAbilityInfoNative(ani_env* env, ani_string aniUri, ani_int aniAbilityFlags) +{ + APP_LOGD("ani GetAbilityInfoNative called"); + std::string uri; + if (!CommonFunAni::ParseString(env, aniUri, uri)) { + APP_LOGE("uri parse failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, URI, TYPE_STRING); + return nullptr; + } + if (uri.empty()) { + APP_LOGE("uri empty"); + BusinessErrorAni::ThrowCommonError( + env, ERROR_ABILITY_NOT_EXIST, GET_ABILITY_INFOS, GET_ABILITYINFO_PERMISSIONS); + return nullptr; + } + uint32_t flags = static_cast(aniAbilityFlags); + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + const ANIQuery query(uri, GET_ABILITY_INFOS, flags, userId); + { + std::shared_lock lock(g_aniCacheMutex); + auto item = g_aniCache.find(query); + if (item != g_aniCache.end()) { + APP_LOGD("has cache, no need to query from host"); + return reinterpret_cast(item->second); + } + } + std::vector abilityInfos; + ErrCode ret = BundleManagerHelper::InnerGetAbilityInfos(uri, flags, abilityInfos); + if (ret != ERR_OK) { + APP_LOGE("InnerGetAbilityInfos failed ret %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, GET_ABILITY_INFOS, GET_ABILITYINFO_PERMISSIONS); + return nullptr; + } + ani_object aniAbilityInfos = CommonFunAni::ConvertAniArray(env, abilityInfos, CommonFunAni::ConvertAbilityInfo); + if (abilityInfos.size() == EXPLICIT_QUERY_RESULT_LEN) { + CheckToCache(env, abilityInfos[0].uid, IPCSkeleton::GetCallingUid(), query, aniAbilityInfos); + } + return aniAbilityInfos; +} + extern "C" { ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) { @@ -296,6 +1943,81 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) reinterpret_cast(GetBundleInfoForSelfNative) }, ani_native_function { "getBundleInfoNative", nullptr, reinterpret_cast(GetBundleInfoNative) }, ani_native_function { "getApplicationInfoNative", nullptr, reinterpret_cast(GetApplicationInfoNative) }, + ani_native_function { "getAllBundleInfoNative", nullptr, reinterpret_cast(GetAllBundleInfoNative) }, + ani_native_function { "getAllApplicationInfoNative", nullptr, + reinterpret_cast(GetAllApplicationInfoNative) }, + ani_native_function { "queryAbilityInfoSyncNative", nullptr, + reinterpret_cast(QueryAbilityInfoSyncNative) }, + ani_native_function { "getAppCloneIdentityNative", nullptr, + reinterpret_cast(GetAppCloneIdentityNative) }, + ani_native_function { "getAbilityLabelNative", nullptr, reinterpret_cast(GetAbilityLabelNative) }, + ani_native_function { "getLaunchWantForBundleNative", nullptr, + reinterpret_cast(GetLaunchWantForBundleNative) }, + ani_native_function { "getAppCloneBundleInfoNative", nullptr, + reinterpret_cast(GetAppCloneBundleInfoNative) }, + ani_native_function { "getSpecifiedDistributionType", nullptr, + reinterpret_cast(GetSpecifiedDistributionType) }, + ani_native_function { "getBundleNameByUidNative", nullptr, reinterpret_cast(GetBundleNameByUidNative) }, + ani_native_function { "queryExtensionAbilityInfoNative", nullptr, + reinterpret_cast(QueryExtensionAbilityInfoNative) }, + ani_native_function { "queryExAbilityInfoSyncWithoutWantNative", nullptr, + reinterpret_cast(QueryExAbilityInfoSyncWithoutWant) }, + ani_native_function { "isAbilityEnabledNative", nullptr, + reinterpret_cast(IsAbilityEnabledNative) }, + ani_native_function { "setAbilityEnabledNative", nullptr, + reinterpret_cast(SetAbilityEnabledNative) }, + ani_native_function { "setApplicationEnabledNative", nullptr, + reinterpret_cast(SetApplicationEnabledNative) }, + ani_native_function { "getDynamicIconNative", nullptr, reinterpret_cast(GetDynamicIconNative) }, + ani_native_function { "queryAbilityInfoWithWantsNative", nullptr, + reinterpret_cast(QueryAbilityInfoWithWantsNative) }, + ani_native_function { "enableDynamicIconNative", nullptr, reinterpret_cast(EnableDynamicIconNative) }, + ani_native_function { "getBundleArchiveInfoNative", nullptr, + reinterpret_cast(GetBundleArchiveInfoNative) }, + ani_native_function { "getLaunchWant", nullptr, reinterpret_cast(GetLaunchWant) }, + ani_native_function { "getProfileByAbilityNative", nullptr, + reinterpret_cast(GetProfileByAbilityNative) }, + ani_native_function { "getPermissionDefNative", nullptr, reinterpret_cast(GetPermissionDefNative) }, + ani_native_function { "cleanBundleCacheFilesNative", nullptr, + reinterpret_cast(CleanBundleCacheFilesNative) }, + ani_native_function { "getAllBundleCacheSizeNative", nullptr, + reinterpret_cast(GetAllBundleCacheSizeNative) }, + ani_native_function { "cleanAllBundleCacheNative", nullptr, + reinterpret_cast(CleanAllBundleCacheNative) }, + ani_native_function { "getAppProvisionInfoNative", nullptr, + reinterpret_cast(GetAppProvisionInfoNative) }, + ani_native_function { "canOpenLink", nullptr, reinterpret_cast(CanOpenLink) }, + ani_native_function { "getAllPreinstalledApplicationInfoNative", nullptr, + reinterpret_cast(GetAllPreinstalledApplicationInfoNative) }, + ani_native_function { "getAllBundleInfoByDeveloperId", nullptr, + reinterpret_cast(GetAllBundleInfoByDeveloperId) }, + ani_native_function { "switchUninstallState", nullptr, reinterpret_cast(SwitchUninstallState) }, + ani_native_function { "getSignatureInfo", nullptr, reinterpret_cast(GetSignatureInfo) }, + ani_native_function { "getAllAppCloneBundleInfoNative", nullptr, + reinterpret_cast(GetAllAppCloneBundleInfoNative) }, + ani_native_function { "getAllSharedBundleInfoNative", nullptr, + reinterpret_cast(GetAllSharedBundleInfoNative) }, + ani_native_function { "getSharedBundleInfoNative", nullptr, + reinterpret_cast(GetSharedBundleInfoNative) }, + ani_native_function { "getAdditionalInfo", nullptr, reinterpret_cast(GetAdditionalInfo) }, + ani_native_function { "getJsonProfileNative", nullptr, reinterpret_cast(GetJsonProfileNative) }, + ani_native_function { "getExtResourceNative", nullptr, reinterpret_cast(GetExtResourceNative) }, + ani_native_function { "disableDynamicIconNative", nullptr, reinterpret_cast(DisableDynamicIconNative) }, + ani_native_function { "getDynamicIconInfoNative", nullptr, reinterpret_cast(GetDynamicIconInfoNative) }, + ani_native_function { "getAllDynamicIconInfoNative", nullptr, + reinterpret_cast(GetAllDynamicIconInfoNative) }, + ani_native_function { "verifyAbcNative", nullptr, reinterpret_cast(VerifyAbcNative) }, + ani_native_function { "deleteAbcNative", nullptr, reinterpret_cast(DeleteAbcNative) }, + ani_native_function { "getRecoverableApplicationInfoNative", nullptr, + reinterpret_cast(GetRecoverableApplicationInfoNative) }, + ani_native_function { "setAdditionalInfo", nullptr, reinterpret_cast(SetAdditionalInfo) }, + ani_native_function { "getDeveloperIdsNative", nullptr, reinterpret_cast(GetDeveloperIdsNative) }, + ani_native_function { "getAllPluginInfoNative", nullptr, reinterpret_cast(GetAllPluginInfoNative) }, + ani_native_function { "migrateDataNative", nullptr, reinterpret_cast(MigrateDataNative) }, + ani_native_function { "getSandboxDataDir", nullptr, reinterpret_cast(GetSandboxDataDir) }, + ani_native_function { "getAppCloneIdentityBySandboxDataDir", nullptr, + reinterpret_cast(GetAppCloneIdentityBySandboxDataDir) }, + ani_native_function { "getAbilityInfoNative", nullptr, reinterpret_cast(GetAbilityInfoNative) }, }; res = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); diff --git a/interfaces/kits/ani/bundle_manager/ets/@ohos.bundle.bundleManager.ets b/interfaces/kits/ani/bundle_manager/ets/@ohos.bundle.bundleManager.ets index eb4e2f55b291802eed92fec26c4bf33f76ebfafe..0291e78efb94ee21cffd1f097bec1ec3d8f2c1fc 100644 --- a/interfaces/kits/ani/bundle_manager/ets/@ohos.bundle.bundleManager.ets +++ b/interfaces/kits/ani/bundle_manager/ets/@ohos.bundle.bundleManager.ets @@ -13,16 +13,41 @@ * limitations under the License. */ -import { BundleInfo } from 'bundleManager.BundleInfo'; +import { BundleInfo, AppCloneIdentity, SignatureInfo, BundleOptions, DynamicIconInfo } from 'bundleManager.BundleInfo'; import { AsyncCallback, BusinessError } from '@ohos.base'; -import { ApplicationInfo } from 'bundleManager.ApplicationInfo'; -import { BundleInfoInner } from './bundleManager/BundleInfoInner'; +import { PreinstalledApplicationInfo, ApplicationInfo } from 'bundleManager.ApplicationInfo'; +import { AbilityInfo } from 'bundleManager.AbilityInfo'; +import { ExtensionAbilityInfo } from 'bundleManager.ExtensionAbilityInfo'; +import { PermissionDef } from 'bundleManager.PermissionDef'; +import { SharedBundleInfo } from 'bundleManager.SharedBundleInfo' +import { AppProvisionInfo } from 'bundleManager.AppProvisionInfo' +import { RecoverableApplicationInfo } from 'bundleManager.RecoverableApplicationInfo' +import { PluginBundleInfo } from 'bundleManager.PluginBundleInfo'; +import Want from '@ohos.app.ability.Want'; +import { BundleOptionsInner } from './bundleManager/BundleInfoInner'; namespace bundleManager { loadLibrary("ani_bundle_manager.z"); - const EMPTY_USER_ID: number = -500; + const EMPTY_VALUE: int = -500; + const EMPTY_STRING: string = "ani empty string"; + const MAIN_APP_INDEX: int = 0; + const CLONE_APP_INDEX_MAX: int = 5; + const ERROR_INVALID_APPINDEX_CODE: int = 17700061; + const ERROR_INVALID_APPINDEX_MSG: string = "BusinessError 17700061: The specified app index is invalid."; + const ERROR_PARAM_CHECK_ERROR: int = 401; + const PARAM_BUNDLENAME_EMPTY_ERROR: string = "BusinessError 401: Parameter error. parameter bundleName is empty"; + const ERROR_ABILITY_NOT_EXIST: int = 17700003; + const GETABILITYINFO_ERROR_MSG: string = "BusinessError 17700003: The specified ability is not found."; + + function createBusinessError(code: int, message: string) { + let err = new BusinessError(); + err.code = code; + err.name = 'Error'; + err.message = message; + return err; + } enum BundleFlag { GET_BUNDLE_INFO_DEFAULT = 0x00000000, @@ -178,31 +203,232 @@ namespace bundleManager { FLAG_PREINSTALLED_APP_UPDATE = 0x00000040, } - export native function getBundleInfoForSelfNative(bundleFlags: number, isSync: boolean): BundleInfo; - export native function getBundleInfoNative(bundleName: string, bundleFlags: number, userId: number, isSync: boolean) : BundleInfo; - export native function getApplicationInfoNative(bundleName: string, applicationFlags: number, userId: number, isSync: boolean): ApplicationInfo; - export native function isApplicationEnabledNative(bundleName: string, appIndex: number, isSync: boolean): boolean; + export enum AbilityProfileType { + ABILITY_PROFILE = 0, + EXTENSION_PROFILE = 1, + UNKNOWN_PROFILE = 2 + } + + export native function getBundleInfoForSelfNative(bundleFlags: int, isSync: boolean): BundleInfo; + + export native function getBundleInfoNative(bundleName: string, bundleFlags: int, userId: int, isSync: boolean) : BundleInfo; + + export native function getApplicationInfoNative(bundleName: string, applicationFlags: int, userId: int, isSync: boolean): ApplicationInfo; + + export native function getAllBundleInfoNative(bundleFlags: int, userId: int): Array; + + export native function getAllApplicationInfoNative(appFlags: int, userId: int): Array; + + export native function isApplicationEnabledNative(bundleName: string, appIndex: int, isSync: boolean): boolean; + + export native function queryAbilityInfoSyncNative(want: Want, abilityFlags: int, userId: int, isSync: boolean): Array; + + export native function getAppCloneIdentityNative(uid: int): AppCloneIdentity; + + export native function getAbilityLabelNative(bundleName: string, moduleName: string, abilityName: string, isSync: boolean): string; + + export native function getLaunchWantForBundleNative(bundleName: string, userId: int, isSync: boolean): Want; + + export native function getAppCloneBundleInfoNative(bundleName: string, appIndex: int, + bundleFlags: int, userId: int): BundleInfo; + + export native function getSpecifiedDistributionType(bundleName: string): string; + + export native function getBundleNameByUidNative(uid: int, isSync: boolean): string; - function getBundleInfoForSelfSync(bundleFlags: number): BundleInfo { + export native function isAbilityEnabledNative(info: AbilityInfo, appIndex: int, isSync: boolean): boolean; + + export native function setAbilityEnabledNative(info: AbilityInfo, isEnabled: boolean, appIndex: int, isSync: boolean): void; + + export native function setApplicationEnabledNative(bundleName: string, isEnabled: boolean, appIndex: int, isSync: boolean): void; + + export native function getDynamicIconNative(bundleName: string): string; + + export native function queryAbilityInfoWithWantsNative(wants: Array, abilityFlags: int, + userId: int): Array; + + export native function queryExtensionAbilityInfoNative(want: Want, extensionAbilityType: ExtensionAbilityType, + extensionAbilityTypeName: string, extensionAbilityFlags: int, + userId: int, isExtensionTypeName: boolean, isSync: boolean): Array; + + export native function queryExAbilityInfoSyncWithoutWantNative(extensionAbilityType: string, extensionAbilityFlags: int, + userId: int): Array; + + export native function enableDynamicIconNative(bundleName: string, moduleName: string, option: BundleOptions): void; + + function getBundleInfoForSelfSync(bundleFlags: int): BundleInfo { return bundleManager.getBundleInfoForSelfNative(bundleFlags, true); } - function getBundleInfoForSelf(bundleFlags: number, callback: AsyncCallback): void { + function getAbilityLabelSync(bundleName: string, moduleName: string, abilityName: string): string { + return bundleManager.getAbilityLabelNative(bundleName, moduleName, abilityName, true); + } + + function getBundleNameByUidSync(uid: int): string { + return bundleManager.getBundleNameByUidNative(uid, true); + } + + export native function getBundleArchiveInfoNative(hapFilePath: string, bundleFlags: int, isSync: boolean): BundleInfo; + + export native function getLaunchWant(): Want; + + export native function getProfileByAbilityNative(moduleName: string, + abilityName: string, metadataName: string, profileType: AbilityProfileType, isSync: boolean): Array; + + export native function getPermissionDefNative(permissionName: string, isSync: boolean): PermissionDef; + + export native function cleanBundleCacheFilesNative(bundleName: string, appIndex: int): void; + + export native function getAllBundleCacheSizeNative(): long; + + export native function cleanAllBundleCacheNative(): void; + + export native function getAppProvisionInfoNative(bundleName: string, userId: int, isSync: boolean): AppProvisionInfo; + + export native function canOpenLink(link: string): boolean; + + export native function getAllPreinstalledApplicationInfoNative(): Array; + + export native function getAllBundleInfoByDeveloperId(developerId: string): Array; + + export native function switchUninstallState(bundleName: string, state: boolean): void; + + export native function getSignatureInfo(uid: int): SignatureInfo; + + export native function getAllAppCloneBundleInfoNative(bundleName: string, + bundleFlags: int, userId: int): Array; + + export native function getAllSharedBundleInfoNative(): Array; + + export native function getSharedBundleInfoNative(bundleName: string, moduleName: string): Array; + + export native function getAdditionalInfo(bundleName: string): string; + + export native function getJsonProfileNative(profileType: ProfileType, bundleName: string, moduleName: string, userId: int): string; + + export native function getExtResourceNative(bundleName: string): Array; + + export native function disableDynamicIconNative(bundleName: string, option: BundleOptions): void; + + export native function getDynamicIconInfoNative(bundleName: string): Array; + + export native function getAllDynamicIconInfoNative(userId: int): Array; + + export native function verifyAbcNative(abcPaths: Array, deleteOriginalFiles: boolean): void; + + export native function getRecoverableApplicationInfoNative(): Array; + + export native function setAdditionalInfo(bundleName: string, additionalInfo: string): void; + + export native function deleteAbcNative(abcPath: string): void; + + export native function getDeveloperIdsNative(appDistributionType: int): Array; + + export native function getAllPluginInfoNative(hostBundleName: string, userId: int): Array; + + export native function migrateDataNative(sourcePaths: Array, destinationPath: string): void; + + export native function getSandboxDataDir(bundleName: string, appIndex: int): string; + + export native function getAppCloneIdentityBySandboxDataDir(sandboxDataDir: string): AppCloneIdentity; + + export native function getAbilityInfoNative(uri: string, abilityFlags: int): Array; + + function isApplicationEnabledSync(bundleName: string): boolean { + return bundleManager.isApplicationEnabledNative(bundleName, 0, true); + } + + function queryAbilityInfoSync(want: Want, abilityFlags: int, userId?: int): Array { + let userIdInfo: int = userId ?? EMPTY_VALUE; + return bundleManager.queryAbilityInfoSyncNative(want, abilityFlags, userIdInfo, true); + } + + function getLaunchWantForBundleSync(bundleName: string, userId?: int): Want { + let userIdInfo: int = userId ?? EMPTY_VALUE; + return bundleManager.getLaunchWantForBundleNative(bundleName, userIdInfo, true); + } + + function isAbilityEnabledSync(info: AbilityInfo): boolean { + return bundleManager.isAbilityEnabledNative(info, 0, true); + } + + function setAbilityEnabledSync(info: AbilityInfo, isEnabled: boolean): void { + return bundleManager.setAbilityEnabledNative(info, isEnabled, 0, true); + } + + function setApplicationEnabledSync(bundleName: string, isEnabled: boolean): void { + return bundleManager.setApplicationEnabledNative(bundleName, isEnabled, 0, true); + } + + function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: ExtensionAbilityType, + extensionAbilityFlags: int, userId?: int): Array { + let userIdInfo: int = userId ?? EMPTY_VALUE; + return bundleManager.queryExtensionAbilityInfoNative( + want, extensionAbilityType, "", extensionAbilityFlags, userIdInfo, false, true); + } + + function queryExtensionAbilityInfoSync(want: Want, extensionAbilityType: string, extensionAbilityFlags: int, + userId?: int): Array { + let userIdInfo: int = userId ?? EMPTY_VALUE; + return bundleManager.queryExtensionAbilityInfoNative( + want, ExtensionAbilityType.UNSPECIFIED, extensionAbilityType, extensionAbilityFlags, userIdInfo, true, true); + } + + function queryExtensionAbilityInfoSync(extensionAbilityType: string, extensionAbilityFlags: int, + userId?: int): Array { + let userIdInfo: int = userId ?? EMPTY_VALUE; + return bundleManager.queryExAbilityInfoSyncWithoutWantNative(extensionAbilityType, extensionAbilityFlags, userIdInfo); + } + + function getBundleArchiveInfoSync(hapFilePath: string, bundleFlags: int): BundleInfo { + return bundleManager.getBundleArchiveInfoNative(hapFilePath, bundleFlags, true); + } + + function getProfileByAbilitySync(moduleName: string, abilityName: string, metadataName?: string): Array { + let metadataNameInfo: string = metadataName ?? ""; + return bundleManager.getProfileByAbilityNative(moduleName, abilityName, metadataNameInfo, AbilityProfileType.ABILITY_PROFILE, true); + } + + function getProfileByExtensionAbilitySync(moduleName: string, + extensionAbilityName: string, metadataName?: string): Array { + let metadataNameInfo: string = metadataName ?? ""; + return bundleManager.getProfileByAbilityNative(moduleName, extensionAbilityName, metadataNameInfo, AbilityProfileType.EXTENSION_PROFILE, true); + } + + function getPermissionDefSync(permissionName: string): PermissionDef { + return bundleManager.getPermissionDefNative(permissionName, true); + } + + function getAppProvisionInfoSync(bundleName: string, userId?: int): AppProvisionInfo { + let userIdInfo: int = userId ?? EMPTY_VALUE; + return bundleManager.getAppProvisionInfoNative(bundleName, userIdInfo, true); + } + + function getJsonProfile(profileType: ProfileType, bundleName: string, moduleName?: string, userId?: int): string { + let userIdInfo: int = userId ?? -2; + let moduleNameInfo: string = moduleName ?? EMPTY_STRING; + return bundleManager.getJsonProfileNative(profileType, bundleName, moduleNameInfo, userIdInfo); + } + + function getDeveloperIds(appDistributionType?: int): Array { + let appDistributionTypeInfo: int = appDistributionType ?? EMPTY_VALUE; + return bundleManager.getDeveloperIdsNative(appDistributionTypeInfo); + } + + function getBundleInfoForSelf(bundleFlags: int, callback: AsyncCallback):void { let execFun = (): BundleInfo => { return bundleManager.getBundleInfoForSelfNative(bundleFlags, false); }; let p1 = taskpool.execute(execFun); p1.then((e: NullishType) => { let resultBundleInfo: BundleInfo = e as BundleInfo; - let r = new BusinessError(); - callback(r, resultBundleInfo); + callback(null, resultBundleInfo); }, (err: Error): void => { - let resultBundleInfo = new BundleInfoInner(); - callback(err as BusinessError, resultBundleInfo); + callback(err as BusinessError, undefined); }); } - function getBundleInfoForSelf(bundleFlags: number):Promise { + function getBundleInfoForSelf(bundleFlags: int):Promise { let p = new Promise((resolve: (bundleInfo: BundleInfo) => void, reject: (error: BusinessError) => void) => { let execFun = (): BundleInfo => { return bundleManager.getBundleInfoForSelfNative(bundleFlags, false); @@ -219,17 +445,17 @@ namespace bundleManager { return p; } - function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo { - return bundleManager.getBundleInfoNative(bundleName, bundleFlags, EMPTY_USER_ID, true); + function getBundleInfoSync(bundleName: string, bundleFlags: int, userId: int): BundleInfo { + return bundleManager.getBundleInfoNative(bundleName, bundleFlags, userId, true); } - function getBundleInfoSync(bundleName: string, bundleFlags: number, userId: number): BundleInfo { - return bundleManager.getBundleInfoNative(bundleName, bundleFlags, userId, true); + function getBundleInfoSync(bundleName: string, bundleFlags: int): BundleInfo { + return bundleManager.getBundleInfoNative(bundleName, bundleFlags, EMPTY_VALUE, true); } - function getBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise { + function getBundleInfo(bundleName: string, bundleFlags: int, userId?: int): Promise { let p = new Promise((resolve: (bundleInfo: BundleInfo) => void, reject: (error: BusinessError) => void) => { - let userIdInfo: number = userId ?? EMPTY_USER_ID; + let userIdInfo: int = userId ?? EMPTY_VALUE; let execFun = (): BundleInfo => { return bundleManager.getBundleInfoNative(bundleName, bundleFlags, userIdInfo, false); }; @@ -245,46 +471,1255 @@ namespace bundleManager { return p; } - function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback): void { + function getBundleInfo(bundleName: string, bundleFlags: int, callback: AsyncCallback): void { let execFun = (): BundleInfo => { - return bundleManager.getBundleInfoNative(bundleName, bundleFlags, EMPTY_USER_ID, false); + return bundleManager.getBundleInfoNative(bundleName, bundleFlags, EMPTY_VALUE, false); }; let p1 = taskpool.execute(execFun); p1.then((e: NullishType) => { let resultBundleInfo: BundleInfo = e as BundleInfo; - let r = new BusinessError(); - callback(r, resultBundleInfo); + callback(null, resultBundleInfo); },(err: Error): void => { - let resultBundleInfo = new BundleInfoInner(); - callback(err as BusinessError, resultBundleInfo); + callback(err as BusinessError, undefined); }); } - function getBundleInfo(bundleName: string, bundleFlags: number, userId: number, callback: AsyncCallback): void { + function getBundleInfo(bundleName: string, bundleFlags: int, userId: int, callback: AsyncCallback): void { let execFun = (): BundleInfo => { return bundleManager.getBundleInfoNative(bundleName, bundleFlags, userId, false); }; let p1 = taskpool.execute(execFun); p1.then((e: NullishType) => { let resultBundleInfo: BundleInfo = e as BundleInfo; - let r = new BusinessError(); - callback(r, resultBundleInfo); + callback(null, resultBundleInfo); },(err: Error): void => { - let resultBundleInfo = new BundleInfoInner(); - callback(err as BusinessError, resultBundleInfo); + callback(err as BusinessError, undefined); }); } - function getApplicationInfoSync(bundleName: string, applicationFlags: number): ApplicationInfo { - return bundleManager.getApplicationInfoNative(bundleName, applicationFlags, EMPTY_USER_ID, true); + function getApplicationInfoSync(bundleName: string, applicationFlags: int): ApplicationInfo { + return bundleManager.getApplicationInfoNative(bundleName, applicationFlags, EMPTY_VALUE, true); } - function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number): ApplicationInfo { + function getApplicationInfoSync(bundleName: string, applicationFlags: int, userId: int): ApplicationInfo { return bundleManager.getApplicationInfoNative(bundleName, applicationFlags, userId, true); } - function isApplicationEnabledSync(bundleName: string): boolean { - return bundleManager.isApplicationEnabledNative(bundleName, 0, true); + function getAllBundleInfo(bundleFlags: int, userId?: int): Promise> { + let p = new Promise>((resolve: (bundleInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.getAllBundleInfoNative(bundleFlags, userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfos: Array = e as Array; + resolve(resultBundleInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllBundleInfo(bundleFlags: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getAllBundleInfoNative(bundleFlags, EMPTY_VALUE); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfos: Array = e as Array; + callback(null, resultBundleInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllBundleInfo(bundleFlags: int, userId: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getAllBundleInfoNative(bundleFlags, userId); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfos: Array = e as Array; + callback(null, resultBundleInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllApplicationInfo(appFlags: int, userId?: int): Promise> { + let p = new Promise>((resolve: (applicationInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.getAllApplicationInfoNative(appFlags, userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultApplicationInfos: Array = e as Array; + resolve(resultApplicationInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllApplicationInfo(appFlags: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getAllApplicationInfoNative(appFlags, EMPTY_VALUE); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultApplicationInfos: Array = e as Array; + callback(null, resultApplicationInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllApplicationInfo(appFlags: int, userId: int, + callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getAllApplicationInfoNative(appFlags, userId); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultApplicationInfos: Array = e as Array; + callback(null, resultApplicationInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function isApplicationEnabled(bundleName: string, appIndex: int): Promise { + let p = new Promise((resolve: (isEnabled: boolean) => void, reject: (error: BusinessError) => void) => { + let execFun = (): boolean => { + return bundleManager.isApplicationEnabledNative(bundleName, appIndex, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let isEnabled: boolean = e as boolean; + resolve(isEnabled); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function isApplicationEnabled(bundleName: string): Promise { + let p = new Promise((resolve: (isEnabled: boolean) => void, reject: (error: BusinessError) => void) => { + let execFun = (): boolean => { + return bundleManager.isApplicationEnabledNative(bundleName, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let isEnabled: boolean = e as boolean; + resolve(isEnabled); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function isApplicationEnabled(bundleName: string, callback: AsyncCallback): void { + let execFun = (): boolean => { + return bundleManager.isApplicationEnabledNative(bundleName, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let isEnabled: boolean = e as boolean; + callback(null, isEnabled); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function queryAbilityInfo(want: Want, abilityFlags: int, userId?: int): Promise> { + let p = new Promise>((resolve: (abilityInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.queryAbilityInfoSyncNative(want, abilityFlags, userIdInfo, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultAbilityInfos: Array = e as Array; + resolve(resultAbilityInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function queryAbilityInfo(want: Want, abilityFlags: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.queryAbilityInfoSyncNative(want, abilityFlags, EMPTY_VALUE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultAbilityInfos: Array = e as Array; + callback(null, resultAbilityInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function queryAbilityInfo(want: Want, + abilityFlags: int, userId: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.queryAbilityInfoSyncNative(want, abilityFlags, userId, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultAbilityInfos: Array = e as Array; + callback(null, resultAbilityInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getApplicationInfo(bundleName: string, appFlags: int, userId?: int): Promise { + let p = new Promise(( + resolve: (applicationInfo: ApplicationInfo) => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): ApplicationInfo => { + return bundleManager.getApplicationInfoNative(bundleName, appFlags, userIdInfo, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultApplicationInfo: ApplicationInfo = e as ApplicationInfo; + resolve(resultApplicationInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getApplicationInfo(bundleName: string, appFlags: int, callback: AsyncCallback): void { + let execFun = (): ApplicationInfo => { + return bundleManager.getApplicationInfoNative(bundleName, appFlags, EMPTY_VALUE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultApplicationInfo: ApplicationInfo = e as ApplicationInfo; + callback(null, resultApplicationInfo); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getApplicationInfo(bundleName: string, + appFlags: int, userId: int, callback: AsyncCallback): void { + let execFun = (): ApplicationInfo => { + return bundleManager.getApplicationInfoNative(bundleName, appFlags, userId, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultApplicationInfo: ApplicationInfo = e as ApplicationInfo; + callback(null, resultApplicationInfo); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAppCloneIdentity(uid: int): Promise { + let p = new Promise(( + resolve: (appCloneIdentity: AppCloneIdentity) => void, reject: (error: BusinessError) => void) => { + let execFun = (): AppCloneIdentity => { + return bundleManager.getAppCloneIdentityNative(uid); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultAppCloneIdentity: AppCloneIdentity = e as AppCloneIdentity; + resolve(resultAppCloneIdentity); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAbilityLabel(bundleName: string, moduleName: string, abilityName: string): Promise { + let p = new Promise(( + resolve: (label: string) => void, reject: (error: BusinessError) => void) => { + let execFun = (): string => { + return bundleManager.getAbilityLabelNative(bundleName, moduleName, abilityName, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let label: string = e as string; + resolve(label); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAbilityLabel( + bundleName: string, moduleName: string, abilityName: string, callback: AsyncCallback): void { + let execFun = (): string => { + return bundleManager.getAbilityLabelNative(bundleName, moduleName, abilityName, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let label: string = e as string; + callback(null, label); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getLaunchWantForBundle(bundleName: string, userId?: int): Promise { + let p = new Promise(( + resolve: (want: Want) => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Want => { + return bundleManager.getLaunchWantForBundleNative(bundleName, userIdInfo, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let want: Want = e as Want; + resolve(want); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getLaunchWantForBundle(bundleName: string, userId: int, callback: AsyncCallback): void { + let execFun = (): Want => { + return bundleManager.getLaunchWantForBundleNative(bundleName, userId, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let want: Want = e as Want; + callback(null, want); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getLaunchWantForBundle(bundleName: string, callback: AsyncCallback): void { + let execFun = (): Want => { + return bundleManager.getLaunchWantForBundleNative(bundleName, EMPTY_VALUE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let want: Want = e as Want; + callback(null, want); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAppCloneBundleInfo(bundleName: string, appIndex: int, + bundleFlags: int, userId?: int): Promise { + let p = new Promise((resolve: (bundleInfo: BundleInfo) => void, + reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): BundleInfo => { + return bundleManager.getAppCloneBundleInfoNative(bundleName, appIndex, bundleFlags, userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfo: BundleInfo = e as BundleInfo; + resolve(resultBundleInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getBundleNameByUid(uid: int, callback: AsyncCallback): void { + let execFun = (): string => { + return bundleManager.getBundleNameByUidNative(uid, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: string = e as string; + callback(null, result); + }).catch((err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getBundleNameByUid(uid: int): Promise { + let p = new Promise((resolve: (result: string) => void, reject: (error: BusinessError) => void) => { + let execFun = (): string => { + return bundleManager.getBundleNameByUidNative(uid, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: string = e as string; + resolve(result); + }).catch((err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, + extensionAbilityFlags: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.queryExtensionAbilityInfoNative( + want, extensionAbilityType, "", extensionAbilityFlags, EMPTY_VALUE, false, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let extensionAbilityInfos: Array = e as Array; + callback(null, extensionAbilityInfos); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, + extensionAbilityFlags: int, userId: int, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.queryExtensionAbilityInfoNative( + want, extensionAbilityType, "", extensionAbilityFlags, userId, false, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let extensionAbilityInfos: Array = e as Array; + callback(null, extensionAbilityInfos); + },(err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function queryExtensionAbilityInfo(want: Want, extensionAbilityType: ExtensionAbilityType, + extensionAbilityFlags: int, userId?: int): Promise> { + let p = new Promise>(( + resolve: (extensionAbilityInfos: Array) => void, + reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.queryExtensionAbilityInfoNative( + want, extensionAbilityType, "", extensionAbilityFlags, userIdInfo, false, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let extensionAbilityInfos: Array = e as Array; + resolve(extensionAbilityInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function isAbilityEnabled(info: AbilityInfo, appIndex: int): Promise { + let p = new Promise((resolve: (isEnabled: boolean) => void, reject: (error: BusinessError) => void) => { + let execFun = (): boolean => { + return bundleManager.isAbilityEnabledNative(info, appIndex, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let isEnabled: boolean = e as boolean; + resolve(isEnabled); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function isAbilityEnabled(info: AbilityInfo): Promise { + let p = new Promise((resolve: (isEnabled: boolean) => void, reject: (error: BusinessError) => void) => { + let execFun = (): boolean => { + return bundleManager.isAbilityEnabledNative(info, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let isEnabled: boolean = e as boolean; + resolve(isEnabled); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function isAbilityEnabled(info: AbilityInfo, callback: AsyncCallback): void { + let execFun = (): boolean => { + return bundleManager.isAbilityEnabledNative(info, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let isEnabled: boolean = e as boolean; + callback(null, isEnabled); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setAbilityEnabled(info: AbilityInfo, appIndex: int, isEnabled: boolean): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.setAbilityEnabledNative(info, isEnabled, appIndex, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.setAbilityEnabledNative(info, isEnabled, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setAbilityEnabled(info: AbilityInfo, isEnabled: boolean, callback: AsyncCallback): void { + let execFun = (): void => { + return bundleManager.setAbilityEnabledNative(info, isEnabled, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setApplicationEnabled(bundleName: string, appIndex: int, isEnabled: boolean): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.setApplicationEnabledNative(bundleName, isEnabled, appIndex, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setApplicationEnabled(bundleName: string, isEnabled: boolean): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.setApplicationEnabledNative(bundleName, isEnabled, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setApplicationEnabled(bundleName: string, isEnabled: boolean, callback: AsyncCallback): void { + let execFun = (): void => { + return bundleManager.setApplicationEnabledNative(bundleName, isEnabled, 0, false); + }; + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getDynamicIcon(bundleName: string): Promise { + let p = new Promise(( + resolve: (icon: string) => void, reject: (error: BusinessError) => void) => { + let execFun = (): string => { + return bundleManager.getDynamicIconNative(bundleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let icon: string = e as string; + resolve(icon); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function queryAbilityInfo(wants: Array, abilityFlags: int, userId?: int): Promise> { + let p = new Promise>((resolve: (abilityInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.queryAbilityInfoWithWantsNative(wants, abilityFlags, userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultAbilityInfos: Array = e as Array; + resolve(resultAbilityInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function enableDynamicIcon(bundleName: string, moduleName: string): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let bundleOptions = new BundleOptionsInner(); + let execFun = (): void => { + return bundleManager.enableDynamicIconNative(bundleName, moduleName, bundleOptions); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function enableDynamicIcon(bundleName: string, moduleName: string, option?: BundleOptions): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let bundleOptions = option ?? new BundleOptionsInner(); + let execFun = (): void => { + return bundleManager.enableDynamicIconNative(bundleName, moduleName, bundleOptions); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getBundleArchiveInfo(hapFilePath: string, bundleFlags: int, callback: AsyncCallback): void { + let execFun = (): BundleInfo => { + return bundleManager.getBundleArchiveInfoNative(hapFilePath, bundleFlags, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfo: BundleInfo = e as BundleInfo; + callback(null, resultBundleInfo); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getBundleArchiveInfo(hapFilePath: string, bundleFlags: int): Promise { + let p = new Promise((resolve: (bundleInfo: BundleInfo) => void, + reject: (error: Error) => void) => { + let execFun = (): BundleInfo => { + return bundleManager.getBundleArchiveInfoNative(hapFilePath, bundleFlags, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfo: BundleInfo = e as BundleInfo; + resolve(resultBundleInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise> { + let p = new Promise>((resolve: (profile: Array) + => void, reject: (error: Error) => void) => { + let metadataNameInfo: string = metadataName ?? ""; + let execFun = (): Array => { + return bundleManager.getProfileByAbilityNative(moduleName, abilityName, metadataNameInfo, AbilityProfileType.ABILITY_PROFILE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let profile: Array = e as Array; + resolve(profile); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getProfileByAbility(moduleName: string, + abilityName: string, metadataName: string, callback: AsyncCallback>) { + let execFun = (): Array => { + return bundleManager.getProfileByAbilityNative(moduleName, abilityName, metadataName, AbilityProfileType.ABILITY_PROFILE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let profile: Array = e as Array; + callback(null, profile); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getProfileByExtensionAbility(moduleName: string, + extensionAbilityName: string, metadataName?: string): Promise> { + let p = new Promise>((resolve: (profile: Array) + => void, reject: (error: Error) => void) => { + let metadataNameInfo: string = metadataName ?? ""; + let execFun = (): Array => { + return bundleManager.getProfileByAbilityNative(moduleName, extensionAbilityName, metadataNameInfo, AbilityProfileType.EXTENSION_PROFILE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let profile: Array = e as Array; + resolve(profile); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getProfileByExtensionAbility(moduleName: string, + extensionAbilityName: string, metadataName: string, callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getProfileByAbilityNative(moduleName, extensionAbilityName, metadataName, AbilityProfileType.EXTENSION_PROFILE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let profile: Array = e as Array; + callback(null, profile); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getPermissionDef(permissionName: string): Promise { + let p = new Promise((resolve: (profile: PermissionDef) + => void, reject: (error: Error) => void) => { + let execFun = (): PermissionDef => { + return bundleManager.getPermissionDefNative(permissionName, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let permissionDef: PermissionDef = e as PermissionDef; + resolve(permissionDef); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getPermissionDef(permissionName: string, callback: AsyncCallback): void { + let execFun = (): PermissionDef => { + return bundleManager.getPermissionDefNative(permissionName, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let permissionDef: PermissionDef = e as PermissionDef; + callback(null, permissionDef); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback): void { + let execFun = (): void => { + return bundleManager.cleanBundleCacheFilesNative(bundleName, 0); + }; + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function cleanBundleCacheFiles(bundleName: string): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + return bundleManager.cleanBundleCacheFilesNative(bundleName, 0); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function cleanBundleCacheFiles(bundleName: string, appIndex: int): Promise { + if (appIndex < MAIN_APP_INDEX || appIndex > CLONE_APP_INDEX_MAX) { + throw createBusinessError(ERROR_INVALID_APPINDEX_CODE, ERROR_INVALID_APPINDEX_MSG); + } + let p = new Promise((resolve: (v:undefined) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + return bundleManager.cleanBundleCacheFilesNative(bundleName, appIndex); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllBundleCacheSize(): Promise { + let p = new Promise((resolve: (size: long) => void, reject: (error: Error) => void) => { + let execFun = (): long => { + return bundleManager.getAllBundleCacheSizeNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let size: long = e as long; + resolve(size); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function cleanAllBundleCache(): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + return bundleManager.cleanAllBundleCacheNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAppProvisionInfo(bundleName: string, userId?: int): Promise { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + let p = new Promise((resolve: (appProvisionInfo: AppProvisionInfo) + => void, reject: (error: Error) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): AppProvisionInfo => { + return bundleManager.getAppProvisionInfoNative(bundleName, userIdInfo, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let appProvisionInfo: AppProvisionInfo = e as AppProvisionInfo; + resolve(appProvisionInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAppProvisionInfo(bundleName: string, userId: int, callback: AsyncCallback): void { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + let execFun = (): AppProvisionInfo => { + return bundleManager.getAppProvisionInfoNative(bundleName, userId, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let appProvisionInfo: AppProvisionInfo = e as AppProvisionInfo; + callback(null, appProvisionInfo); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAppProvisionInfo(bundleName: string, callback: AsyncCallback): void { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + let execFun = (): AppProvisionInfo => { + return bundleManager.getAppProvisionInfoNative(bundleName, EMPTY_VALUE, false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let appProvisionInfo: AppProvisionInfo = e as AppProvisionInfo; + callback(null, appProvisionInfo); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllPreinstalledApplicationInfo(): Promise> { + let p = new Promise>((resolve: + (applicationInfo: Array) => void, reject: (error: Error) => void) => { + let execFun = (): Array => { + return bundleManager.getAllPreinstalledApplicationInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let applicationInfo: Array = e as Array; + resolve(applicationInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllAppCloneBundleInfo(bundleName: string, bundleFlags: + int, userId?: int): Promise> { + let p = new Promise>((resolve: (bundleInfos: Array) + => void, reject: (error: Error) => void) => { + let userIdInfo: int = userId ?? -2; + let execFun = (): Array => { + return bundleManager.getAllAppCloneBundleInfoNative(bundleName, bundleFlags, userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultBundleInfos: Array = e as Array; + resolve(resultBundleInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllSharedBundleInfo(): Promise> { + let p = new Promise>((resolve: (sharedBundleInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let execFun = (): Array => { + return bundleManager.getAllSharedBundleInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let sharedBundleInfos: Array = e as Array; + resolve(sharedBundleInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllSharedBundleInfo(callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getAllSharedBundleInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let sharedBundleInfos: Array = e as Array; + callback(null, sharedBundleInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getSharedBundleInfo(bundleName: string, moduleName: string): Promise> { + let p = new Promise>((resolve: (sharedBundleInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let execFun = (): Array => { + return bundleManager.getSharedBundleInfoNative(bundleName, moduleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let sharedBundleInfos: Array = e as Array; + resolve(sharedBundleInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getSharedBundleInfo(bundleName: string, moduleName: string, + callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getSharedBundleInfoNative(bundleName, moduleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let sharedBundleInfos: Array = e as Array; + callback(null, sharedBundleInfos); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getExtResource(bundleName: string): Promise> { + let p = new Promise>((resolve: (extResource: Array) + => void, reject: (error: BusinessError) => void) => { + let execFun = (): Array => { + return bundleManager.getExtResourceNative(bundleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let extResource: Array = e as Array; + resolve(extResource); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function disableDynamicIcon(bundleName: string): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let bundleOptions = new BundleOptionsInner(); + let execFun = (): void => { + return bundleManager.disableDynamicIconNative(bundleName, bundleOptions); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function disableDynamicIcon(bundleName: string, option?: BundleOptions): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let bundleOptions = option ?? new BundleOptionsInner(); + let execFun = (): void => { + return bundleManager.disableDynamicIconNative(bundleName, bundleOptions); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getDynamicIconInfo(bundleName: string): Promise> { + let p = new Promise>((resolve: (dynamicIconInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let execFun = (): Array => { + return bundleManager.getDynamicIconInfoNative(bundleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let dynamicIconInfos: Array = e as Array; + resolve(dynamicIconInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllDynamicIconInfo(userId?: int): Promise> { + let p = new Promise>((resolve: (dynamicIconInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.getAllDynamicIconInfoNative(userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let dynamicIconInfos: Array = e as Array; + resolve(dynamicIconInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function verifyAbc(abcPaths: Array, deleteOriginalFiles: boolean): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.verifyAbcNative(abcPaths, deleteOriginalFiles); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function verifyAbc(abcPaths: Array, deleteOriginalFiles: boolean, callback: AsyncCallback): void { + let execFun = (): void => { + return bundleManager.verifyAbcNative(abcPaths, deleteOriginalFiles); + }; + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getRecoverableApplicationInfo(): Promise> { + let p = new Promise>((resolve: + (applicationInfo: Array) => void, reject: (error: BusinessError) => void) => { + let execFun = (): Array => { + return bundleManager.getRecoverableApplicationInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let applicationInfo: Array = e as Array; + resolve(applicationInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getRecoverableApplicationInfo(callback: AsyncCallback>): void { + let execFun = (): Array => { + return bundleManager.getRecoverableApplicationInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let applicationInfo: Array = e as Array; + callback(null, applicationInfo); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function deleteAbc(abcPath: string): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.deleteAbcNative(abcPath); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAllPluginInfo(hostBundleName: string, userId?: int): Promise> { + let p = new Promise>((resolve: (pluginBundleInfo: Array) + => void, reject: (error: BusinessError) => void) => { + let userIdInfo: int = userId ?? EMPTY_VALUE; + let execFun = (): Array => { + return bundleManager.getAllPluginInfoNative(hostBundleName, userIdInfo); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let pluginBundleInfo: Array = e as Array; + resolve(pluginBundleInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function migrateData(sourcePaths: Array, destinationPath: string): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): void => { + return bundleManager.migrateDataNative(sourcePaths, destinationPath); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getAbilityInfo(uri: string, abilityFlags: int): Promise> { + if (uri === "") { + throw createBusinessError(ERROR_ABILITY_NOT_EXIST, GETABILITYINFO_ERROR_MSG); + } + let p = new Promise>((resolve: (abilityInfos: Array) + => void, reject: (error: BusinessError) => void) => { + let execFun = (): Array => { + return bundleManager.getAbilityInfoNative(uri, abilityFlags); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let abilityInfos: Array = e as Array; + resolve(abilityInfos); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; } } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfo.ets index e9f0d462096511c79701d235407b17a6c8318aa7..5bb3c63fdb422ec10f25dc4bc895746c74a086e3 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfo.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfo.ets @@ -23,33 +23,33 @@ export interface AbilityInfo { readonly moduleName: string; readonly name: string; readonly label: string; - readonly labelId: number; + readonly labelId: long; readonly description: string; - readonly descriptionId: number; + readonly descriptionId: long; readonly icon: string; - readonly iconId: number; + readonly iconId: long; readonly process: string; readonly exported: boolean; readonly orientation: bundleManager.DisplayOrientation; readonly launchType: bundleManager.LaunchType; readonly permissions: Array; readonly deviceTypes: Array; - readonly applicationInfo: ApplicationInfo; + readonly applicationInfo: ApplicationInfo | null; readonly metadata: Array; readonly enabled: boolean; readonly supportWindowModes: Array; readonly windowSize: WindowSize; readonly excludeFromDock: boolean; readonly skills: Array; - readonly appIndex: number; - readonly orientationId: number; + readonly appIndex: int; + readonly orientationId: long; } export interface WindowSize { - readonly maxWindowRatio: number; - readonly minWindowRatio: number; - readonly maxWindowWidth: number; - readonly minWindowWidth: number; - readonly maxWindowHeight: number; - readonly minWindowHeight: number; + readonly maxWindowRatio: double; + readonly minWindowRatio: double; + readonly maxWindowWidth: long; + readonly minWindowWidth: long; + readonly maxWindowHeight: long; + readonly minWindowHeight: long; } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfoInner.ets index fa4f2c7c437ac9bf3c6b299434c59a8ff3c79ff8..bf85410609bd4c2576199141b29ba39f97b93a9a 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfoInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AbilityInfoInner.ets @@ -25,33 +25,118 @@ export class AbilityInfoInner implements AbilityInfo { readonly moduleName: string = ""; readonly name: string = ""; readonly label: string = ""; - readonly labelId: number; + readonly labelId: long; readonly description: string = ""; - readonly descriptionId: number; + readonly descriptionId: long; readonly icon: string = ""; - readonly iconId: number; + readonly iconId: long; readonly process: string = ""; readonly exported: boolean; readonly orientation: bundleManager.DisplayOrientation = bundleManager.DisplayOrientation.UNSPECIFIED; readonly launchType: bundleManager.LaunchType = bundleManager.LaunchType.SINGLETON; readonly permissions: Array = new Array; readonly deviceTypes: Array = new Array; - readonly applicationInfo: ApplicationInfo = new ApplicationInfoInner; + readonly applicationInfo: ApplicationInfo | null = null; readonly metadata: Array = new Array; readonly enabled: boolean; readonly supportWindowModes: Array = new Array; readonly windowSize: WindowSize = new WindowSizeInner; readonly excludeFromDock: boolean; readonly skills: Array = new Array; - readonly appIndex: number; - readonly orientationId: number; + readonly appIndex: int; + readonly orientationId: long; + + constructor() { } + constructor(bundleName: string, + moduleName: string, + name: string, + label: string, + labelId: long, + description: string, + descriptionId: long, + icon: string, + iconId: long, + process: string, + exported: boolean, + orientation: bundleManager.DisplayOrientation, + launchType: bundleManager.LaunchType, + permissions: Array, + deviceTypes: Array, + applicationInfo: ApplicationInfo, + metadata: Array, + enabled: boolean, + supportWindowModes: Array, + windowSize: WindowSize, + excludeFromDock: boolean, + skills: Array, + appIndex: int, + orientationId: long) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.name = name; + this.label = label; + this.labelId = labelId; + this.description = description; + this.descriptionId = descriptionId; + this.icon = icon; + this.iconId = iconId; + this.process = process; + this.exported = exported; + this.orientation = orientation; + this.launchType = launchType; + this.permissions = permissions; + this.deviceTypes = deviceTypes; + this.applicationInfo = applicationInfo; + this.metadata = metadata; + this.enabled = enabled; + this.supportWindowModes = supportWindowModes; + this.windowSize = windowSize; + this.excludeFromDock = excludeFromDock; + this.skills = skills; + this.appIndex = appIndex; + this.orientationId = orientationId; + } + constructor(bundleName: string, + moduleName: string, + name: string, + label: string, + labelId: long, + description: string, + descriptionId: long, + icon: string, + iconId: long) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.name = name; + this.label = label; + this.labelId = labelId; + this.description = description; + this.descriptionId = descriptionId; + this.icon = icon; + this.iconId = iconId; + } } export class WindowSizeInner implements WindowSize { - readonly maxWindowRatio: number; - readonly minWindowRatio: number; - readonly maxWindowWidth: number; - readonly minWindowWidth: number; - readonly maxWindowHeight: number; - readonly minWindowHeight: number; + readonly maxWindowRatio: double; + readonly minWindowRatio: double; + readonly maxWindowWidth: long; + readonly minWindowWidth: long; + readonly maxWindowHeight: long; + readonly minWindowHeight: long; + + constructor() { } + constructor(maxWindowRatio: double, + minWindowRatio: double, + maxWindowWidth: long, + minWindowWidth: long, + maxWindowHeight: long, + minWindowHeight: long) { + this.maxWindowRatio = maxWindowRatio; + this.minWindowRatio = minWindowRatio; + this.maxWindowWidth = maxWindowWidth; + this.minWindowWidth = minWindowWidth; + this.maxWindowHeight = maxWindowHeight; + this.minWindowHeight = minWindowHeight; + } } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/AppProvisionInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AppProvisionInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..a1606cee0fea1953ccd3e22bef61c8b2e162c627 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AppProvisionInfo.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface AppProvisionInfo { + readonly versionCode: long; + readonly versionName: string; + readonly uuid: string; + readonly type: string; + readonly appDistributionType: string; + readonly validity: Validity; + readonly developerId: string; + readonly certificate: string; + readonly apl: string; + readonly issuer: string; + readonly appIdentifier: string; + readonly organization: string; +} + +export interface Validity { + readonly notBefore: long; + readonly notAfter: long; +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/AppProvisionInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AppProvisionInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..5424edec5d01b86bba9c43292ef1edbbc4f57868 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/AppProvisionInfoInner.ets @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AppProvisionInfo, Validity } from 'bundleManager.AppProvisionInfo' + +export class AppProvisionInfoInner implements AppProvisionInfo { + public readonly versionCode: long; + public readonly versionName: string = ''; + public readonly uuid: string = ''; + public readonly type: string = ''; + public readonly appDistributionType: string = ''; + public readonly validity: Validity = new ValidityInner; + public readonly developerId: string = ''; + public readonly certificate: string = ''; + public readonly apl: string = ''; + public readonly issuer: string = ''; + public readonly appIdentifier: string = ''; + public readonly organization: string = ''; + + constructor() { } + constructor(versionCode: long, + versionName: string, + uuid: string, + type: string, + appDistributionType: string, + validity: Validity, + developerId: string, + certificate: string, + apl: string, + issuer: string, + appIdentifier: string, + organization: string) { + this.versionCode = versionCode; + this.versionName = versionName; + this.uuid = uuid; + this.type = type; + this.appDistributionType = appDistributionType; + this.validity = validity; + this.developerId = developerId; + this.certificate = certificate; + this.apl = apl; + this.issuer = issuer; + this.appIdentifier = appIdentifier; + this.organization = organization; + } +} + +export class ValidityInner implements Validity { + public readonly notBefore: long; + public readonly notAfter: long; + + constructor() { } + constructor(notBefore: long, + notAfter: long) { + this.notBefore = notBefore; + this.notAfter = notAfter; + } +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfo.ets index 49789ed0bfdb2330013620e5fe85a233f1c5da02..dfebfc54ba2ae23a360ea78d7c10cde7f141ac63 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfo.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfo.ets @@ -20,19 +20,19 @@ import bundleManager from '@ohos.bundle.bundleManager'; export interface ApplicationInfo { readonly name: string; readonly description: string; - readonly descriptionId: number; + readonly descriptionId: long; readonly enabled: boolean; readonly label: string; - readonly labelId: number; + readonly labelId: long; readonly icon: string; - readonly iconId: number; + readonly iconId: long; readonly process: string; readonly permissions: Array; readonly codePath: string; readonly metadataArray: Array; readonly removable: boolean; - readonly accessTokenId: number; - readonly uid: number; + readonly accessTokenId: long; + readonly uid: int; readonly iconResource: Resource; readonly labelResource: Resource; readonly descriptionResource: Resource; @@ -44,11 +44,11 @@ export interface ApplicationInfo { readonly dataUnclearable: boolean; readonly nativeLibraryPath: string; readonly multiAppMode: MultiAppMode; - readonly appIndex: number; + readonly appIndex: int; readonly installSource: string; readonly releaseType: string; readonly cloudFileSyncEnabled: boolean; - readonly flags?: number; + readonly flags?: int; } export interface ModuleMetadata { @@ -58,12 +58,12 @@ export interface ModuleMetadata { export interface MultiAppMode { readonly multiAppModeType: bundleManager.MultiAppModeType; - readonly maxCount: number; + readonly maxCount: int; } export interface PreinstalledApplicationInfo { readonly bundleName: string; readonly moduleName: string; - readonly iconId: number; - readonly labelId: number; + readonly iconId: long; + readonly labelId: long; } \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfoInner.ets index 3aa7ca936453379703394ceb6f2d905f68b4f9c0..8506d80eff94090d7e3c2a551031a1bb9dcfcc88 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfoInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ApplicationInfoInner.ets @@ -22,19 +22,19 @@ import { ResourceInner } from 'global.resourceInner'; export class ApplicationInfoInner implements ApplicationInfo { readonly name: string = ""; readonly description: string = ""; - readonly descriptionId: number; + readonly descriptionId: long; readonly enabled: boolean; readonly label: string = ""; - readonly labelId: number; + readonly labelId: long; readonly icon: string = ""; - readonly iconId: number; + readonly iconId: long; readonly process: string = ""; readonly permissions: Array = new Array; readonly codePath: string = ""; readonly metadataArray: Array = new Array; readonly removable: boolean; - readonly accessTokenId: number; - readonly uid: number; + readonly accessTokenId: long; + readonly uid: int; readonly iconResource: Resource = new ResourceInner; readonly labelResource: Resource = new ResourceInner; readonly descriptionResource: Resource = new ResourceInner; @@ -46,26 +46,111 @@ export class ApplicationInfoInner implements ApplicationInfo { readonly dataUnclearable: boolean; readonly nativeLibraryPath: string = ""; readonly multiAppMode: MultiAppMode = new MultiAppModeInner; - readonly appIndex: number; + readonly appIndex: int; readonly installSource: string = ""; readonly releaseType: string = ""; readonly cloudFileSyncEnabled: boolean; - readonly flags?: number|undefined; + readonly flags?: int|undefined; + + constructor() { } + constructor(name: string, + description: string, + descriptionId: long, + enabled: boolean, + label: string, + labelId: long, + icon: string, + iconId: long, + process: string, + permissions: Array, + codePath: string, + metadataArray: Array, + removable: boolean, + accessTokenId: long, + uid: int, + iconResource: Resource, + labelResource: Resource, + descriptionResource: Resource, + appDistributionType: string, + appProvisionType: string, + systemApp: boolean, + bundleType: bundleManager.BundleType, + debug: boolean, + dataUnclearable: boolean, + nativeLibraryPath: string, + multiAppMode: MultiAppMode, + appIndex: int, + installSource: string, + releaseType: string, + cloudFileSyncEnabled: boolean, + flags?: int) { + this.name = name; + this.description = description; + this.descriptionId = descriptionId; + this.enabled = enabled; + this.label = label; + this.labelId = labelId; + this.icon = icon; + this.iconId = iconId; + this.process = process; + this.permissions = permissions; + this.codePath = codePath; + this.metadataArray = metadataArray; + this.removable = removable; + this.accessTokenId = accessTokenId; + this.uid = uid; + this.iconResource = iconResource; + this.labelResource = labelResource; + this.descriptionResource = descriptionResource; + this.appDistributionType = appDistributionType; + this.appProvisionType = appProvisionType; + this.systemApp = systemApp; + this.bundleType = bundleType; + this.debug = debug; + this.dataUnclearable = dataUnclearable; + this.nativeLibraryPath = nativeLibraryPath; + this.multiAppMode = multiAppMode; + this.appIndex = appIndex; + this.installSource = installSource; + this.releaseType = releaseType; + this.cloudFileSyncEnabled = cloudFileSyncEnabled; + this.flags = flags; + } } export class ModuleMetadataInner implements ModuleMetadata { readonly moduleName: string = ""; readonly metadata: Array = new Array; + + constructor() { } + constructor(moduleName: string, metadata: Array) { + this.moduleName = moduleName; + this.metadata = metadata; + } } export class MultiAppModeInner implements MultiAppMode { readonly multiAppModeType: bundleManager.MultiAppModeType = bundleManager.MultiAppModeType.UNSPECIFIED; - readonly maxCount: number; + readonly maxCount: int; + + constructor() { } + constructor(multiAppModeType: bundleManager.MultiAppModeType, maxCount: int) { + this.multiAppModeType = multiAppModeType; + this.maxCount = maxCount; + } } export class PreinstalledApplicationInfoInner implements PreinstalledApplicationInfo { readonly bundleName: string = ""; readonly moduleName: string = ""; - readonly iconId: number; - readonly labelId: number; + readonly iconId: long; + readonly labelId: long; + + constructor() { } + constructor(bundleName: string, moduleName: string, iconId: long, labelId: long) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.iconId = iconId; + this.labelId = labelId; + } } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfo.ets index 63841555ba33a1394a5dc85f99fef57702c05fc7..88b4ac156c05a6d877b964e7dd29134307e8ebb4 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfo.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfo.ets @@ -20,27 +20,27 @@ import bundleManager from '@ohos.bundle.bundleManager'; export interface BundleInfo { readonly name: string; readonly vendor: string; - readonly versionCode: number; + readonly versionCode: long; readonly versionName: string; - readonly minCompatibleVersionCode: number; - readonly targetVersion: number; - readonly appInfo: ApplicationInfo; + readonly minCompatibleVersionCode: int; + readonly targetVersion: int; + readonly appInfo: ApplicationInfo | null; readonly hapModulesInfo: Array; readonly reqPermissionDetails: Array; readonly permissionGrantStates: Array; - readonly signatureInfo: SignatureInfo; - readonly installTime: number; - readonly updateTime: number; + readonly signatureInfo: SignatureInfo | null; + readonly installTime: long; + readonly updateTime: long; readonly routerMap: Array; - readonly appIndex: number; - readonly firstInstallTime?: number; + readonly appIndex: int; + readonly firstInstallTime?: long; } export interface ReqPermissionDetail { name: string; moduleName: string; reason: string; - reasonId: number; + reasonId: long; usedScene: UsedScene; } @@ -58,5 +58,17 @@ export interface SignatureInfo { export interface AppCloneIdentity { readonly bundleName: string; - readonly appIndex: number; + readonly appIndex: int; +} + +export interface DynamicIconInfo { + readonly bundleName: string; + readonly moduleName: string; + readonly userId: int; + readonly appIndex: int; +} + +export interface BundleOptions { + userId?: int; + appIndex?: int; } \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfoInner.ets index 7d57600e4a32b80d7a5bbf2d43c48b069ac80ed5..b87b0f4dec8d0d87106f69ccdbb26be3f1f4c50e 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfoInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/BundleInfoInner.ets @@ -16,49 +16,138 @@ import { ApplicationInfo } from 'bundleManager.ApplicationInfo'; import { HapModuleInfo, RouterItem } from 'bundleManager.HapModuleInfo'; import bundleManager from '@ohos.bundle.bundleManager'; -import { BundleInfo, ReqPermissionDetail, UsedScene, SignatureInfo, AppCloneIdentity } from 'bundleManager.BundleInfo'; +import { BundleInfo, ReqPermissionDetail, UsedScene, SignatureInfo, AppCloneIdentity, DynamicIconInfo, + BundleOptions} from 'bundleManager.BundleInfo'; import { ApplicationInfoInner } from './ApplicationInfoInner'; export class BundleInfoInner implements BundleInfo { readonly name: string = ""; readonly vendor: string = ""; - readonly versionCode: number; + readonly versionCode: long; readonly versionName: string = ""; - readonly minCompatibleVersionCode: number; - readonly targetVersion: number; - readonly appInfo: ApplicationInfo = new ApplicationInfoInner; + readonly minCompatibleVersionCode: int; + readonly targetVersion: int; + readonly appInfo: ApplicationInfo | null = null; readonly hapModulesInfo: Array = new Array; readonly reqPermissionDetails: Array = new Array; readonly permissionGrantStates: Array = new Array; - readonly signatureInfo: SignatureInfo = new SignatureInfoInner; + readonly signatureInfo: SignatureInfo | null = null; + readonly installTime: long; + readonly updateTime: long; readonly routerMap: Array = new Array; - readonly installTime: number; - readonly updateTime: number; - readonly appIndex: number; - readonly firstInstallTime?: number; + readonly appIndex: int; + readonly firstInstallTime?: long; + + constructor() { } + constructor(name: string, + vendor: string, + versionCode: long, + versionName: string, + minCompatibleVersionCode: int, + targetVersion: int, + appInfo: ApplicationInfo, + hapModulesInfo: Array, + reqPermissionDetails: Array, + permissionGrantStates: Array, + signatureInfo: SignatureInfo, + installTime: long, + updateTime: long, + routerMap: Array, + appIndex: int, + firstInstallTime?: long) { + this.name = name; + this.vendor = vendor; + this.versionCode = versionCode; + this.versionName = versionName; + this.minCompatibleVersionCode = minCompatibleVersionCode; + this.targetVersion = targetVersion; + this.appInfo = appInfo; + this.hapModulesInfo = hapModulesInfo; + this.reqPermissionDetails = reqPermissionDetails; + this.permissionGrantStates = permissionGrantStates; + this.signatureInfo = signatureInfo; + this.installTime = installTime; + this.updateTime = updateTime; + this.routerMap = routerMap; + this.appIndex = appIndex; + this.firstInstallTime = firstInstallTime; + } + constructor(name: string, hapModulesInfo: Array) { + this.name = name; + this.hapModulesInfo = hapModulesInfo; + } } export class ReqPermissionDetailInner implements ReqPermissionDetail { name: string = ""; moduleName: string = ""; reason: string = ""; - reasonId: number; + reasonId: long; usedScene: UsedScene = new UsedSceneInner; + + constructor() { } + constructor(name: string, moduleName: string, reason: string, reasonId: long, usedScene: UsedScene) { + this.name = name; + this.moduleName = moduleName; + this.reason = reason; + this.reasonId = reasonId; + this.usedScene = usedScene; + } } export class UsedSceneInner implements UsedScene { abilities: Array = new Array; when: string = ""; + + constructor() { } + constructor(abilities: Array, when: string) { + this.abilities = abilities; + this.when = when; + } } export class SignatureInfoInner implements SignatureInfo { readonly appId: string = ""; readonly fingerprint: string = ""; readonly appIdentifier: string = ""; - readonly certificate?: string | undefined = ""; + readonly certificate?: string | undefined; + + constructor() { } + constructor(appId: string, fingerprint: string, appIdentifier: string, certificate?: string) { + this.appId = appId; + this.fingerprint = fingerprint; + this.appIdentifier = appIdentifier; + this.certificate = certificate; + } } export class AppCloneIdentityInner implements AppCloneIdentity { readonly bundleName: string = ""; - readonly appIndex: number; + readonly appIndex: int; + + constructor() { } + constructor(bundleName: string, appIndex: int) { + this.bundleName = bundleName; + this.appIndex = appIndex; + } +} + +export class DynamicIconInfoInner implements DynamicIconInfo { + public readonly bundleName: string = ''; + public readonly moduleName: string = ''; + public readonly userId: int; + public readonly appIndex: int; + + constructor() { } + constructor(bundleName: string, moduleName: string, userId: int, appIndex: int) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.userId = userId; + this.appIndex = appIndex; + } +} + +export class BundleOptionsInner implements BundleOptions { + public userId?: int | undefined; + public appIndex?: int | undefined; } \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfo.ets index 0e54076f5acb8a422a01f72067ae6dd30f24ca04..87ec0233fda2af261874e805bcc06b1303388711 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfo.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfo.ets @@ -22,19 +22,19 @@ export interface ExtensionAbilityInfo { readonly bundleName: string; readonly moduleName: string; readonly name: string; - readonly labelId: number; - readonly descriptionId: number; - readonly iconId: number; + readonly labelId: long; + readonly descriptionId: long; + readonly iconId: long; readonly exported: boolean; readonly extensionAbilityType: bundleManager.ExtensionAbilityType; readonly extensionAbilityTypeName: string; readonly permissions: Array; - readonly applicationInfo: ApplicationInfo; + readonly applicationInfo: ApplicationInfo | null; readonly metadata: Array; readonly enabled: boolean; readonly readPermission: string; readonly writePermission: string; readonly skills: Array; - readonly appIndex: number; + readonly appIndex: int; } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfoInner.ets index 0ed1bc765a8971d9a0220fac84867074df0308c0..33ef75321a02d3efd0273d6416dda4119f50b54a 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfoInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/ExtensionAbilityInfoInner.ets @@ -24,19 +24,69 @@ export class ExtensionAbilityInfoInner implements ExtensionAbilityInfo { readonly bundleName: string = ""; readonly moduleName: string = ""; readonly name: string = ""; - readonly labelId: number; - readonly descriptionId: number; - readonly iconId: number; + readonly labelId: long; + readonly descriptionId: long; + readonly iconId: long; readonly exported: boolean; readonly extensionAbilityType: bundleManager.ExtensionAbilityType = bundleManager.ExtensionAbilityType.UNSPECIFIED; readonly extensionAbilityTypeName: string = ""; readonly permissions: Array = new Array; - readonly applicationInfo: ApplicationInfo = new ApplicationInfoInner; + readonly applicationInfo: ApplicationInfo | null = null; readonly metadata: Array = new Array; readonly enabled: boolean; readonly readPermission: string = ""; readonly writePermission: string = ""; readonly skills: Array = new Array; - readonly appIndex: number; + readonly appIndex: int; + + constructor() { } + constructor(bundleName: string, + moduleName: string, + name: string, + labelId: long, + descriptionId: long, + iconId: long, + exported: boolean, + extensionAbilityType: bundleManager.ExtensionAbilityType, + extensionAbilityTypeName: string, + permissions: Array, + applicationInfo: ApplicationInfo, + metadata: Array, + enabled: boolean, + readPermission: string, + writePermission: string, + skills: Array, + appIndex: int) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.name = name; + this.labelId = labelId; + this.descriptionId = descriptionId; + this.iconId = iconId; + this.exported = exported; + this.extensionAbilityType = extensionAbilityType; + this.extensionAbilityTypeName = extensionAbilityTypeName; + this.permissions = permissions; + this.applicationInfo = applicationInfo; + this.metadata = metadata; + this.enabled = enabled; + this.readPermission = readPermission; + this.writePermission = writePermission; + this.skills = skills; + this.appIndex = appIndex; + } + constructor(bundleName: string, + moduleName: string, + name: string, + labelId: long, + descriptionId: long, + iconId: long) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.name = name; + this.labelId = labelId; + this.descriptionId = descriptionId; + this.iconId = iconId; + } } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfo.ets index acf816284373a3a1de99bdca9117c2471ce7e839..edd50608a3527934cf1399dd4f3bf3e5163e76d4 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfo.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfo.ets @@ -21,11 +21,11 @@ import bundleManager from '@ohos.bundle.bundleManager'; export interface HapModuleInfo { readonly name: string; readonly icon: string; - readonly iconId: number; + readonly iconId: long; readonly label: string; - readonly labelId: number; + readonly labelId: long; readonly description: string; - readonly descriptionId: number; + readonly descriptionId: long; readonly mainElementName: string; readonly abilitiesInfo: Array; readonly extensionAbilitiesInfo: Array; @@ -45,7 +45,7 @@ export interface HapModuleInfo { export interface Dependency { readonly moduleName: string; readonly bundleName: string; - readonly versionCode: number; + readonly versionCode: long; } export interface PreloadItem { diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfoInner.ets index 4022bb7ffb0dca165b4f8a518b9e2bc639b7e185..b4bf851970e70dbb3a306b0d3923d9bc9d6c6c1e 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfoInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/HapModuleInfoInner.ets @@ -22,11 +22,11 @@ import { HapModuleInfo, Dependency, PreloadItem, RouterItem, DataItem } from 'bu export class HapModuleInfoInner implements HapModuleInfo { readonly name: string = ""; readonly icon: string = ""; - readonly iconId: number; + readonly iconId: long; readonly label: string = ""; - readonly labelId: number; + readonly labelId: long; readonly description: string = ""; - readonly descriptionId: number; + readonly descriptionId: long; readonly mainElementName: string = ""; readonly abilitiesInfo: Array = new Array; readonly extensionAbilitiesInfo: Array = new Array; @@ -41,16 +41,77 @@ export class HapModuleInfoInner implements HapModuleInfo { readonly routerMap: Array = new Array; readonly nativeLibraryPath: string = ""; readonly codePath: string = ""; + + constructor() { } + constructor(name: string, + icon: string, + iconId: long, + label: string, + labelId: long, + description: string, + descriptionId: long, + mainElementName: string, + abilitiesInfo: Array, + extensionAbilitiesInfo: Array, + metadata: Array, + deviceTypes: Array, + installationFree: boolean, + hashValue: string, + type: bundleManager.ModuleType, + dependencies: Array, + preloads: Array, + fileContextMenuConfig: string, + routerMap: Array, + nativeLibraryPath: string, + codePath: string) { + this.name = name; + this.icon = icon; + this.iconId = iconId; + this.label = label; + this.labelId = labelId; + this.description = description; + this.descriptionId = descriptionId; + this.mainElementName = mainElementName; + this.abilitiesInfo = abilitiesInfo; + this.extensionAbilitiesInfo = extensionAbilitiesInfo; + this.metadata = metadata; + this.deviceTypes = deviceTypes; + this.installationFree = installationFree; + this.hashValue = hashValue; + this.type = type; + this.dependencies = dependencies; + this.preloads = preloads; + this.fileContextMenuConfig = fileContextMenuConfig; + this.routerMap = routerMap; + this.nativeLibraryPath = nativeLibraryPath; + this.codePath = codePath; + } + constructor(abilitiesInfo: Array, extensionAbilitiesInfo: Array) { + this.abilitiesInfo = abilitiesInfo; + this.extensionAbilitiesInfo = extensionAbilitiesInfo; + } } export class DependencyInner implements Dependency { readonly moduleName: string = ""; readonly bundleName: string = ""; - readonly versionCode: number; + readonly versionCode: long; + + constructor() { } + constructor(moduleName: string, bundleName: string, versionCode: long) { + this.moduleName = moduleName; + this.bundleName = bundleName; + this.versionCode = versionCode; + } } export class PreloadItemInner implements PreloadItem { readonly moduleName: string = ""; + + constructor() { } + constructor(moduleName: string) { + this.moduleName = moduleName; + } } export class RouterItemInner implements RouterItem { @@ -59,9 +120,24 @@ export class RouterItemInner implements RouterItem { readonly buildFunction: string = ""; readonly customData: string = ""; readonly data: Array = new Array; + + constructor() { } + constructor(name: string, pageSourceFile: string, buildFunction: string, customData: string, data: Array) { + this.name = name; + this.pageSourceFile = pageSourceFile; + this.buildFunction = buildFunction; + this.customData = customData; + this.data = data; + } } export class DataItemInner implements DataItem { readonly key: string = ""; readonly value: string = ""; + + constructor() { } + constructor(key: string, value: string) { + this.key = key; + this.value = value; + } } \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/Metadata.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/Metadata.ets index 8005f976a3de3bb15dc7536885f58482e016a4f8..44f70e8a58c012f798b20af0fb8c9b7fe1a5fb92 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/Metadata.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/Metadata.ets @@ -17,5 +17,5 @@ export interface Metadata { name: string; value: string; resource: string; - readonly valueId?: number; + readonly valueId?: long; } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/MetadataInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/MetadataInner.ets index 4fa5d528ec70c3fe235ab90b5e0f85881a0a5b7c..c3e59cea7c9ab51453e27636140194d7ea28da40 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/MetadataInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/MetadataInner.ets @@ -19,5 +19,13 @@ export class MetadataInner implements Metadata { name: string = ""; value: string = ""; resource: string = ""; - readonly valueId?: number; + readonly valueId?: long; + + constructor() { } + constructor(name: string, value: string, resource: string, valueId?: long) { + this.name = name; + this.value = value; + this.resource = resource; + this.valueId = valueId; + } } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/PermissionDef.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PermissionDef.ets new file mode 100644 index 0000000000000000000000000000000000000000..079933c2450cd08fb2efec204da569488582c771 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PermissionDef.ets @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface PermissionDef { + readonly permissionName: string; + readonly grantMode: int; + readonly labelId: long; + readonly descriptionId: long; +} \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/PermissionDefInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PermissionDefInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..a10b8f3a2224e72a43c92d4358c89f101ca66fb2 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PermissionDefInner.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { PermissionDef } from 'bundleManager.PermissionDef' + +export class PermissionDefInner implements PermissionDef { + public readonly permissionName: string = ''; + public readonly grantMode: int; + public readonly labelId: long; + public readonly descriptionId: long; + + constructor() { } + constructor(permissionName: string, + grantMode: int, + labelId: long, + descriptionId: long) { + this.permissionName = permissionName; + this.grantMode = grantMode; + this.labelId = labelId; + this.descriptionId = descriptionId; + } +} \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/PluginBundleInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PluginBundleInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..869773e09867eb1113e2f47fbebd4df62b760b50 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PluginBundleInfo.ets @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface PluginBundleInfo { + readonly label: string; + readonly labelId: long; + readonly icon: string; + readonly iconId: long; + readonly pluginBundleName: string; + readonly versionCode: long; + readonly versionName: string; + readonly pluginModuleInfos: Array; +} + +export interface PluginModuleInfo { + readonly moduleName: string; + readonly descriptionId: long; + readonly description: string; +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/PluginBundleInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PluginBundleInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..027a9e58a8b6128af08a73d63171cc359bcb56be --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/PluginBundleInfoInner.ets @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { PluginBundleInfo, PluginModuleInfo } from 'bundleManager.PluginBundleInfo'; + +export class PluginBundleInfoInner implements PluginBundleInfo { + public readonly label: string = ''; + public readonly labelId: long; + public readonly icon: string = ''; + public readonly iconId: long; + public readonly pluginBundleName: string = ''; + public readonly versionCode: long; + public readonly versionName: string = ''; + public readonly pluginModuleInfos: Array = new Array; + + constructor() { } + constructor(label: string, + labelId: long, + icon: string, + iconId: long, + pluginBundleName: string, + versionCode: long, + versionName: string, + pluginModuleInfos: Array) { + this.label = label; + this.labelId = labelId; + this.icon = icon; + this.iconId = iconId; + this.pluginBundleName = pluginBundleName; + this.versionCode = versionCode; + this.versionName = versionName; + this.pluginModuleInfos = pluginModuleInfos; + } +} + +export class PluginModuleInfoInner implements PluginModuleInfo { + public readonly moduleName: string = ''; + public readonly descriptionId: long; + public readonly description: string = ''; + + constructor() { } + constructor(moduleName: string, + descriptionId: long, + description: string) { + this.moduleName = moduleName; + this.descriptionId = descriptionId; + this.description = description; + } +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/RecoverableApplicationInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/RecoverableApplicationInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..55c7331932e137c061c49b47578324eda18769ac --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/RecoverableApplicationInfo.ets @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundleManager from '@ohos.bundle.bundleManager'; + +export interface RecoverableApplicationInfo { + readonly bundleName: string; + readonly moduleName: string; + readonly labelId: long; + readonly iconId: long; + readonly systemApp: boolean; + readonly bundleType: bundleManager.BundleType; + readonly codePaths: Array; +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/RecoverableApplicationInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/RecoverableApplicationInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..8f3b90f98978266caf6feabd09b697e8e1a7dea8 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/RecoverableApplicationInfoInner.ets @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundleManager from '@ohos.bundle.bundleManager'; +import { RecoverableApplicationInfo } from 'bundleManager.RecoverableApplicationInfo' + +export class RecoverableApplicationInfoInner implements RecoverableApplicationInfo { + public readonly bundleName: string = ''; + public readonly moduleName: string = ''; + public readonly labelId: long; + public readonly iconId: long; + public readonly systemApp: boolean; + public readonly bundleType: bundleManager.BundleType = bundleManager.BundleType.APP; + public readonly codePaths: Array = new Array; + + constructor() { } + constructor(bundleName: string, + moduleName: string, + labelId: long, + iconId: long, + systemApp: boolean, + bundleType: bundleManager.BundleType, + codePaths: Array) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.labelId = labelId; + this.iconId = iconId; + this.systemApp = systemApp; + this.bundleType = bundleType; + this.codePaths = codePaths; + } +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/SharedBundleInfo.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/SharedBundleInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..57362770e70ee5a01a6268e4ccdd01833df1cbfe --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/SharedBundleInfo.ets @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundleManager from '@ohos.bundle.bundleManager'; + +export interface SharedBundleInfo { + readonly name: string; + readonly compatiblePolicy: bundleManager.CompatiblePolicy; + readonly sharedModuleInfo: Array; +} + +export interface SharedModuleInfo { + readonly name: string; + readonly versionCode: long; + readonly versionName: string; + readonly description: string; + readonly descriptionId: long; +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/SharedBundleInfoInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/SharedBundleInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..378e2e3f24fc2ea66da71ce5049d9fd427110d44 --- /dev/null +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/SharedBundleInfoInner.ets @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundleManager from '@ohos.bundle.bundleManager'; +import { SharedBundleInfo, SharedModuleInfo } from 'bundleManager.SharedBundleInfo' + +export class SharedBundleInfoInner implements SharedBundleInfo { + public readonly name: string = ''; + public readonly compatiblePolicy: bundleManager.CompatiblePolicy = + bundleManager.CompatiblePolicy.BACKWARD_COMPATIBILITY; + public readonly sharedModuleInfo: Array = new Array; + + constructor() { } + constructor(name: string, + compatiblePolicy: bundleManager.CompatiblePolicy, + sharedModuleInfo: Array) { + this.name = name; + this.compatiblePolicy = compatiblePolicy; + this.sharedModuleInfo = sharedModuleInfo; + } +} + +export class SharedModuleInfoInner implements SharedModuleInfo { + public readonly name: string = ''; + public readonly versionCode: long; + public readonly versionName: string = ''; + public readonly description: string = ''; + public readonly descriptionId: long; + + constructor() { } + constructor(name: string, + versionCode: long, + versionName: string, + description: string, + descriptionId: long) { + this.name = name; + this.versionCode = versionCode; + this.versionName = versionName; + this.description = description; + this.descriptionId = descriptionId; + } +} diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/Skill.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/Skill.ets index 9fa231ab73a153fbf8940da8fc416f1a338ca72b..21835f1ff398b2b48a0f8aa60e4a9372d9036348 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/Skill.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/Skill.ets @@ -23,12 +23,12 @@ export interface Skill { export interface SkillUri { readonly scheme: string; readonly host: string; - readonly port: number; + readonly port: int; readonly path: string; readonly pathStartWith: string; readonly pathRegex: string; readonly type: string; readonly utd: string; - readonly maxFileSupported: number; + readonly maxFileSupported: int; readonly linkFeature: string; } diff --git a/interfaces/kits/ani/bundle_manager/ets/bundleManager/SkillInner.ets b/interfaces/kits/ani/bundle_manager/ets/bundleManager/SkillInner.ets index 0cb6db443e34c8d8e63a3492f86afc15283e183e..4496d46e2b9395d6c03b3253b6223113fff23076 100644 --- a/interfaces/kits/ani/bundle_manager/ets/bundleManager/SkillInner.ets +++ b/interfaces/kits/ani/bundle_manager/ets/bundleManager/SkillInner.ets @@ -20,17 +20,48 @@ export class SkillInner implements Skill { readonly entities: Array = new Array; readonly uris: Array = new Array; readonly domainVerify: boolean; + + constructor() { } + constructor(actions: Array, entities: Array, uris: Array, domainVerify: boolean) { + this.actions = actions; + this.entities = entities; + this.uris = uris; + this.domainVerify = domainVerify; + } } export class SkillUriInner implements SkillUri { readonly scheme: string = ""; readonly host: string = ""; - readonly port: number; + readonly port: int; readonly path: string = ""; readonly pathStartWith: string = ""; readonly pathRegex: string = ""; readonly type: string = ""; readonly utd: string = ""; - readonly maxFileSupported: number; + readonly maxFileSupported: int; readonly linkFeature: string = ""; + + constructor() { } + constructor(scheme: string, + host: string, + port: int, + path: string, + pathStartWith: string, + pathRegex: string, + type: string, + utd: string, + maxFileSupported: int, + linkFeature: string) { + this.scheme = scheme; + this.host = host; + this.port = port; + this.path = path; + this.pathStartWith = pathStartWith; + this.pathRegex = pathRegex; + this.type = type; + this.utd = utd; + this.maxFileSupported = maxFileSupported; + this.linkFeature = linkFeature; + } } diff --git a/interfaces/kits/ani/bundle_monitor/BUILD.gn b/interfaces/kits/ani/bundle_monitor/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..fa08ae61839f6c3b8e6be2637c11c5543a37f8db --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/BUILD.gn @@ -0,0 +1,95 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") + +ohos_shared_library("ani_bundle_monitor") { + shlib_type = "ani" + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + include_dirs = [ + "${inner_api_path}/appexecfwk_core/include", + "${kits_path}/ani/bundle_monitor", + "${kits_path}/ani/common", + "${kits_path}/js/common", + ] + + sources = [ + "ani_bundle_monitor.cpp", + "ani_bundle_monitor_callback_handler.cpp", + "ani_bundle_monitor_event_handler.cpp", + ] + + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/common:bundle_napi_common", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + external_deps = [ + "c_utils:utils", + "common_event_service:cesfwk_core", + "common_event_service:cesfwk_innerkits", + "hilog:libhilog", + "ipc:ipc_core", + "napi:ace_napi", + "runtime_core:ani", + "runtime_core:ani_helpers", + "samgr:samgr_proxy", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + +generate_static_abc("bundle_monitor") { + base_url = "./ets" + files = [ "./ets/@ohos.bundle.bundleMonitor.ets" ] + is_boot_abc = "True" + device_dst_file = "/system/framework/bundle_monitor.abc" +} + +ohos_prebuilt_etc("bundle_monitor_etc") { + source = "$target_out_dir/bundle_monitor.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":bundle_monitor" ] +} diff --git a/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor.cpp b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor.cpp new file mode 100644 index 0000000000000000000000000000000000000000..06d35ee3c04ea07e16723bc1dfb3e6fc6bc026a1 --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor.cpp @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "ani_bundle_monitor_event_handler.h" +#include "app_log_wrapper.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_BUNDLE_MONITOR = "@ohos.bundle.bundleMonitor.bundleMonitor"; +constexpr const char* INTERFACE_NAME_ON = "on"; +constexpr const char* INTERFACE_NAME_OFF = "off"; +constexpr const char* PERMISSION_LISTEN_BUNDLE_CHANGE = "ohos.permission.LISTEN_BUNDLE_CHANGE"; +constexpr const char* TYPE = "type"; +constexpr const char* CALLBACK = "callback"; +static std::mutex g_aniBundleMonitorMutex; +static std::shared_ptr g_aniBundleMonitor; +} // namespace + +static ani_status IsNullOrUndefined(ani_env* env, ani_ref ref, bool& result) +{ + if (ref == nullptr) { + result = true; + return ANI_OK; + } + ani_boolean isNull = ANI_FALSE; + ani_boolean isUndefined = ANI_FALSE; + ani_status status = env->Reference_IsNull(ref, &isNull); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Reference_IsNull failed"); + if (isNull == ANI_TRUE) { + result = true; + return ANI_OK; + } + status = env->Reference_IsUndefined(ref, &isUndefined); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Reference_IsUndefined failed"); + result = isUndefined == ANI_TRUE; + return ANI_OK; +} + +static void RegisterBundleChangedEvent(ani_env* env, ani_string aniEventType, ani_object aniCallback) +{ + APP_LOGD("RegisterBundleChangedEvent entry"); + + std::string eventType; + if (!CommonFunAni::ParseString(env, aniEventType, eventType)) { + APP_LOGE("parse eventType failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TYPE, TYPE_STRING); + return; + } + + bool isCallbackEmpty = false; + ani_status status = IsNullOrUndefined(env, aniCallback, isCallbackEmpty); + if (status != ANI_OK) { + APP_LOGE("check empty fail, status: %{public}d", status); + return; + } + if (isCallbackEmpty) { + APP_LOGE("callback is empty"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, CALLBACK, TYPE_FUNCTION); + return; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return; + } + + if (!iBundleMgr->VerifySystemApi(Constants::INVALID_API_VERSION)) { + APP_LOGE("register bundle status callback failed due to non-sys app calling"); + auto error = BusinessErrorAni::CreateCommonError(env, ERROR_NOT_SYSTEM_APP); + env->ThrowError(static_cast(error)); + return; + } + + if (!iBundleMgr->VerifyCallingPermission(Constants::LISTEN_BUNDLE_CHANGE)) { + APP_LOGE("register bundle status callback failed due to lack of permission"); + auto error = BusinessErrorAni::CreateCommonError( + env, ERROR_PERMISSION_DENIED_ERROR, INTERFACE_NAME_ON, PERMISSION_LISTEN_BUNDLE_CHANGE); + env->ThrowError(static_cast(error)); + return; + } + + { + std::lock_guard lock(g_aniBundleMonitorMutex); + if (g_aniBundleMonitor == nullptr) { + APP_LOGE("environment init failed"); + return; + } + g_aniBundleMonitor->RegisterBundleChangedEvent(env, eventType, aniCallback); + } + + APP_LOGD("RegisterBundleChangedEvent exit"); +} + +static void UnregisterBundleChangedEvent(ani_env* env, ani_string aniEventType, ani_object aniCallback) +{ + APP_LOGD("UnregisterBundleChangedEvent entry"); + + std::string eventType; + if (!CommonFunAni::ParseString(env, aniEventType, eventType)) { + APP_LOGE("parse eventType failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TYPE, TYPE_STRING); + return; + } + + bool isCallbackEmpty = false; + ani_status status = IsNullOrUndefined(env, aniCallback, isCallbackEmpty); + if (status != ANI_OK) { + APP_LOGE("check empty fail, status: %{public}d", status); + return; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return; + } + + if (!iBundleMgr->VerifySystemApi(Constants::INVALID_API_VERSION)) { + APP_LOGE("register bundle status callback failed due to non-sys app calling"); + auto error = BusinessErrorAni::CreateCommonError(env, ERROR_NOT_SYSTEM_APP); + env->ThrowError(static_cast(error)); + return; + } + + if (!iBundleMgr->VerifyCallingPermission(Constants::LISTEN_BUNDLE_CHANGE)) { + APP_LOGE("unregister bundle status callback failed due to lack of permission"); + auto error = BusinessErrorAni::CreateCommonError( + env, ERROR_PERMISSION_DENIED_ERROR, INTERFACE_NAME_OFF, PERMISSION_LISTEN_BUNDLE_CHANGE); + env->ThrowError(static_cast(error)); + return; + } + + { + std::lock_guard lock(g_aniBundleMonitorMutex); + if (g_aniBundleMonitor == nullptr) { + APP_LOGE("environment init failed"); + return; + } + if (isCallbackEmpty) { + g_aniBundleMonitor->UnregisterBundleChangedEvent(env, eventType); + } else { + g_aniBundleMonitor->UnregisterBundleChangedEvent(env, eventType, aniCallback); + } + } + + APP_LOGD("UnregisterBundleChangedEvent exit"); +} + +static void InitializeBundleMonitor(ani_vm* vm) +{ + std::lock_guard lock(g_aniBundleMonitorMutex); + if (g_aniBundleMonitor != nullptr) { + return; + } + EventFwk::MatchingSkills matchingSkills; + matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_ADDED); + matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED); + matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_REMOVED); + EventFwk::CommonEventSubscribeInfo subscribeInfo(matchingSkills); + g_aniBundleMonitor = std::make_shared(vm, subscribeInfo); + (void)EventFwk::CommonEventManager::SubscribeCommonEvent(g_aniBundleMonitor); +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace bundleMonitorNS = + arkts::ani_signature::Builder::BuildNamespace(NS_NAME_BUNDLE_MONITOR); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(bundleMonitorNS.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_BUNDLE_MONITOR, status); + return status; + } + std::array methods = { + ani_native_function { INTERFACE_NAME_ON, nullptr, reinterpret_cast(RegisterBundleChangedEvent) }, + ani_native_function { INTERFACE_NAME_OFF, nullptr, reinterpret_cast(UnregisterBundleChangedEvent) }, + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_BUNDLE_MONITOR, status); + return status; + } + + *result = ANI_VERSION_1; + + InitializeBundleMonitor(vm); + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // namespace AppExecFwk +} // namespace OHOS diff --git a/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_callback_handler.cpp b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_callback_handler.cpp new file mode 100755 index 0000000000000000000000000000000000000000..139b6ca918491683763271afab53ec87174f7318 --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_callback_handler.cpp @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ani_bundle_monitor_callback_handler.h" + +#include "app_log_wrapper.h" +#include "bundle_constants.h" +#include "common_fun_ani.h" +#include "common_func.h" + +namespace OHOS { +namespace AppExecFwk { + +ANIBundleMonitorCallbackHandler::~ANIBundleMonitorCallbackHandler() +{ + stopFlag_ = true; +} + +void ANIBundleMonitorCallbackHandler::AddCallback(ani_env* env, ani_object aniCallback) +{ + APP_LOGI("AddCallback entry"); + RETURN_IF_NULL(env); + std::lock_guard lock(callbackMutex_); + for (auto iter = callbackList_.begin(); iter != callbackList_.end(); ++iter) { + ani_boolean isEqual = ANI_FALSE; + env->Reference_StrictEquals(aniCallback, *iter, &isEqual); + if (isEqual == ANI_TRUE) { + APP_LOGI("callback already exists"); + return; + } + } + ani_ref callbackRef = nullptr; + ani_status status = env->GlobalReference_Create(aniCallback, &callbackRef); + if (status != ANI_OK) { + APP_LOGE("GlobalReference_Create error. result: %{public}d", status); + return; + } + if (callbackRef == nullptr) { + APP_LOGE("callbackRef is null"); + return; + } + callbackList_.push_back(callbackRef); + APP_LOGI("AddCallback exit"); +} + +void ANIBundleMonitorCallbackHandler::RemoveCallback(ani_env* env, ani_object aniCallback) +{ + APP_LOGI("RemoveCallback entry"); + RETURN_IF_NULL(env); + std::lock_guard lock(callbackMutex_); + for (auto iter = callbackList_.begin(); iter != callbackList_.end();) { + ani_boolean isEqual = ANI_FALSE; + env->Reference_StrictEquals(aniCallback, *iter, &isEqual); + if (isEqual == ANI_TRUE) { + if (notifyCounter_ == 0) { + APP_LOGD("direct clear"); + env->GlobalReference_Delete(*iter); + } else { + removedCallbackList_.emplace_back(*iter); + APP_LOGD("delayed clear, size: %{public}zu", removedCallbackList_.size()); + } + iter = callbackList_.erase(iter); + break; + } else { + ++iter; + } + } + APP_LOGI("RemoveCallback exit"); +} + +void ANIBundleMonitorCallbackHandler::RemoveAllCallback(ani_env* env) +{ + APP_LOGI("RemoveAllCallback entry"); + RETURN_IF_NULL(env); + std::lock_guard lock(callbackMutex_); + if (notifyCounter_ == 0) { + APP_LOGD("direct clear"); + ClearCallbackList(env, callbackList_); + } else { + removedCallbackList_.splice(removedCallbackList_.end(), callbackList_); + APP_LOGD("delayed clear, size: %{public}zu", removedCallbackList_.size()); + } + APP_LOGI("RemoveAllCallback exit"); +} + +void ANIBundleMonitorCallbackHandler::InvokeCallback(ani_env* env, const BundleChangedInfo& info) +{ + APP_LOGI("InvokeCallback entry"); + RETURN_IF_NULL(env); + ani_object aniInfo = CommonFunAni::CreateBundleChangedInfo(env, info.bundleName, info.userId, info.appIndex); + if (aniInfo == nullptr) { + APP_LOGE("CreateBundleChangedInfo failed"); + return; + } + std::vector callbackArgs = { aniInfo }; + std::list callbackListSnapshot; + { + std::lock_guard lock(callbackMutex_); + ++notifyCounter_; + callbackListSnapshot = callbackList_; + } + for (const auto& callbackRef : callbackListSnapshot) { + if (stopFlag_) { + return; + } + auto fnObject = reinterpret_cast(callbackRef); + if (fnObject == nullptr) { + APP_LOGE("fnObject is null"); + continue; + } + ani_ref result = nullptr; + ani_status ret = env->FunctionalObject_Call(fnObject, callbackArgs.size(), callbackArgs.data(), &result); + if (ret != ANI_OK) { + APP_LOGE("FunctionalObject_Call failed: %{public}d", ret); + } + } + { + std::lock_guard lock(callbackMutex_); + --notifyCounter_; + if (notifyCounter_ == 0) { + APP_LOGD("notifyCounter_ is 0, run clear"); + ClearCallbackList(env, removedCallbackList_); + } + } + APP_LOGI("InvokeCallback exit"); +} +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_callback_handler.h b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_callback_handler.h new file mode 100755 index 0000000000000000000000000000000000000000..04b8913a44e3ab480beb23bd79436dbcd89e7d97 --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_callback_handler.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ANI_BUNDLE_MONITOR_BUNDLE_MONITOR_CALLBACK_HANDLER_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ANI_BUNDLE_MONITOR_BUNDLE_MONITOR_CALLBACK_HANDLER_H + +#include +#include + +#include "common_fun_ani.h" +#include "nocopyable.h" + +namespace OHOS { +namespace AppExecFwk { +struct BundleChangedInfo { + std::string bundleName; + int32_t userId = 0; + int32_t appIndex = 0; +}; + +class ANIBundleMonitorCallbackHandler { +public: + ANIBundleMonitorCallbackHandler() = default; + ~ANIBundleMonitorCallbackHandler(); + void inline Stop() + { + stopFlag_ = true; + } + void AddCallback(ani_env* env, ani_object aniCallback); + void RemoveCallback(ani_env* env, ani_object aniCallback); + void RemoveAllCallback(ani_env* env); + void InvokeCallback(ani_env* env, const BundleChangedInfo& info); + +private: + void inline ClearCallbackList(ani_env* env, std::list& list) + { + for (auto& iter : list) { + env->GlobalReference_Delete(iter); + } + list.clear(); + } + +private: + std::list callbackList_; + std::list removedCallbackList_; + std::mutex callbackMutex_; + size_t notifyCounter_ = 0; + std::atomic_bool stopFlag_ { false }; + DISALLOW_COPY_AND_MOVE(ANIBundleMonitorCallbackHandler); +}; +} // namespace AppExecFwk +} // namespace OHOS + +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ANI_BUNDLE_MONITOR_BUNDLE_MONITOR_CALLBACK_HANDLER_H \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_event_handler.cpp b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_event_handler.cpp new file mode 100755 index 0000000000000000000000000000000000000000..982933e0c55e66852c4f182866bbc35e4836c2e9 --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_event_handler.cpp @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ani_bundle_monitor_event_handler.h" + +#include "app_log_wrapper.h" +#include "bundle_constants.h" +#include "common_fun_ani.h" +#include "common_func.h" + +namespace OHOS { +namespace AppExecFwk { +ANIBundleMonitorEventHandler::ANIBundleMonitorEventHandler( + ani_vm* vm, const EventFwk::CommonEventSubscribeInfo& subscribeInfo) + : EventFwk::CommonEventSubscriber(subscribeInfo), vm_(vm) +{} + +ANIBundleMonitorEventHandler::~ANIBundleMonitorEventHandler() +{ + addCallbackHandler_.Stop(); + updateCallbackHandler_.Stop(); + removeCallbackHandler_.Stop(); + stopFlag_ = true; +} + +void ANIBundleMonitorEventHandler::RegisterBundleChangedEvent( + ani_env* env, const std::string& eventType, ani_object aniCallback) +{ + RETURN_IF_NULL(env); + auto id = GetMessageIdByType(eventType); + switch (id) { + case MESSAGE_ID::INVOKE_ADD: + addCallbackHandler_.AddCallback(env, aniCallback); + break; + case MESSAGE_ID::INVOKE_UPDATE: + updateCallbackHandler_.AddCallback(env, aniCallback); + break; + case MESSAGE_ID::INVOKE_REMOVE: + removeCallbackHandler_.AddCallback(env, aniCallback); + break; + default: + break; + } +} + +void ANIBundleMonitorEventHandler::UnregisterBundleChangedEvent( + ani_env* env, const std::string& eventType, ani_object aniCallback) +{ + RETURN_IF_NULL(env); + auto id = GetMessageIdByType(eventType); + switch (id) { + case MESSAGE_ID::INVOKE_ADD: + addCallbackHandler_.RemoveCallback(env, aniCallback); + break; + case MESSAGE_ID::INVOKE_UPDATE: + updateCallbackHandler_.RemoveCallback(env, aniCallback); + break; + case MESSAGE_ID::INVOKE_REMOVE: + removeCallbackHandler_.RemoveCallback(env, aniCallback); + break; + default: + break; + } +} + +void ANIBundleMonitorEventHandler::UnregisterBundleChangedEvent(ani_env* env, const std::string& eventType) +{ + RETURN_IF_NULL(env); + auto id = GetMessageIdByType(eventType); + switch (id) { + case MESSAGE_ID::INVOKE_ADD: + addCallbackHandler_.RemoveAllCallback(env); + break; + case MESSAGE_ID::INVOKE_UPDATE: + updateCallbackHandler_.RemoveAllCallback(env); + break; + case MESSAGE_ID::INVOKE_REMOVE: + removeCallbackHandler_.RemoveAllCallback(env); + break; + default: + break; + } +} + +void ANIBundleMonitorEventHandler::OnReceiveEvent(const EventFwk::CommonEventData& eventData) +{ + OHOS::AAFwk::Want want = eventData.GetWant(); + std::string action = want.GetAction(); + std::string bundleName = want.GetElement().GetBundleName(); + int32_t userId = want.GetIntParam(Constants::USER_ID, Constants::INVALID_USERID); + int32_t appIndex = want.GetIntParam(Constants::APP_INDEX, Constants::DEFAULT_APP_INDEX); + + APP_LOGI("monitor callback OnReceiveEvent action:%{public}s -n %{public}s -u %{public}d -i %{public}d", + action.c_str(), bundleName.c_str(), userId, appIndex); + auto id = GetMessageIdByType(action); + if (id == MESSAGE_ID::INVALID) { + APP_LOGW("invalid message id"); + return; + } + std::lock_guard lock(messageQueueMutex_); + messageQueue_.emplace( + ANIBundleMonitorEventHandlerMessage { id, BundleChangedInfo { bundleName, userId, appIndex } }); + if (processingFlag_) { + APP_LOGD("processing, leave"); + return; + } + processingFlag_ = true; + APP_LOGD("not processing, start new thread"); + std::thread(&ANIBundleMonitorEventHandler::ProcessMessages, this).detach(); +} + +void ANIBundleMonitorEventHandler::ProcessMessages() +{ + APP_LOGD("proc thread entry"); + + RETURN_IF_NULL(vm_); + ani_env* env = nullptr; + ani_options aniArgs { 0, nullptr }; + ani_status status = vm_->AttachCurrentThread(&aniArgs, ANI_VERSION_1, &env); + if (status != ANI_OK) { + APP_LOGE("AttachCurrentThread failed: %{public}d", status); + processingFlag_ = false; + return; + } + + while (true) { + ANIBundleMonitorEventHandlerMessage message; + { + std::lock_guard lock(messageQueueMutex_); + APP_LOGD("messageQueue_ size: %{public}zu", messageQueue_.size()); + if (stopFlag_) { + processingFlag_ = false; + APP_LOGD("stop flag, leave"); + return; + } + if (messageQueue_.empty()) { + processingFlag_ = false; + APP_LOGD("empty queue, leave"); + break; + } + + message = std::move(messageQueue_.front()); + messageQueue_.pop(); + } + + switch (message.messageId) { + case MESSAGE_ID::INVOKE_ADD: + addCallbackHandler_.InvokeCallback(env, message.bundleChangedInfo); + break; + case MESSAGE_ID::INVOKE_UPDATE: + updateCallbackHandler_.InvokeCallback(env, message.bundleChangedInfo); + break; + case MESSAGE_ID::INVOKE_REMOVE: + removeCallbackHandler_.InvokeCallback(env, message.bundleChangedInfo); + break; + default: + APP_LOGE("invalid message id"); + break; + } + } + + status = vm_->DetachCurrentThread(); + if (status != ANI_OK) { + APP_LOGE("DetachCurrentThread failed: %{public}d", status); + } + + APP_LOGD("proc thread exit"); +} +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_event_handler.h b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_event_handler.h new file mode 100755 index 0000000000000000000000000000000000000000..c2eecd93e9074554d2b35ffae5c4e1b9e1cd9cd1 --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/ani_bundle_monitor_event_handler.h @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ANI_BUNDLE_MONITOR_BUNDLE_MONITOR_EVENT_HANDLER_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ANI_BUNDLE_MONITOR_BUNDLE_MONITOR_EVENT_HANDLER_H + +#include +#include +#include +#include + +#include "ani_bundle_monitor_callback_handler.h" +#include "common_event_manager.h" +#include "common_event_subscribe_info.h" +#include "common_event_subscriber.h" +#include "common_event_support.h" +#include "common_fun_ani.h" +#include "nocopyable.h" + +namespace OHOS { +namespace AppExecFwk { + +enum class MESSAGE_ID { + INVALID = 0, + INVOKE_ADD = 1, + INVOKE_UPDATE = 2, + INVOKE_REMOVE = 3, +}; + +struct ANIBundleMonitorEventHandlerMessage { + MESSAGE_ID messageId = MESSAGE_ID::INVALID; + BundleChangedInfo bundleChangedInfo; +}; + +class ANIBundleMonitorEventHandler : public EventFwk::CommonEventSubscriber { +public: + explicit ANIBundleMonitorEventHandler(ani_vm* vm, const EventFwk::CommonEventSubscribeInfo& subscribeInfo); + virtual ~ANIBundleMonitorEventHandler(); + void RegisterBundleChangedEvent(ani_env* env, const std::string& eventType, ani_object aniCallback); + void UnregisterBundleChangedEvent(ani_env* env, const std::string& eventType, ani_object aniCallback); + void UnregisterBundleChangedEvent(ani_env* env, const std::string& eventType); + void OnReceiveEvent(const EventFwk::CommonEventData& eventData); + +private: + inline MESSAGE_ID GetMessageIdByType(const std::string& type) + { + if (type == "add" || type == EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_ADDED) { + return MESSAGE_ID::INVOKE_ADD; + } else if (type == "update" || type == EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED) { + return MESSAGE_ID::INVOKE_UPDATE; + } else if (type == "remove" || type == EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_REMOVED) { + return MESSAGE_ID::INVOKE_REMOVE; + } else { + APP_LOGE("incorrect type: %{public}s", type.c_str()); + return MESSAGE_ID::INVALID; + } + } + void ProcessMessages(); + +private: + ani_vm* vm_ = nullptr; + ANIBundleMonitorCallbackHandler addCallbackHandler_; + ANIBundleMonitorCallbackHandler updateCallbackHandler_; + ANIBundleMonitorCallbackHandler removeCallbackHandler_; + std::atomic processingFlag_ { false }; + std::atomic stopFlag_ { false }; + std::queue messageQueue_; + std::mutex messageQueueMutex_; + DISALLOW_COPY_AND_MOVE(ANIBundleMonitorEventHandler); +}; +} // namespace AppExecFwk +} // namespace OHOS + +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ANI_BUNDLE_MONITOR_BUNDLE_MONITOR_EVENT_HANDLER_H \ No newline at end of file diff --git a/interfaces/kits/ani/bundle_monitor/ets/@ohos.bundle.bundleMonitor.ets b/interfaces/kits/ani/bundle_monitor/ets/@ohos.bundle.bundleMonitor.ets new file mode 100644 index 0000000000000000000000000000000000000000..d63fb839b0836a93d7ebd05da47802f080315311 --- /dev/null +++ b/interfaces/kits/ani/bundle_monitor/ets/@ohos.bundle.bundleMonitor.ets @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Callback } from '@ohos.base'; + +export default namespace bundleMonitor { + + loadLibrary("ani_bundle_monitor.z"); + + export interface BundleChangedInfo { + readonly bundleName: string; + readonly userId: int; + readonly appIndex: int; + } + + export class BundleChangedInfoInner implements BundleChangedInfo { + readonly bundleName: string; + readonly userId: int; + readonly appIndex: int; + + constructor() { } + constructor(bundleName: string, + userId: int, + appIndex: int) { + this.bundleName = bundleName; + this.userId = userId; + this.appIndex = appIndex; + } + } + + type BundleChangedEvent = 'add' | 'update' | 'remove'; + + export native function on(type: BundleChangedEvent, callback: Callback): void; + + export native function off(type: BundleChangedEvent, callback?: Callback): void; +} \ No newline at end of file diff --git a/interfaces/kits/ani/common/BUILD.gn b/interfaces/kits/ani/common/BUILD.gn index 789e9fc86fb959f6c0a741e4c66fd196f9b3547f..febafb002b3ff54ebd6d8306161e7d1dc82b788a 100644 --- a/interfaces/kits/ani/common/BUILD.gn +++ b/interfaces/kits/ani/common/BUILD.gn @@ -68,6 +68,7 @@ ohos_shared_library("bms_ani_common") { "hilog:libhilog", "ipc:ipc_core", "runtime_core:ani", + "runtime_core:ani_helpers", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/interfaces/kits/ani/common/business_error_ani.cpp b/interfaces/kits/ani/common/business_error_ani.cpp index c05a56f2250443094114553762dc8e2873db7e19..f941c21763132d94b361956026af96334883b325 100644 --- a/interfaces/kits/ani/common/business_error_ani.cpp +++ b/interfaces/kits/ani/common/business_error_ani.cpp @@ -18,6 +18,7 @@ #include "app_log_wrapper.h" #include "bundle_errors.h" #include "business_error_ani.h" +#include "business_error_map.h" #include "napi_constants.h" #include "common_fun_ani.h" @@ -25,221 +26,7 @@ namespace OHOS { namespace AppExecFwk { namespace { constexpr const char* ERROR_MESSAGE_PLACEHOLDER = "$"; -constexpr const char* ERR_MSG_BUSINESS_ERROR = "BusinessError $: "; -constexpr const char* ERR_MSG_PERMISSION_DENIED_ERROR = - "Permission denied. An attempt was made to $ forbidden by permission: $."; -constexpr const char* ERR_MSG_NOT_SYSTEM_APP = - "Permission denied. Non-system APP calling system API"; -constexpr const char* ERR_MSG_PARAM_TYPE_ERROR = "Parameter error. The type of $ must be $."; -constexpr const char* ERR_MSG_ABILITY_NOT_SUPPORTED = - "Capability not supported. Function $ can not work correctly due to limited device capabilities."; -constexpr const char* ERR_MSG_BUNDLE_NOT_EXIST = "The specified bundle is not found."; -constexpr const char* ERR_MSG_MODULE_NOT_EXIST = "The specified module is not found."; -constexpr const char* ERR_MSG_ABILITY_NOT_EXIST = "The specified ability is not found."; -constexpr const char* ERR_MSG_INVALID_USER_ID = "The specified user id is not found."; -constexpr const char* ERR_MSG_APPID_NOT_EXIST = "The specified appId is an empty string."; -constexpr const char* ERR_MSG_PERMISSION_NOT_EXIST = "The specified permission is not found."; -constexpr const char* ERR_MSG_DEVICE_ID_NOT_EXIST = "The specified deviceId is not found."; -constexpr const char* ERR_MSG_INVALID_APP_INDEX = "The specified app index is invalid."; -constexpr const char* ERR_MSG_INSTALL_PARSE_FAILED = "Failed to install the hap since the hap fails to be parsed."; -constexpr const char* ERR_MSG_INSTALL_VERIFY_SIGNATURE_FAILED = - "Failed to install the hap since the hap signature fails to be verified."; -constexpr const char* ERR_MSG_INSTALL_HAP_FILEPATH_INVALID = - "Failed to install the hap since the path of the hap is invalid or too large size."; -constexpr const char* ERR_MSG_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT = - "Failed to install haps since the configuration information of multi haps is inconsistent."; -constexpr const char* ERR_MSG_INSTALL_NO_DISK_SPACE_LEFT = - "Failed to install the hap since the system disk space is insufficient."; -constexpr const char* ERR_MSG_INSTALL_VERSION_DOWNGRADE = - "Failed to install the hap since the version of the newly installed hap is too early."; -constexpr const char* ERR_MSG_INSTALL_DEPENDENT_MODULE_NOT_EXIST = - "Failed to install the HAP or HSP because the dependent module does not exist."; -constexpr const char* ERR_MSG_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED = - "Failed to install the HSP due to the lack of required permission."; -constexpr const char* ERR_MSG_UNINSTALL_PREINSTALL_APP_FAILED = "The preinstalled app cannot be uninstalled."; -constexpr const char* ERR_MSG_BUNDLE_NOT_PREINSTALLED = - "Failed to uninstall updates because the HAP is not pre-installed."; -constexpr const char* ERR_ZLIB_SRC_FILE_INVALID_MSG = "The Input source file is invalid."; -constexpr const char* ERR_ZLIB_DEST_FILE_INVALID_MSG = "The Input destination file is invalid."; -constexpr const char* ERR_MSG_PARAM_NUMBER_ERROR = - "BusinessError 401: Parameter error. The number of parameters is incorrect."; -constexpr const char* ERROR_MSG_BUNDLE_IS_DISABLED = "The specified bundle is disabled."; -constexpr const char* ERROR_MSG_ABILITY_IS_DISABLED = "The specified ability is disabled."; -constexpr const char* ERROR_MSG_PROFILE_NOT_EXIST = "The specified profile is not found in the HAP."; -constexpr const char* ERROR_INVALID_UID_MSG = "The specified uid is invalid."; -constexpr const char* ERROR_INVALID_HAP_PATH_MSG = "The input source file is invalid."; -constexpr const char* ERROR_DEFAULT_APP_NOT_EXIST_MSG = "The specified default app does not exist."; -constexpr const char* ERROR_INVALID_TYPE_MSG = "The specified type is invalid."; -constexpr const char* ERROR_MSG_DISTRIBUTED_SERVICE_NOT_RUNNING = "The distributed service is not running."; -constexpr const char* ERROR_ABILITY_AND_TYPE_MISMATCH_MSG = "The specified ability and type do not match."; -constexpr const char* ERROR_MSG_CLEAR_CACHE_FILES_UNSUPPORTED = - "The specified bundle does not support clearing cache files."; -constexpr const char* ERROR_MSG_INSTALL_HAP_OVERLAY_CHECK_FAILED = - "Failed to install the HAP because the overlay check of the HAP failed."; -constexpr const char* ERROR_MSG_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE = - "The specified bundleName is not overlay bundle."; -constexpr const char* ERROR_MSG_SPECIFIED_MODULE_NOT_OVERLAY_MODULE = - "The specified moduleName is not overlay module."; -constexpr const char* ERROR_MSG_SPECIFIED_MODULE_IS_OVERLAY_MODULE = - "The specified moduleName is overlay module."; -constexpr const char* ERROR_MSG_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE = - "The specified bundle is overlay bundle."; -constexpr const char* ERROR_MSG_SHARE_APP_LIBRARY_IS_RELIED = - "The version of the shared bundle is dependent on other applications."; -constexpr const char* ERROR_MSG_SHARE_APP_LIBRARY_IS_NOT_EXIST = - "The specified shared library is not exist"; -constexpr const char* ERR_MSG_UNINSTALL_SHARED_LIBRARY = - "The specified bundle is shared library"; -constexpr const char* ERR_MSG_DISALLOW_INSTALL = - "Failed to install the HAP because the installation is forbidden by enterprise device management."; -constexpr const char* ERR_MSG_WRONG_PROXY_DATA_URI = - "The uri in data proxy is wrong"; -constexpr const char* ERR_MSG_WRONG_PROXY_DATA_PERMISSION = - "The apl of required permission in non-system data proxy should be system_basic or system_core"; -constexpr const char* ERR_MSG_WRONG_MODE_ISOLATION = - "Failed to install the HAP because the isolationMode configured is not supported"; -constexpr const char* ERR_MSG_DISALLOW_UNINSTALL = - "Failed to uninstall the HAP because the uninstall is forbidden by enterprise device management."; -constexpr const char* ERR_MSG_ALREADY_EXIST = - "Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode"; -constexpr const char* ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED_MSG = - "The input source file is not in ZIP format or is damaged."; -constexpr const char* ERR_MSG_CODE_SIGNATURE_FAILED = - "Failed to install the HAP because the code signature verification failed."; -constexpr const char* ERR_MSG_SELF_UPDATE_NOT_MDM = - "Failed to install the HAP because the distribution type of the caller application is not enterprise_mdm."; -constexpr const char* ERR_MSG_SELF_UPDATE_BUNDLENAME_NOT_SAME = - "Failed to install the HAP because the bundleName is different from the bundleName of the caller application."; -constexpr const char* ERR_MSG_ENTERPRISE_BUNDLE_NOT_ALLOWED = - "Failed to install the HAP because an enterprise normal/MDM bundle cannot be installed on non-enterprise devices."; -constexpr const char* ERR_MSG_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED = - "It is not allowed to install the enterprise bundle."; -constexpr const char* ERR_MSG_DEBUG_BUNDLE_NOT_ALLOWED = - "Failed to install the HAP because a debug bundle can be installed only in developer mode."; -constexpr const char* ERR_MSG_ERROR_VERIFY_ABC = "Failed to verify the abc file."; -constexpr const char* ERR_MSG_ERROR_DELETE_ABC = "Failed to delete the abc file."; -constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_ADD_ERROR = "Failed to add extended resources."; -constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_REMOVE_ERROR = "Failed to remove extended resources."; -constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_GET_ERROR = "Failed to obtain extended resources."; -constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_ENABLE_ERROR = "Failed to enable the dynamic icon."; -constexpr const char* ERR_MSG_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES = - "Dynamic icons cannot take effect due to existing custom themes."; -constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_DISABLE_ERROR = "Failed to disable the dynamic icon."; -constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_GET_ERROR = "Failed to obtain the dynamic icon."; -constexpr const char* ERROR_MSG_NOT_APP_GALLERY_CALL = "The caller is not AppGallery."; -constexpr const char* ERROR_MSG_INSTALL_PERMISSION_CHECK_ERROR = - "Failed to install the HAP because the HAP requests wrong permissions."; -constexpr const char* ERR_MSG_INVALID_LINK = "The specified link is invalid."; -constexpr const char* ERR_MSG_SCHEME_NOT_IN_QUERYSCHEMES = - "The scheme of the specified link is not in the querySchemes."; -constexpr const char* ERR_MSG_INVALID_DEVELOPER_ID = - "The specified developerId is invalid."; -constexpr const char* ERR_MSG_ENUM_EROOR = - "Parameter error. The value of $ is not a valid enum $."; -constexpr const char* ERR_MSG_BUNDLE_CAN_NOT_BE_UNINSTALLED = - "The specified application cannot be uninstalled."; -constexpr const char* ERR_MSG_START_SHORTCUT = - "The ability specified by want in the ShortcutInfo struct cannot be started."; -constexpr const char* ERR_MSG_INSTALL_FAILED_CONTROLLED = - "Failed to install the HAP because the device has been controlled."; -constexpr const char* ERR_MSG_NATIVE_INSTALL_FAILED = - "Failed to install the HAP because installing the native package failed."; -constexpr const char* ERR_MSG_NATIVE_UNINSTALL_FAILED = - "Failed to uninstall the HAP because uninstalling the native package failed."; -constexpr const char* ERR_MSG_INVALID_APPINDEX = - "The appIndex is invalid."; -constexpr const char* ERR_MSG_APP_NOT_SUPPORTED_MULTI_TYPE = - "The app does not support the creation of an appClone instance."; -constexpr const char* ERR_MSG_SHORTCUT_ID_ILLEGAL = - "The specified shortcut id is illegal."; -constexpr const char* ERR_MSG_INSTALL_FAILED_INCONSISTENT_SIGNATURE = - "Failed to install the HAP because an application with the same bundle name " - "but different signature information exists on the device."; - -static std::unordered_map ERR_MSG_MAP = { - { ERROR_PERMISSION_DENIED_ERROR, ERR_MSG_PERMISSION_DENIED_ERROR }, - { ERROR_NOT_SYSTEM_APP, ERR_MSG_NOT_SYSTEM_APP }, - { ERROR_PARAM_CHECK_ERROR, ERR_MSG_PARAM_TYPE_ERROR }, - { ERROR_SYSTEM_ABILITY_NOT_FOUND, ERR_MSG_ABILITY_NOT_SUPPORTED }, - { ERROR_BUNDLE_NOT_EXIST, ERR_MSG_BUNDLE_NOT_EXIST }, - { ERROR_MODULE_NOT_EXIST, ERR_MSG_MODULE_NOT_EXIST }, - { ERROR_ABILITY_NOT_EXIST, ERR_MSG_ABILITY_NOT_EXIST }, - { ERROR_INVALID_USER_ID, ERR_MSG_INVALID_USER_ID }, - { ERROR_INVALID_APPID, ERR_MSG_APPID_NOT_EXIST }, - { ERROR_INVALID_APPINDEX, ERR_MSG_INVALID_APP_INDEX }, - { ERROR_PERMISSION_NOT_EXIST, ERR_MSG_PERMISSION_NOT_EXIST }, - { ERROR_DEVICE_ID_NOT_EXIST, ERR_MSG_DEVICE_ID_NOT_EXIST }, - { ERROR_INSTALL_PARSE_FAILED, ERR_MSG_INSTALL_PARSE_FAILED }, - { ERROR_INSTALL_VERIFY_SIGNATURE_FAILED, ERR_MSG_INSTALL_VERIFY_SIGNATURE_FAILED }, - { ERROR_INSTALL_HAP_FILEPATH_INVALID, ERR_MSG_INSTALL_HAP_FILEPATH_INVALID }, - { ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT, ERR_MSG_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { ERROR_INSTALL_NO_DISK_SPACE_LEFT, ERR_MSG_INSTALL_NO_DISK_SPACE_LEFT }, - { ERROR_INSTALL_VERSION_DOWNGRADE, ERR_MSG_INSTALL_VERSION_DOWNGRADE }, - { ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST, ERR_MSG_INSTALL_DEPENDENT_MODULE_NOT_EXIST }, - { ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED, ERR_MSG_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED }, - { ERROR_UNINSTALL_PREINSTALL_APP_FAILED, ERR_MSG_UNINSTALL_PREINSTALL_APP_FAILED }, - { ERROR_BUNDLE_NOT_PREINSTALLED, ERR_MSG_BUNDLE_NOT_PREINSTALLED }, - { ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION }, - { ERR_ZLIB_SRC_FILE_INVALID, ERR_ZLIB_SRC_FILE_INVALID_MSG }, - { ERR_ZLIB_DEST_FILE_INVALID, ERR_ZLIB_DEST_FILE_INVALID_MSG }, - { ERROR_BUNDLE_IS_DISABLED, ERROR_MSG_BUNDLE_IS_DISABLED }, - { ERROR_ABILITY_IS_DISABLED, ERROR_MSG_ABILITY_IS_DISABLED }, - { ERROR_PROFILE_NOT_EXIST, ERROR_MSG_PROFILE_NOT_EXIST }, - { ERROR_INVALID_UID, ERROR_INVALID_UID_MSG }, - { ERROR_INVALID_HAP_PATH, ERROR_INVALID_HAP_PATH_MSG }, - { ERROR_DEFAULT_APP_NOT_EXIST, ERROR_DEFAULT_APP_NOT_EXIST_MSG }, - { ERROR_INVALID_TYPE, ERROR_INVALID_TYPE_MSG }, - { ERROR_DISTRIBUTED_SERVICE_NOT_RUNNING, ERROR_MSG_DISTRIBUTED_SERVICE_NOT_RUNNING }, - { ERROR_ABILITY_AND_TYPE_MISMATCH, ERROR_ABILITY_AND_TYPE_MISMATCH_MSG }, - { ERROR_CLEAR_CACHE_FILES_UNSUPPORTED, ERROR_MSG_CLEAR_CACHE_FILES_UNSUPPORTED }, - { ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED, ERROR_MSG_INSTALL_HAP_OVERLAY_CHECK_FAILED }, - { ERROR_SPECIFIED_MODULE_NOT_OVERLAY_MODULE, ERROR_MSG_SPECIFIED_MODULE_NOT_OVERLAY_MODULE }, - { ERROR_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE, ERROR_MSG_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE }, - { ERROR_SPECIFIED_MODULE_IS_OVERLAY_MODULE, ERROR_MSG_SPECIFIED_MODULE_IS_OVERLAY_MODULE }, - { ERROR_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE, ERROR_MSG_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE }, - { ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED, ERROR_MSG_SHARE_APP_LIBRARY_IS_RELIED }, - { ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST, ERROR_MSG_SHARE_APP_LIBRARY_IS_NOT_EXIST }, - { ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE, ERR_MSG_UNINSTALL_SHARED_LIBRARY }, - { ERROR_DISALLOW_INSTALL, ERR_MSG_DISALLOW_INSTALL }, - { ERROR_INSTALL_WRONG_DATA_PROXY_URI, ERR_MSG_WRONG_PROXY_DATA_URI }, - { ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION, ERR_MSG_WRONG_PROXY_DATA_PERMISSION }, - { ERROR_INSTALL_WRONG_MODE_ISOLATION, ERR_MSG_WRONG_MODE_ISOLATION }, - { ERROR_DISALLOW_UNINSTALL, ERR_MSG_DISALLOW_UNINSTALL }, - { ERROR_INSTALL_ALREADY_EXIST, ERR_MSG_ALREADY_EXIST }, - { ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED, ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED_MSG }, - { ERROR_INSTALL_CODE_SIGNATURE_FAILED, ERR_MSG_CODE_SIGNATURE_FAILED }, - { ERROR_INSTALL_SELF_UPDATE_NOT_MDM, ERR_MSG_SELF_UPDATE_NOT_MDM}, - { ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME, ERR_MSG_SELF_UPDATE_BUNDLENAME_NOT_SAME}, - { ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED, ERR_MSG_ENTERPRISE_BUNDLE_NOT_ALLOWED }, - { ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR, ERR_MSG_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED }, - { ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED, ERR_MSG_DEBUG_BUNDLE_NOT_ALLOWED}, - { ERROR_VERIFY_ABC, ERR_MSG_ERROR_VERIFY_ABC}, - { ERROR_NOT_APP_GALLERY_CALL, ERROR_MSG_NOT_APP_GALLERY_CALL}, - { ERROR_DELETE_ABC, ERR_MSG_ERROR_DELETE_ABC}, - { ERROR_ADD_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_ADD_ERROR}, - { ERROR_REMOVE_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_REMOVE_ERROR}, - { ERROR_GET_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_GET_ERROR}, - { ERROR_ENABLE_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_ENABLE_ERROR}, - { ERROR_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES, - ERR_MSG_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES}, - { ERROR_DISABLE_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_DISABLE_ERROR}, - { ERROR_GET_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_GET_ERROR}, - { ERROR_INSTALL_PERMISSION_CHECK_ERROR, ERROR_MSG_INSTALL_PERMISSION_CHECK_ERROR}, - { ERROR_INVALID_LINK, ERR_MSG_INVALID_LINK }, - { ERROR_SCHEME_NOT_IN_QUERYSCHEMES, ERR_MSG_SCHEME_NOT_IN_QUERYSCHEMES }, - { ERROR_INVALID_DEVELOPERID, ERR_MSG_INVALID_DEVELOPER_ID }, - { ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED, ERR_MSG_BUNDLE_CAN_NOT_BE_UNINSTALLED }, - { ERROR_START_SHORTCUT_ERROR, ERR_MSG_START_SHORTCUT }, - { ERROR_INSTALL_FAILED_CONTROLLED, ERR_MSG_INSTALL_FAILED_CONTROLLED }, - { ERROR_INSTALL_NATIVE_FAILED, ERR_MSG_NATIVE_INSTALL_FAILED }, - { ERROR_UNINSTALL_NATIVE_FAILED, ERR_MSG_NATIVE_UNINSTALL_FAILED }, - { ERROR_INVALID_APPINDEX, ERR_MSG_INVALID_APPINDEX }, - { ERROR_APP_NOT_SUPPORTED_MULTI_TYPE, ERR_MSG_APP_NOT_SUPPORTED_MULTI_TYPE }, - { ERROR_SHORTCUT_ID_ILLEGAL_ERROR, ERR_MSG_SHORTCUT_ID_ILLEGAL }, - { ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE, ERR_MSG_INSTALL_FAILED_INCONSISTENT_SIGNATURE } -}; - -constexpr const char* BUSINESS_ERROR_CLASS = "L@ohos/base/BusinessError;"; +constexpr const char* BUSINESS_ERROR_CLASS = "@ohos.base.BusinessError"; } // namespace void BusinessErrorAni::ThrowError(ani_env *env, int32_t err, const std::string &msg) @@ -271,12 +58,12 @@ ani_object BusinessErrorAni::WrapError(ani_env *env, const std::string &msg) ani_ref undefRef; env->GetUndefined(&undefRef); - ani_status status = env->FindClass("Lescompat/Error;", &cls); + ani_status status = env->FindClass("escompat.Error", &cls); if (status != ANI_OK) { APP_LOGE("FindClass err : %{public}d", status); return nullptr; } - status = env->Class_FindMethod(cls, "", "Lstd/core/String;Lescompat/ErrorOptions;:V", &method); + status = env->Class_FindMethod(cls, "", "C{std.core.String}C{escompat.ErrorOptions}:", &method); if (status != ANI_OK) { APP_LOGE("Class_FindMethod err : %{public}d", status); return nullptr; @@ -303,7 +90,7 @@ ani_object BusinessErrorAni::CreateError(ani_env *env, int32_t code, const std:: APP_LOGE("FindClass err : %{public}d", status); return nullptr; } - status = env->Class_FindMethod(cls, "", "DLescompat/Error;:V", &method); + status = env->Class_FindMethod(cls, "", "iC{escompat.Error}:", &method); if (status != ANI_OK) { APP_LOGE("Class_FindMethod err : %{public}d", status); return nullptr; @@ -313,7 +100,7 @@ ani_object BusinessErrorAni::CreateError(ani_env *env, int32_t code, const std:: APP_LOGE("WrapError failed"); return nullptr; } - ani_double dCode(code); + ani_int dCode(code); status = env->Object_New(cls, method, &obj, dCode, error); if (status != ANI_OK) { APP_LOGE("Object_New err : %{public}d", status); @@ -339,7 +126,7 @@ void BusinessErrorAni::ThrowTooFewParametersError(ani_env *env, int32_t err) APP_LOGE("err is nullptr"); return; } - ThrowError(env, err, ERR_MSG_PARAM_NUMBER_ERROR); + ThrowError(env, err, BusinessErrorNS::ERR_MSG_PARAM_NUMBER_ERROR); } ani_object BusinessErrorAni::CreateCommonError( @@ -349,13 +136,15 @@ ani_object BusinessErrorAni::CreateCommonError( APP_LOGE("err is nullptr"); return nullptr; } - std::string errMessage = ERR_MSG_BUSINESS_ERROR; + std::string errMessage = BusinessErrorNS::ERR_MSG_BUSINESS_ERROR; auto iter = errMessage.find(ERROR_MESSAGE_PLACEHOLDER); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, std::to_string(err)); } - if (ERR_MSG_MAP.find(err) != ERR_MSG_MAP.end()) { - errMessage += ERR_MSG_MAP[err]; + std::unordered_map errMap; + BusinessErrorMap::GetErrMap(errMap); + if (errMap.find(err) != errMap.end()) { + errMessage += errMap[err]; } iter = errMessage.find(ERROR_MESSAGE_PLACEHOLDER); if (iter != std::string::npos) { @@ -386,12 +175,12 @@ ani_object BusinessErrorAni::CreateEnumError(ani_env *env, APP_LOGE("err is nullptr"); return nullptr; } - std::string errMessage = ERR_MSG_BUSINESS_ERROR; + std::string errMessage = BusinessErrorNS::ERR_MSG_BUSINESS_ERROR; auto iter = errMessage.find(ERROR_MESSAGE_PLACEHOLDER); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, std::to_string(ERROR_PARAM_CHECK_ERROR)); } - errMessage += ERR_MSG_ENUM_EROOR; + errMessage += BusinessErrorNS::ERR_MSG_ENUM_ERROR; iter = errMessage.find(ERROR_MESSAGE_PLACEHOLDER); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, parameter); diff --git a/interfaces/kits/ani/common/business_error_ani.h b/interfaces/kits/ani/common/business_error_ani.h index ce90c25fc46cf2d29d6303113def9243a6da36ed..5699647796c8ae9e23248f3646a56e770e4b5b70 100644 --- a/interfaces/kits/ani/common/business_error_ani.h +++ b/interfaces/kits/ani/common/business_error_ani.h @@ -19,6 +19,7 @@ #include #include "appexecfwk_errors.h" #include "bundle_errors.h" +#include namespace OHOS { namespace AppExecFwk { diff --git a/interfaces/kits/ani/common/common_fun_ani.cpp b/interfaces/kits/ani/common/common_fun_ani.cpp index 6e2a87d9db3515fe00a681ad4262306dd097ae3b..885090a7d3ab9014cb811da5a388bf37acef7c62 100644 --- a/interfaces/kits/ani/common/common_fun_ani.cpp +++ b/interfaces/kits/ani/common/common_fun_ani.cpp @@ -13,167 +13,241 @@ * limitations under the License. */ +#include #include #include +#include "ani_signature_builder.h" #include "app_log_wrapper.h" #include "common_fun_ani.h" namespace OHOS { namespace AppExecFwk { +using namespace arkts::ani_signature; +using Want = OHOS::AAFwk::Want; namespace { -constexpr const char* CLASSNAME_ABILITYINFO = "LbundleManager/AbilityInfoInner/AbilityInfoInner;"; -constexpr const char* CLASSNAME_EXTENSIONABILITYINFO = - "LbundleManager/ExtensionAbilityInfoInner/ExtensionAbilityInfoInner;"; -constexpr const char* CLASSNAME_WINDOWSIZE = "LbundleManager/AbilityInfoInner/WindowSizeInner;"; -constexpr const char* CLASSNAME_APPLICATIONINFO = "LbundleManager/ApplicationInfoInner/ApplicationInfoInner;"; -constexpr const char* CLASSNAME_MODULEMETADATA = "LbundleManager/ApplicationInfoInner/ModuleMetadataInner;"; -constexpr const char* CLASSNAME_MULTIAPPMODE = "LbundleManager/ApplicationInfoInner/MultiAppModeInner;"; -constexpr const char* CLASSNAME_BUNDLEINFO = "LbundleManager/BundleInfoInner/BundleInfoInner;"; -constexpr const char* CLASSNAME_PERMISSION = "LbundleManager/BundleInfoInner/ReqPermissionDetailInner;"; -constexpr const char* CLASSNAME_USEDSCENE = "LbundleManager/BundleInfoInner/UsedSceneInner;"; -constexpr const char* CLASSNAME_SIGNATUREINFO = "LbundleManager/BundleInfoInner/SignatureInfoInner;"; -constexpr const char* CLASSNAME_METADATA = "LbundleManager/MetadataInner/MetadataInner;"; -constexpr const char* CLASSNAME_RESOURCE = "Lglobal/resourceInner/ResourceInner;"; -constexpr const char* CLASSNAME_ROUTERITEM = "LbundleManager/HapModuleInfoInner/RouterItemInner;"; -constexpr const char* CLASSNAME_PRELOADITEM = "LbundleManager/HapModuleInfoInner/PreloadItemInner;"; -constexpr const char* CLASSNAME_DEPENDENCY = "LbundleManager/HapModuleInfoInner/DependencyInner;"; -constexpr const char* CLASSNAME_HAPMODULEINFO = "LbundleManager/HapModuleInfoInner/HapModuleInfoInner;"; -constexpr const char* CLASSNAME_DATAITEM = "LbundleManager/HapModuleInfoInner/DataItemInner;"; -constexpr const char* CLASSNAME_ELEMENTNAME = "LbundleManager/ElementNameInner/ElementNameInner;"; -constexpr const char* CLASSNAME_CUSTOMIZEDATA = "LbundleManager/customizeDataInner/CustomizeDataInner;"; -constexpr const char* CLASSNAME_SKILL = "LbundleManager/SkillInner/SkillInner;"; -constexpr const char* CLASSNAME_SKILLURI = "LbundleManager/SkillInner/SkillUriInner;"; -constexpr const char* CLASSNAME_BUNDLERESINFO = "LbundleManager/BundleResourceInfoInner/BundleResourceInfoInner;"; -constexpr const char* CLASSNAME_SHORTCUTINFO = "LbundleManager/ShortcutInfo/ShortcutInfoInner;"; -constexpr const char* CLASSNAME_SHORTCUTWANT = "LbundleManager/ShortcutInfo/ShortcutWantInner;"; -constexpr const char* CLASSNAME_SHORTCUT_PARAMETERITEM = "LbundleManager/ShortcutInfo/ParameterItemInner;"; +constexpr const char* CLASSNAME_ABILITY_INFO_INNER = "bundleManager.AbilityInfoInner.AbilityInfoInner"; +constexpr const char* CLASSNAME_EXTENSION_ABILITY_INFO_INNER = + "bundleManager.ExtensionAbilityInfoInner.ExtensionAbilityInfoInner"; +constexpr const char* CLASSNAME_WINDOW_SIZE = "bundleManager.AbilityInfo.WindowSize"; +constexpr const char* CLASSNAME_WINDOW_SIZE_INNER = "bundleManager.AbilityInfoInner.WindowSizeInner"; +constexpr const char* CLASSNAME_APPLICATION_INFO = "bundleManager.ApplicationInfo.ApplicationInfo"; +constexpr const char* CLASSNAME_APPLICATION_INFO_INNER = "bundleManager.ApplicationInfoInner.ApplicationInfoInner"; +constexpr const char* CLASSNAME_MODULE_METADATA_INNER = "bundleManager.ApplicationInfoInner.ModuleMetadataInner"; +constexpr const char* CLASSNAME_MULTI_APP_MODE = "bundleManager.ApplicationInfo.MultiAppMode"; +constexpr const char* CLASSNAME_MULTI_APP_MODE_INNER = "bundleManager.ApplicationInfoInner.MultiAppModeInner"; +constexpr const char* CLASSNAME_BUNDLE_INFO_INNER = "bundleManager.BundleInfoInner.BundleInfoInner"; +constexpr const char* CLASSNAME_PERMISSION_INNER = "bundleManager.BundleInfoInner.ReqPermissionDetailInner"; +constexpr const char* CLASSNAME_USED_SCENE = "bundleManager.BundleInfo.UsedScene"; +constexpr const char* CLASSNAME_USED_SCENE_INNER = "bundleManager.BundleInfoInner.UsedSceneInner"; +constexpr const char* CLASSNAME_SIGNATURE_INFO = "bundleManager.BundleInfo.SignatureInfo"; +constexpr const char* CLASSNAME_SIGNATURE_INFO_INNER = "bundleManager.BundleInfoInner.SignatureInfoInner"; +constexpr const char* CLASSNAME_APP_CLONE_IDENTITY_INNER = "bundleManager.BundleInfoInner.AppCloneIdentityInner"; +constexpr const char* CLASSNAME_DYNAMIC_ICON_INFO_INNER = "bundleManager.BundleInfoInner.DynamicIconInfoInner"; +constexpr const char* CLASSNAME_PERMISSION_DEF_INNER = "bundleManager.PermissionDefInner.PermissionDefInner"; +constexpr const char* CLASSNAME_SHARED_BUNDLE_INFO_INNER = "bundleManager.SharedBundleInfoInner.SharedBundleInfoInner"; +constexpr const char* CLASSNAME_SHARED_MODULE_INFO_INNER = "bundleManager.SharedBundleInfoInner.SharedModuleInfoInner"; +constexpr const char* CLASSNAME_APP_PROVISION_INFO_INNER = "bundleManager.AppProvisionInfoInner.AppProvisionInfoInner"; +constexpr const char* CLASSNAME_VALIDITY = "bundleManager.AppProvisionInfo.Validity"; +constexpr const char* CLASSNAME_VALIDITY_INNER = "bundleManager.AppProvisionInfoInner.ValidityInner"; +constexpr const char* CLASSNAME_RECOVERABLE_APPLICATION_INFO_INNER = + "bundleManager.RecoverableApplicationInfoInner.RecoverableApplicationInfoInner"; +constexpr const char* CLASSNAME_PREINSTALLED_APPLICATION_INFO_INNER = + "bundleManager.ApplicationInfoInner.PreinstalledApplicationInfoInner"; +constexpr const char* CLASSNAME_PLUGIN_BUNDLE_INFO_INNER = "bundleManager.PluginBundleInfoInner.PluginBundleInfoInner"; +constexpr const char* CLASSNAME_PLUGIN_MODULE_INFO_INNER = "bundleManager.PluginBundleInfoInner.PluginModuleInfoInner"; +constexpr const char* CLASSNAME_METADATA_INNER = "bundleManager.MetadataInner.MetadataInner"; +constexpr const char* CLASSNAME_RESOURCE = "global.resource.Resource"; +constexpr const char* CLASSNAME_RESOURCE_INNER = "global.resourceInner.ResourceInner"; +constexpr const char* CLASSNAME_ROUTER_ITEM_INNER = "bundleManager.HapModuleInfoInner.RouterItemInner"; +constexpr const char* CLASSNAME_PRELOAD_ITEM_INNER = "bundleManager.HapModuleInfoInner.PreloadItemInner"; +constexpr const char* CLASSNAME_DEPENDENCY_INNER = "bundleManager.HapModuleInfoInner.DependencyInner"; +constexpr const char* CLASSNAME_HAP_MODULE_INFO_INNER = "bundleManager.HapModuleInfoInner.HapModuleInfoInner"; +constexpr const char* CLASSNAME_DATA_ITEM_INNER = "bundleManager.HapModuleInfoInner.DataItemInner"; +constexpr const char* CLASSNAME_ELEMENT_NAME = "bundleManager.ElementName.ElementName"; +constexpr const char* CLASSNAME_ELEMENT_NAME_INNER = "bundleManager.ElementNameInner.ElementNameInner"; +constexpr const char* CLASSNAME_SKILL_INNER = "bundleManager.SkillInner.SkillInner"; +constexpr const char* CLASSNAME_SKILL_URI_INNER = "bundleManager.SkillInner.SkillUriInner"; +constexpr const char* CLASSNAME_SHORTCUT_INFO_INNER = "bundleManager.ShortcutInfo.ShortcutInfoInner"; +constexpr const char* CLASSNAME_SHORTCUT_WANT_INNER = "bundleManager.ShortcutInfo.ShortcutWantInner"; +constexpr const char* CLASSNAME_SHORTCUT_PARAMETER_ITEM_INNER = "bundleManager.ShortcutInfo.ParameterItemInner"; +constexpr const char* CLASSNAME_LAUNCHER_ABILITY_INFO_INNER = + "bundleManager.LauncherAbilityInfoInner.LauncherAbilityInfoInner"; +constexpr const char* CLASSNAME_BUNDLE_CHANGED_INFO_INNER = + "@ohos.bundle.bundleMonitor.bundleMonitor.BundleChangedInfoInner"; +constexpr const char* CLASSNAME_BUNDLE_PACK_INFO_INNER = "bundleManager.BundlePackInfoInner.BundlePackInfoInner"; +constexpr const char* CLASSNAME_PACKAGE_CONFIG_INNER = "bundleManager.BundlePackInfoInner.PackageConfigInner"; +constexpr const char* CLASSNAME_PACKAGE_SUMMARY = "bundleManager.BundlePackInfo.PackageSummary"; +constexpr const char* CLASSNAME_PACKAGE_SUMMARY_INNER = "bundleManager.BundlePackInfoInner.PackageSummaryInner"; +constexpr const char* CLASSNAME_BUNDLE_CONFIG_INFO = "bundleManager.BundlePackInfo.BundleConfigInfo"; +constexpr const char* CLASSNAME_BUNDLE_CONFIG_INFO_INNER = "bundleManager.BundlePackInfoInner.BundleConfigInfoInner"; +constexpr const char* CLASSNAME_EXTENSION_ABILITY_INNER = "bundleManager.BundlePackInfoInner.ExtensionAbilityInner"; +constexpr const char* CLASSNAME_MODULE_CONFIG_INFO_INNER = "bundleManager.BundlePackInfoInner.ModuleConfigInfoInner"; +constexpr const char* CLASSNAME_MODULE_DISTRO_INFO = "bundleManager.BundlePackInfo.ModuleDistroInfo"; +constexpr const char* CLASSNAME_MODULE_DISTRO_INFO_INNER = "bundleManager.BundlePackInfoInner.ModuleDistroInfoInner"; +constexpr const char* CLASSNAME_MODULE_ABILITY_INFO_INNER = + "bundleManager.BundlePackInfoInner.ModuleAbilityInfoInner"; +constexpr const char* CLASSNAME_ABILITY_FORM_INFO_INNER = "bundleManager.BundlePackInfoInner.AbilityFormInfoInner"; +constexpr const char* CLASSNAME_VERSION = "bundleManager.BundlePackInfo.Version"; +constexpr const char* CLASSNAME_VERSION_INNER = "bundleManager.BundlePackInfoInner.VersionInner"; +constexpr const char* CLASSNAME_API_VERSION = "bundleManager.BundlePackInfo.ApiVersion"; +constexpr const char* CLASSNAME_API_VERSION_INNER = "bundleManager.BundlePackInfoInner.ApiVersionInner"; +constexpr const char* CLASSNAME_DISPATCH_INFO_INNER = "bundleManager.DispatchInfoInner.DispatchInfoInner"; +constexpr const char* CLASSNAME_OVERLAY_MODULE_INFO_INNER = + "bundleManager.OverlayModuleInfoInner.OverlayModuleInfoInner"; +constexpr const char* CLASSNAME_WANT = "@ohos.app.ability.Want.Want"; +constexpr const char* CLASSNAME_ZLIB_CHECKSUM_INTERNAL = "@ohos.zlib.zlib.ChecksumInternal"; +constexpr const char* CLASSNAME_ZLIB_GZIP_INTERNAL = "@ohos.zlib.zlib.GZipInternal"; constexpr const char* PROPERTYNAME_NAME = "name"; -constexpr const char* PROPERTYNAME_VENDOR = "vendor"; -constexpr const char* PROPERTYNAME_VERSIONCODE = "versionCode"; -constexpr const char* PROPERTYNAME_VERSIONNAME = "versionName"; -constexpr const char* PROPERTYNAME_MINCOMPATIBLEVERSIONCODE = "minCompatibleVersionCode"; -constexpr const char* PROPERTYNAME_TARGETVERSION = "targetVersion"; -constexpr const char* PROPERTYNAME_APPINFO = "appInfo"; -constexpr const char* PROPERTYNAME_HAPMODULESINFO = "hapModulesInfo"; -constexpr const char* PROPERTYNAME_REQPERMISSIONDETAILS = "reqPermissionDetails"; -constexpr const char* PROPERTYNAME_PERMISSIONGRANTSTATES = "permissionGrantStates"; -constexpr const char* PROPERTYNAME_SIGNATUREINFO = "signatureInfo"; -constexpr const char* PROPERTYNAME_INSTALLTIME = "installTime"; -constexpr const char* PROPERTYNAME_UPDATETIME = "updateTime"; -constexpr const char* PROPERTYNAME_FIRSTINSTALLTIME = "firstInstallTime"; -constexpr const char* PROPERTYNAME_ROUTERMAP = "routerMap"; -constexpr const char* PROPERTYNAME_APPINDEX = "appIndex"; +constexpr const char* PROPERTYNAME_VERSION_CODE = "versionCode"; +constexpr const char* PROPERTYNAME_APP_INDEX = "appIndex"; constexpr const char* PROPERTYNAME_KEY = "key"; constexpr const char* PROPERTYNAME_VALUE = "value"; -constexpr const char* PROPERTYNAME_RESOURCE = "resource"; -constexpr const char* PROPERTYNAME_VALUEID = "valueId"; -constexpr const char* PROPERTYNAME_MAXCOUNT = "maxCount"; -constexpr const char* PROPERTYNAME_MULTIAPPMODETYPE = "multiAppModeType"; -constexpr const char* PROPERTYNAME_MODULENAME = "moduleName"; -constexpr const char* PROPERTYNAME_METADATA = "metadata"; -constexpr const char* PROPERTYNAME_DESCRIPTION = "description"; -constexpr const char* PROPERTYNAME_DESCRIPTIONID = "descriptionId"; -constexpr const char* PROPERTYNAME_ENABLED = "enabled"; +constexpr const char* PROPERTYNAME_MODULE_NAME = "moduleName"; constexpr const char* PROPERTYNAME_LABEL = "label"; -constexpr const char* PROPERTYNAME_LABELID = "labelId"; +constexpr const char* PROPERTYNAME_LABEL_ID = "labelId"; constexpr const char* PROPERTYNAME_ICON = "icon"; -constexpr const char* PROPERTYNAME_ICONID = "iconId"; -constexpr const char* PROPERTYNAME_PROCESS = "process"; -constexpr const char* PROPERTYNAME_PERMISSIONS = "permissions"; -constexpr const char* PROPERTYNAME_CODEPATH = "codePath"; -constexpr const char* PROPERTYNAME_METADATAARRAY = "metadataArray"; -constexpr const char* PROPERTYNAME_REMOVABLE = "removable"; -constexpr const char* PROPERTYNAME_ACCESSTOKENID = "accessTokenId"; -constexpr const char* PROPERTYNAME_UID = "uid"; -constexpr const char* PROPERTYNAME_ICONRESOURCE = "iconResource"; -constexpr const char* PROPERTYNAME_LABELRESOURCE = "labelResource"; -constexpr const char* PROPERTYNAME_DESCRIPTIONRESOURCE = "descriptionResource"; -constexpr const char* PROPERTYNAME_APPDISTRIBUTIONTYPE = "appDistributionType"; -constexpr const char* PROPERTYNAME_APPPROVISIONTYPE = "appProvisionType"; -constexpr const char* PROPERTYNAME_SYSTEMAPP = "systemApp"; -constexpr const char* PROPERTYNAME_BUNDLETYPE = "bundleType"; -constexpr const char* PROPERTYNAME_DEBUG = "debug"; -constexpr const char* PROPERTYNAME_DATAUNCLEARABLE = "dataUnclearable"; -constexpr const char* PROPERTYNAME_NATIVELIBRARYPATH = "nativeLibraryPath"; -constexpr const char* PROPERTYNAME_MULTIAPPMODE = "multiAppMode"; -constexpr const char* PROPERTYNAME_INSTALLSOURCE = "installSource"; -constexpr const char* PROPERTYNAME_RELEASETYPE = "releaseType"; -constexpr const char* PROPERTYNAME_CLOUDFILESYNCENABLED = "cloudFileSyncEnabled"; -constexpr const char* PROPERTYNAME_FLAGS = "flags"; -constexpr const char* PROPERTYNAME_BUNDLENAME = "bundleName"; -constexpr const char* PROPERTYNAME_EXPORTED = "exported"; -constexpr const char* PROPERTYNAME_TYPE = "type"; -constexpr const char* PROPERTYNAME_ORIENTATION = "orientation"; -constexpr const char* PROPERTYNAME_LAUNCHTYPE = "launchType"; -constexpr const char* PROPERTYNAME_READPERMISSION = "readPermission"; -constexpr const char* PROPERTYNAME_WRITEPERMISSION = "writePermission"; -constexpr const char* PROPERTYNAME_URI = "uri"; -constexpr const char* PROPERTYNAME_DEVICETYPES = "deviceTypes"; -constexpr const char* PROPERTYNAME_APPLICATIONINFO = "applicationInfo"; -constexpr const char* PROPERTYNAME_SUPPORTWINDOWMODES = "supportWindowModes"; -constexpr const char* PROPERTYNAME_WINDOWSIZE = "windowSize"; -constexpr const char* PROPERTYNAME_EXCLUDEFROMDOCK = "excludeFromDock"; -constexpr const char* PROPERTYNAME_SKILLS = "skills"; -constexpr const char* PROPERTYNAME_ORIENTATIONID = "orientationId"; -constexpr const char* PROPERTYNAME_MAXWINDOWRATIO = "maxWindowRatio"; -constexpr const char* PROPERTYNAME_MINWINDOWRATIO = "minWindowRatio"; -constexpr const char* PROPERTYNAME_MAXWINDOWWIDTH = "maxWindowWidth"; -constexpr const char* PROPERTYNAME_MINWINDOWWIDTH = "minWindowWidth"; -constexpr const char* PROPERTYNAME_MAXWINDOWHEIGHT = "maxWindowHeight"; -constexpr const char* PROPERTYNAME_MINWINDOWHEIGHT = "minWindowHeight"; -constexpr const char* PROPERTYNAME_EXTENSIONABILITYTYPE = "extensionAbilityType"; -constexpr const char* PROPERTYNAME_EXTENSIONABILITYTYPENAME = "extensionAbilityTypeName"; +constexpr const char* PROPERTYNAME_ICON_ID = "iconId"; +constexpr const char* PROPERTYNAME_BUNDLE_NAME = "bundleName"; constexpr const char* PROPERTYNAME_ID = "id"; -constexpr const char* PROPERTYNAME_APPID = "appId"; -constexpr const char* PROPERTYNAME_FINGERPRINT = "fingerprint"; -constexpr const char* PROPERTYNAME_APPIDENTIFIER = "appIdentifier"; -constexpr const char* PROPERTYNAME_CERTIFICATE = "certificate"; -constexpr const char* PROPERTYNAME_PAGESOURCEFILE = "pageSourceFile"; -constexpr const char* PROPERTYNAME_BUILDFUNCTION = "buildFunction"; -constexpr const char* PROPERTYNAME_CUSTOMDATA = "customData"; -constexpr const char* PROPERTYNAME_DATA = "data"; -constexpr const char* PROPERTYNAME_REASON = "reason"; -constexpr const char* PROPERTYNAME_REASONID = "reasonId"; -constexpr const char* PROPERTYNAME_USEDSCENE = "usedScene"; -constexpr const char* PROPERTYNAME_WHEN = "when"; -constexpr const char* PROPERTYNAME_ABILITIES = "abilities"; -constexpr const char* PROPERTYNAME_MAINELEMENTNAME = "mainElementName"; -constexpr const char* PROPERTYNAME_ABILITIESINFO = "abilitiesInfo"; -constexpr const char* PROPERTYNAME_EXTENSIONABILITIESINFO = "extensionAbilitiesInfo"; -constexpr const char* PROPERTYNAME_INSTALLATIONFREE = "installationFree"; -constexpr const char* PROPERTYNAME_HASHVALUE = "hashValue"; -constexpr const char* PROPERTYNAME_DEPENDENCIES = "dependencies"; -constexpr const char* PROPERTYNAME_PRELOADS = "preloads"; -constexpr const char* PROPERTYNAME_FILECONTEXTMENUCONFIG = "fileContextMenuConfig"; -constexpr const char* PROPERTYNAME_DEVICEID = "deviceId"; -constexpr const char* PROPERTYNAME_ABILITYNAME = "abilityName"; -constexpr const char* PROPERTYNAME_SHORTNAME = "shortName"; -constexpr const char* PROPERTYNAME_EXTRA = "extra"; -constexpr const char* PROPERTYNAME_SCHEME = "scheme"; -constexpr const char* PROPERTYNAME_HOST = "host"; -constexpr const char* PROPERTYNAME_PORT = "port"; -constexpr const char* PROPERTYNAME_PATH = "path"; -constexpr const char* PROPERTYNAME_PATHSTARTWITH = "pathStartWith"; -constexpr const char* PROPERTYNAME_PATHREGEX = "pathRegex"; -constexpr const char* PROPERTYNAME_UTD = "utd"; -constexpr const char* PROPERTYNAME_MAXFILESUPPORTED = "maxFileSupported"; -constexpr const char* PROPERTYNAME_LINKFEATURE = "linkFeature"; -constexpr const char* PROPERTYNAME_ACTIONS = "actions"; +constexpr const char* PROPERTYNAME_HASH_VALUE = "hashValue"; +constexpr const char* PROPERTYNAME_DEVICE_ID = "deviceId"; +constexpr const char* PROPERTYNAME_ABILITY_NAME = "abilityName"; constexpr const char* PROPERTYNAME_ENTITIES = "entities"; -constexpr const char* PROPERTYNAME_URIS = "uris"; -constexpr const char* PROPERTYNAME_DOMAINVERIFY = "domainVerify"; -constexpr const char* PROPERTYNAME_HOSTABILITY = "hostAbility"; +constexpr const char* PROPERTYNAME_HOST_ABILITY = "hostAbility"; constexpr const char* PROPERTYNAME_WANTS = "wants"; -constexpr const char* PROPERTYNAME_SOURCETYPE = "sourceType"; -constexpr const char* PROPERTYNAME_TARGETBUNDLE = "targetBundle"; -constexpr const char* PROPERTYNAME_TARGETMODULE = "targetModule"; -constexpr const char* PROPERTYNAME_TARGETABILITY = "targetAbility"; +constexpr const char* PROPERTYNAME_SOURCE_TYPE = "sourceType"; +constexpr const char* PROPERTYNAME_TARGET_BUNDLE = "targetBundle"; +constexpr const char* PROPERTYNAME_TARGET_MODULE = "targetModule"; +constexpr const char* PROPERTYNAME_TARGET_ABILITY = "targetAbility"; constexpr const char* PROPERTYNAME_PARAMETERS = "parameters"; +constexpr const char* PROPERTYNAME_USER_ID = "userId"; +constexpr const char* PROPERTYNAME_HASH_PARAMS = "hashParams"; +constexpr const char* PROPERTYNAME_PGO_FILE_PATH = "pgoFilePath"; +constexpr const char* PROPERTYNAME_PGO_PARAMS = "pgoParams"; +constexpr const char* PROPERTYNAME_SPECIFIED_DISTRIBUTION_TYPE = "specifiedDistributionType"; +constexpr const char* PROPERTYNAME_IS_KEEP_DATA = "isKeepData"; +constexpr const char* PROPERTYNAME_INSTALL_FLAG = "installFlag"; +constexpr const char* PROPERTYNAME_CROWD_TEST_DEADLINE = "crowdtestDeadline"; +constexpr const char* PROPERTYNAME_SHARED_BUNDLE_DIR_PATHS = "sharedBundleDirPaths"; +constexpr const char* PROPERTYNAME_ADDITIONAL_INFO = "additionalInfo"; +constexpr const char* PROPERTYNAME_VISIBLE = "visible"; +constexpr const char* PROPERTYNAME_ACTION = "action"; constexpr const char* PATH_PREFIX = "/data/app/el1/bundle/public"; constexpr const char* CODE_PATH_PREFIX = "/data/storage/el1/bundle/"; +constexpr const char* CONTEXT_DATA_STORAGE_BUNDLE = "/data/storage/el1/bundle/"; +constexpr int32_t ILLEGAL_APP_INDEX = -1; + +struct ANIClassCacheItem { + ani_ref classRef = nullptr; + std::map classMethodMap; +}; +static std::mutex g_aniClassCacherMutex; +static std::map g_aniClassCache = { + { CommonFunAniNS::CLASSNAME_BOOLEAN, { } }, + { CommonFunAniNS::CLASSNAME_INT, { } }, + { CommonFunAniNS::CLASSNAME_LONG, { } }, + { CommonFunAniNS::CLASSNAME_DOUBLE, { } }, + { CommonFunAniNS::CLASSNAME_ARRAY, { } }, + { CLASSNAME_BUNDLE_INFO_INNER, { } }, + { CLASSNAME_APPLICATION_INFO_INNER, { } }, + { CLASSNAME_MODULE_METADATA_INNER, { } }, + { CLASSNAME_METADATA_INNER, { } }, + { CLASSNAME_RESOURCE_INNER, { } }, + { CLASSNAME_MULTI_APP_MODE_INNER, { } }, + { CLASSNAME_HAP_MODULE_INFO_INNER, { } }, + { CLASSNAME_ABILITY_INFO_INNER, { } }, + { CLASSNAME_SKILL_INNER, { } }, + { CLASSNAME_WINDOW_SIZE_INNER, { } }, + { CLASSNAME_EXTENSION_ABILITY_INFO_INNER, { } }, + { CLASSNAME_DEPENDENCY_INNER, { } }, + { CLASSNAME_PRELOAD_ITEM_INNER, { } }, + { CLASSNAME_ROUTER_ITEM_INNER, { } }, + { CLASSNAME_DATA_ITEM_INNER, { } }, + { CLASSNAME_APP_PROVISION_INFO_INNER, { } }, + { CLASSNAME_ZLIB_CHECKSUM_INTERNAL, { } }, + { CLASSNAME_ZLIB_GZIP_INTERNAL, { } }, +}; + +static ani_class GetCacheClass(ani_env* env, const std::string& className) +{ + RETURN_NULL_IF_NULL(env); + + std::lock_guard lock(g_aniClassCacherMutex); + auto iter = g_aniClassCache.find(className); + if (iter == g_aniClassCache.end()) { + return nullptr; + } + if (iter->second.classRef != nullptr) { + return reinterpret_cast(iter->second.classRef); + } + + ani_class cls = nullptr; + ani_status status = env->FindClass(className.c_str(), &cls); + if (status != ANI_OK) { + APP_LOGE("FindClass %{public}s failed %{public}d", className.c_str(), status); + return nullptr; + } + ani_ref ref = nullptr; + status = env->GlobalReference_Create(cls, &ref); + if (status == ANI_OK) { + iter->second.classRef = ref; + } + + return cls; +} + +static ani_method GetCacheCtorMethod(ani_env* env, const std::string& className, ani_class cls, + const std::string& ctorSig = Builder::BuildSignatureDescriptor({})) +{ + RETURN_NULL_IF_NULL(env); + RETURN_NULL_IF_NULL(cls); + + std::lock_guard lock(g_aniClassCacherMutex); + auto iter = g_aniClassCache.find(className); + if (iter == g_aniClassCache.end()) { + return nullptr; + } + + auto iterMethod = iter->second.classMethodMap.find(ctorSig); + if (iterMethod != iter->second.classMethodMap.end() && iterMethod->second != nullptr) { + return iterMethod->second; + } + + ani_method method = nullptr; + ani_status status = + env->Class_FindMethod(cls, Builder::BuildConstructorName().c_str(), ctorSig.c_str(), &method); + if (status != ANI_OK) { + APP_LOGE("Class_FindMethod ctorSig %{public}s failed %{public}d", ctorSig.c_str(), status); + return nullptr; + } + iter->second.classMethodMap[ctorSig] = method; + + return method; +} + +static ani_method GetCtorMethod(ani_env* env, const std::string& className, ani_class cls, + const std::string& ctorSig = Builder::BuildSignatureDescriptor({})) +{ + RETURN_NULL_IF_NULL(env); + RETURN_NULL_IF_NULL(cls); + + ani_method method = GetCacheCtorMethod(env, className, cls, ctorSig); + if (method != nullptr) { + return method; + } + + ani_status status = + env->Class_FindMethod(cls, Builder::BuildConstructorName().c_str(), ctorSig.c_str(), &method); + if (status != ANI_OK) { + APP_LOGE("Class_FindMethod ctorSig %{public}s failed %{public}d", ctorSig.c_str(), status); + return nullptr; + } + + return method; +} } // namespace std::string CommonFunAni::AniStrToString(ani_env* env, ani_string aniStr) @@ -194,7 +268,7 @@ std::string CommonFunAni::AniStrToString(ani_env* env, ani_string aniStr) buffer.resize(strSize + 1); ani_size retSize = 0; status = env->String_GetUTF8(aniStr, buffer.data(), buffer.size(), &retSize); - if (status != ANI_OK || retSize == 0) { + if (status != ANI_OK) { APP_LOGE("String_GetUTF8SubString failed %{public}d", status); return ""; } @@ -231,28 +305,28 @@ ani_class CommonFunAni::CreateClassByName(ani_env* env, const std::string& class { RETURN_NULL_IF_NULL(env); - ani_class cls = nullptr; - ani_status status = env->FindClass(className.c_str(), &cls); - if (status != ANI_OK) { - APP_LOGE("FindClass failed %{public}d", status); - return nullptr; + ani_class cls = GetCacheClass(env, className); + if (cls == nullptr) { + ani_status status = env->FindClass(className.c_str(), &cls); + if (status != ANI_OK) { + APP_LOGE("FindClass %{public}s failed %{public}d", className.c_str(), status); + return nullptr; + } } + return cls; } -ani_object CommonFunAni::CreateNewObjectByClass(ani_env* env, ani_class cls) +ani_object CommonFunAni::CreateNewObjectByClass(ani_env* env, const std::string& className, ani_class cls) { RETURN_NULL_IF_NULL(env); + RETURN_NULL_IF_NULL(cls); - ani_method method = nullptr; - ani_status status = env->Class_FindMethod(cls, "", ":V", &method); - if (status != ANI_OK) { - APP_LOGE("Class_FindMethod failed %{public}d", status); - return nullptr; - } + ani_method method = GetCtorMethod(env, className, cls); + RETURN_NULL_IF_NULL(method); ani_object object = nullptr; - status = env->Object_New(cls, method, &object); + ani_status status = env->Object_New(cls, method, &object); if (status != ANI_OK) { APP_LOGE("Object_New failed %{public}d", status); return nullptr; @@ -260,147 +334,315 @@ ani_object CommonFunAni::CreateNewObjectByClass(ani_env* env, ani_class cls) return object; } -ani_object CommonFunAni::ConvertBundleInfo(ani_env* env, const BundleInfo& bundleInfo, int32_t flags) +ani_object CommonFunAni::CreateNewObjectByClassV2( + ani_env* env, const std::string& className, const std::string& ctorSig, const ani_value* args) { RETURN_NULL_IF_NULL(env); + RETURN_NULL_IF_NULL(args); - ani_class cls = CreateClassByName(env, CLASSNAME_BUNDLEINFO); + ani_class cls = CreateClassByName(env, className); RETURN_NULL_IF_NULL(cls); - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); + ani_method method = GetCtorMethod(env, className, cls, ctorSig); + RETURN_NULL_IF_NULL(method); + ani_object object = nullptr; + ani_status status = env->Object_New_A(cls, method, &object, args); + if (status != ANI_OK) { + APP_LOGE("Object_New_A failed %{public}d", status); + return nullptr; + } + return object; +} - ani_string string = nullptr; +ani_object CommonFunAni::ConvertBundleInfo(ani_env* env, const BundleInfo& bundleInfo, int32_t flags) +{ + RETURN_NULL_IF_NULL(env); // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.name, name)); // vendor: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.vendor, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VENDOR, string)); - - // versionCode: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VERSIONCODE, bundleInfo.versionCode)); + ani_string vendor = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.vendor, vendor)); // versionName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.versionName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VERSIONNAME, string)); - - // minCompatibleVersionCode: number - RETURN_NULL_IF_FALSE( - CallSetter(env, cls, object, PROPERTYNAME_MINCOMPATIBLEVERSIONCODE, bundleInfo.minCompatibleVersionCode)); - - // targetVersion: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_TARGETVERSION, bundleInfo.targetVersion)); + ani_string versionName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.versionName, versionName)); // appInfo: ApplicationInfo + ani_ref appInfo = nullptr; if ((static_cast(flags) & static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_APPLICATION)) == static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_APPLICATION)) { - ani_object aObject = ConvertApplicationInfo(env, bundleInfo.applicationInfo); - RETURN_NULL_IF_NULL(aObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINFO, aObject)); + appInfo = ConvertApplicationInfo(env, bundleInfo.applicationInfo); } else { - RETURN_NULL_IF_FALSE(CallSetterNull(env, cls, object, PROPERTYNAME_APPINFO)); + ani_status status = env->GetNull(&appInfo); + if (status != ANI_OK) { + APP_LOGE("GetNull appInfo failed %{public}d", status); + return nullptr; + } } + RETURN_NULL_IF_NULL(appInfo); // hapModulesInfo: Array - ani_object aHapModuleInfosObject = ConvertAniArray(env, bundleInfo.hapModuleInfos, ConvertHapModuleInfo); - RETURN_NULL_IF_NULL(aHapModuleInfosObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_HAPMODULESINFO, aHapModuleInfosObject)); + ani_object hapModulesInfo = ConvertAniArray(env, bundleInfo.hapModuleInfos, ConvertHapModuleInfo); + RETURN_NULL_IF_NULL(hapModulesInfo); // reqPermissionDetails: Array - ani_object aPermissionArrayObject = ConvertAniArray(env, bundleInfo.reqPermissionDetails, ConvertRequestPermission); - RETURN_NULL_IF_NULL(aPermissionArrayObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_REQPERMISSIONDETAILS, aPermissionArrayObject)); + ani_object reqPermissionDetails = ConvertAniArray(env, bundleInfo.reqPermissionDetails, ConvertRequestPermission); + RETURN_NULL_IF_NULL(reqPermissionDetails); // permissionGrantStates: Array - ani_object aPermissionGrantStates = ConvertAniArrayEnum( + ani_object permissionGrantStates = ConvertAniArrayEnum( env, bundleInfo.reqPermissionStates, EnumUtils::EnumNativeToETS_BundleManager_PermissionGrantState); - RETURN_NULL_IF_NULL(aPermissionGrantStates); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PERMISSIONGRANTSTATES, aPermissionGrantStates)); + RETURN_NULL_IF_NULL(permissionGrantStates); // signatureInfo: SignatureInfo + ani_ref signatureInfo = nullptr; if ((static_cast(flags) & static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_SIGNATURE_INFO)) == static_cast(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_SIGNATURE_INFO)) { - ani_object aniSignatureInfoObj = ConvertSignatureInfo(env, bundleInfo.signatureInfo); - RETURN_NULL_IF_NULL(aniSignatureInfoObj); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SIGNATUREINFO, aniSignatureInfoObj)); + signatureInfo = ConvertSignatureInfo(env, bundleInfo.signatureInfo); } else { - RETURN_NULL_IF_FALSE(CallSetterNull(env, cls, object, PROPERTYNAME_SIGNATUREINFO)); + ani_status status = env->GetNull(&signatureInfo); + if (status != ANI_OK) { + APP_LOGE("GetNull signatureInfo failed %{public}d", status); + return nullptr; + } } + RETURN_NULL_IF_NULL(signatureInfo); + + // routerMap: Array + ani_object routerMap = ConvertAniArray(env, bundleInfo.routerArray, ConvertRouterItem); + RETURN_NULL_IF_NULL(routerMap); + + // firstInstallTime?: long + ani_object firstInstallTime = BoxValue(env, bundleInfo.firstInstallTime); + RETURN_NULL_IF_FALSE(firstInstallTime); + + ani_value args[] = { + { .r = name }, + { .r = vendor }, + { .l = static_cast(bundleInfo.versionCode) }, + { .r = versionName }, + { .i = static_cast(bundleInfo.minCompatibleVersionCode) }, + { .i = static_cast(bundleInfo.targetVersion) }, + { .r = appInfo }, + { .r = hapModulesInfo }, + { .r = reqPermissionDetails }, + { .r = permissionGrantStates }, + { .r = signatureInfo }, + { .l = bundleInfo.installTime }, + { .l = bundleInfo.updateTime }, + { .r = routerMap }, + { .i = bundleInfo.appIndex }, + { .r = firstInstallTime }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // vendor: string + .AddLong() // versionCode: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // versionName: string + .AddInt() // minCompatibleVersionCode: int + .AddInt() // targetVersion: int + .AddClass(CLASSNAME_APPLICATION_INFO) // appInfo: ApplicationInfo + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // hapModulesInfo: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // reqPermissionDetails: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // permissionGrantStates: Array + .AddClass(CLASSNAME_SIGNATURE_INFO) // signatureInfo: SignatureInfo + .AddLong() // installTime: long + .AddLong() // updateTime: long + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // routerMap: Array + .AddInt() // appIndex: int + .AddClass(CommonFunAniNS::CLASSNAME_LONG) // firstInstallTime?: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertDefaultAppAbilityInfo(ani_env* env, const AbilityInfo& abilityInfo) +{ + RETURN_NULL_IF_NULL(env); - // installTime: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_INSTALLTIME, bundleInfo.installTime)); + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.bundleName, bundleName)); - // updateTime: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_UPDATETIME, bundleInfo.updateTime)); + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.moduleName, moduleName)); - // routerMap: Array - ani_object aRouterMapObject = ConvertAniArray(env, bundleInfo.routerArray, ConvertRouterItem); - RETURN_NULL_IF_NULL(aRouterMapObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ROUTERMAP, aRouterMapObject)); + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.name, name)); - // appIndex: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINDEX, bundleInfo.appIndex)); + // label: string + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.label, label)); - // firstInstallTime?: number - RETURN_NULL_IF_FALSE( - CallSetterOptional(env, cls, object, PROPERTYNAME_FIRSTINSTALLTIME, bundleInfo.firstInstallTime)); + // description: string + ani_string description = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.description, description)); - return object; + // icon: string + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.iconPath, icon)); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .r = name }, + { .r = label }, + { .l = static_cast(abilityInfo.labelId) }, + { .r = description }, + { .l = static_cast(abilityInfo.descriptionId) }, + { .r = icon }, + { .l = static_cast(abilityInfo.iconId) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddLong() // labelId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // description: string + .AddLong() // descriptionId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddLong() // iconId: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_ABILITY_INFO_INNER, ctorSig, args); } -ani_object CommonFunAni::ConvertMetadata(ani_env* env, const Metadata& metadata) +ani_object CommonFunAni::ConvertDefaultAppExtensionInfo(ani_env* env, const ExtensionAbilityInfo& extensionInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_METADATA); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.bundleName, bundleName)); - ani_string string = nullptr; + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.moduleName, moduleName)); // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, metadata.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.name, name)); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .r = name }, + { .l = static_cast(extensionInfo.labelId) }, + { .l = static_cast(extensionInfo.descriptionId) }, + { .l = static_cast(extensionInfo.iconId) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddLong() // labelId: long + .AddLong() // descriptionId: long + .AddLong() // iconId: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_EXTENSION_ABILITY_INFO_INNER, ctorSig, args); +} - // value: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, metadata.value, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VALUE, string)); +ani_object CommonFunAni::ConvertDefaultAppHapModuleInfo(ani_env* env, const BundleInfo& bundleInfo) +{ + RETURN_NULL_IF_NULL(env); - // resource: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, metadata.resource, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_RESOURCE, string)); + // abilitiesInfo: Array + ani_object abilitiesInfo = ConvertAniArray(env, bundleInfo.abilityInfos, ConvertDefaultAppAbilityInfo); + RETURN_NULL_IF_NULL(abilitiesInfo); + + // extensionAbilitiesInfo: Array + ani_object extensionAbilitiesInfo = ConvertAniArray(env, bundleInfo.extensionInfos, ConvertDefaultAppExtensionInfo); + RETURN_NULL_IF_NULL(extensionAbilitiesInfo); + + ani_value args[] = { + { .r = abilitiesInfo }, + { .r = extensionAbilitiesInfo }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // abilitiesInfo: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // extensionAbilitiesInfo: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_HAP_MODULE_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertDefaultAppBundleInfo(ani_env* env, const BundleInfo& bundleInfo) +{ + RETURN_NULL_IF_NULL(env); - // valueId?: number - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_VALUEID, metadata.valueId)); + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleInfo.name, name)); - return object; + // hapModulesInfo: Array + std::vector bundleInfos = { bundleInfo }; + ani_object hapModulesInfo = ConvertAniArray(env, bundleInfos, ConvertDefaultAppHapModuleInfo); + RETURN_NULL_IF_NULL(hapModulesInfo); + + ani_value args[] = { + { .r = name }, + { .r = hapModulesInfo }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // hapModulesInfo: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_INFO_INNER, ctorSig, args); } -ani_object CommonFunAni::ConvertMultiAppMode(ani_env* env, const MultiAppModeData& multiAppMode) +ani_object CommonFunAni::ConvertMetadata(ani_env* env, const Metadata& metadata) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_MULTIAPPMODE); - RETURN_NULL_IF_NULL(cls); + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, metadata.name, name)); - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); + // value: string + ani_string value = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, metadata.value, value)); - // maxCount: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MAXCOUNT, multiAppMode.maxCount)); + // resource: string + ani_string resource = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, metadata.resource, resource)); + + // valueId?: long + ani_object valueId = BoxValue(env, static_cast(metadata.valueId)); + RETURN_NULL_IF_NULL(valueId); + + ani_value args[] = { + { .r = name }, + { .r = value }, + { .r = resource }, + { .r = valueId }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // value: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // resource: string + .AddClass(CommonFunAniNS::CLASSNAME_LONG) // valueId?: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_METADATA_INNER, ctorSig, args); +} - // multiAppModeType: bundleManager.MultiAppModeType - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MULTIAPPMODETYPE, - EnumUtils::EnumNativeToETS_BundleManager_MultiAppModeType( - env, static_cast(multiAppMode.multiAppModeType)))); +ani_object CommonFunAni::ConvertMultiAppMode(ani_env* env, const MultiAppModeData& multiAppMode) +{ + RETURN_NULL_IF_NULL(env); - return object; + ani_value args[] = { + { .r = EnumUtils::EnumNativeToETS_BundleManager_MultiAppModeType( + env, static_cast(multiAppMode.multiAppModeType)) }, + { .i = multiAppMode.maxCount }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_MULTI_APP_MODE_TYPE) // multiAppModeType + .AddInt() // maxCount: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_MULTI_APP_MODE_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertModuleMetaInfosItem( @@ -408,406 +650,440 @@ ani_object CommonFunAni::ConvertModuleMetaInfosItem( { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_MODULEMETADATA); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // moduleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, item.first, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, item.first, moduleName)); // metadata: Array - ani_object aMetadataObject = ConvertAniArray(env, item.second, ConvertMetadata); - RETURN_NULL_IF_NULL(aMetadataObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_METADATA, aMetadataObject)); - - return object; + ani_object metadata = ConvertAniArray(env, item.second, ConvertMetadata); + RETURN_NULL_IF_NULL(metadata); + + ani_value args[] = { + { .r = moduleName }, + { .r = metadata }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // metadata: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_MODULE_METADATA_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertApplicationInfo(ani_env* env, const ApplicationInfo& appInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_APPLICATIONINFO); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.name, name)); // description: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.description, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTION, string)); - - // descriptionId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTIONID, appInfo.descriptionId)); - - // enabled: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ENABLED, BoolToAniBoolean(appInfo.enabled))); + ani_string description = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.description, description)); // label: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.label, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABEL, string)); - - // labelId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABELID, appInfo.labelId)); + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.label, label)); // icon: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.iconPath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICON, string)); - - // iconId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICONID, appInfo.iconId)); + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.iconPath, icon)); // process: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.process, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PROCESS, string)); + ani_string process = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.process, process)); // permissions: Array - ani_ref aPermissions = ConvertAniArrayString(env, appInfo.permissions); - RETURN_NULL_IF_NULL(aPermissions); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PERMISSIONS, aPermissions)); + ani_ref permissions = ConvertAniArrayString(env, appInfo.permissions); + RETURN_NULL_IF_NULL(permissions); // codePath: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.codePath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_CODEPATH, string)); + ani_string codePath = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.codePath, codePath)); // metadataArray: Array - ani_object aMetadataArrayObject = ConvertAniArray(env, appInfo.metadata, ConvertModuleMetaInfosItem); - RETURN_NULL_IF_NULL(aMetadataArrayObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_METADATAARRAY, aMetadataArrayObject)); - - // removable: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_REMOVABLE, BoolToAniBoolean(appInfo.removable))); - - // accessTokenId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ACCESSTOKENID, appInfo.accessTokenId)); - - // uid: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_UID, appInfo.uid)); + ani_object metadataArray = ConvertAniArray(env, appInfo.metadata, ConvertModuleMetaInfosItem); + RETURN_NULL_IF_NULL(metadataArray); // iconResource: Resource - ani_object aIconResource = ConvertResource(env, appInfo.iconResource); - RETURN_NULL_IF_NULL(aIconResource); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICONRESOURCE, aIconResource)); + ani_object iconResource = ConvertResource(env, appInfo.iconResource); + RETURN_NULL_IF_NULL(iconResource); // labelResource: Resource - ani_object aLabelResource = ConvertResource(env, appInfo.labelResource); - RETURN_NULL_IF_NULL(aLabelResource); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABELRESOURCE, aLabelResource)); + ani_object labelResource = ConvertResource(env, appInfo.labelResource); + RETURN_NULL_IF_NULL(labelResource); // descriptionResource: Resource - ani_object aDescriptionResource = ConvertResource(env, appInfo.descriptionResource); - RETURN_NULL_IF_NULL(aDescriptionResource); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTIONRESOURCE, aDescriptionResource)); + ani_object descriptionResource = ConvertResource(env, appInfo.descriptionResource); + RETURN_NULL_IF_NULL(descriptionResource); // appDistributionType: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.appDistributionType, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPDISTRIBUTIONTYPE, string)); + ani_string appDistributionType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.appDistributionType, appDistributionType)); // appProvisionType: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.appProvisionType, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPPROVISIONTYPE, string)); - - // systemApp: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SYSTEMAPP, BoolToAniBoolean(appInfo.isSystemApp))); - - // bundleType: bundleManager.BundleType - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLETYPE, - EnumUtils::EnumNativeToETS_BundleManager_BundleType(env, static_cast(appInfo.bundleType)))); - - // debug: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DEBUG, BoolToAniBoolean(appInfo.debug))); - - // dataUnclearable: boolean - RETURN_NULL_IF_FALSE( - CallSetter(env, cls, object, PROPERTYNAME_DATAUNCLEARABLE, BoolToAniBoolean(!appInfo.userDataClearable))); + ani_string appProvisionType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.appProvisionType, appProvisionType)); // nativeLibraryPath: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.nativeLibraryPath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NATIVELIBRARYPATH, string)); + ani_string nativeLibraryPath = nullptr; + std::string externalNativeLibraryPath = ""; + if (!appInfo.nativeLibraryPath.empty()) { + externalNativeLibraryPath = CONTEXT_DATA_STORAGE_BUNDLE + appInfo.nativeLibraryPath; + } + RETURN_NULL_IF_FALSE(StringToAniStr(env, externalNativeLibraryPath, nativeLibraryPath)); // multiAppMode: MultiAppMode - ani_object aniMultiAppModeObj = ConvertMultiAppMode(env, appInfo.multiAppMode); - RETURN_NULL_IF_NULL(aniMultiAppModeObj); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MULTIAPPMODE, aniMultiAppModeObj)); - - // appIndex: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINDEX, appInfo.appIndex)); + ani_object multiAppMode = ConvertMultiAppMode(env, appInfo.multiAppMode); + RETURN_NULL_IF_NULL(multiAppMode); // installSource: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.installSource, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_INSTALLSOURCE, string)); + ani_string installSource = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.installSource, installSource)); // releaseType: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.apiReleaseType, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_RELEASETYPE, string)); - - // cloudFileSyncEnabled: boolean - RETURN_NULL_IF_FALSE(CallSetter( - env, cls, object, PROPERTYNAME_CLOUDFILESYNCENABLED, BoolToAniBoolean(appInfo.cloudFileSyncEnabled))); - - // flags?: number - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_FLAGS, appInfo.flags)); - - return object; + ani_string releaseType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appInfo.apiReleaseType, releaseType)); + + // flags?: int + ani_object flags = BoxValue(env, appInfo.applicationFlags); + RETURN_NULL_IF_NULL(flags); + + ani_value args[] = { + { .r = name }, + { .r = description }, + { .l = static_cast(appInfo.descriptionId) }, + { .z = BoolToAniBoolean(appInfo.enabled) }, + { .r = label }, + { .l = static_cast(appInfo.labelId) }, + { .r = icon }, + { .l = static_cast(appInfo.iconId) }, + { .r = process }, + { .r = permissions }, + { .r = codePath }, + { .r = metadataArray }, + { .z = BoolToAniBoolean(appInfo.removable) }, + { .l = static_cast(appInfo.accessTokenId) }, + { .i = appInfo.uid }, + { .r = iconResource }, + { .r = labelResource }, + { .r = descriptionResource }, + { .r = appDistributionType }, + { .r = appProvisionType }, + { .z = BoolToAniBoolean(appInfo.isSystemApp) }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_BundleType(env, static_cast(appInfo.bundleType)) }, + { .z = BoolToAniBoolean(appInfo.debug) }, + { .z = BoolToAniBoolean(!appInfo.userDataClearable) }, + { .r = nativeLibraryPath }, + { .r = multiAppMode }, + { .i = appInfo.appIndex }, + { .r = installSource }, + { .r = releaseType }, + { .z = BoolToAniBoolean(appInfo.cloudFileSyncEnabled) }, + { .r = flags }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // description: string + .AddLong() // descriptionId: long + .AddBoolean() // enabled: boolean + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddLong() // labelId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddLong() // iconId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // process: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // permissions: Array + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // codePath: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // metadataArray: Array + .AddBoolean() // removable: boolean + .AddLong() // accessTokenId: long + .AddInt() // uid: int + .AddClass(CLASSNAME_RESOURCE) // iconResource: Resource + .AddClass(CLASSNAME_RESOURCE) // labelResource: Resource + .AddClass(CLASSNAME_RESOURCE) // descriptionResource: Resource + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // appDistributionType: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // appProvisionType: string + .AddBoolean() // systemApp: boolean + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_BUNDLE_TYPE) // bundleType: bundleManager.BundleType + .AddBoolean() // debug: boolean + .AddBoolean() // dataUnclearable: boolean + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // nativeLibraryPath: string + .AddClass(CLASSNAME_MULTI_APP_MODE) // multiAppMode: MultiAppMode + .AddInt() // appIndex: int + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // installSource: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // releaseType: string + .AddBoolean() // cloudFileSyncEnabled: boolean + .AddClass(CommonFunAniNS::CLASSNAME_INT) // flags?: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_APPLICATION_INFO_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertAbilityInfo(ani_env* env, const AbilityInfo& abilityInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_ABILITYINFO); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // bundleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.bundleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.bundleName, bundleName)); // moduleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.moduleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.moduleName, moduleName)); // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.name, name)); // label: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.label, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABEL, string)); - - // labelId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABELID, abilityInfo.labelId)); + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.label, label)); // description: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.description, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTION, string)); - - // descriptionId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTIONID, abilityInfo.descriptionId)); + ani_string description = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.description, description)); // icon: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.iconPath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICON, string)); - - // iconId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICONID, abilityInfo.iconId)); + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.iconPath, icon)); // process: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.process, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PROCESS, string)); - - // exported: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_EXPORTED, BoolToAniBoolean(abilityInfo.visible))); - - // orientation: bundleManager.DisplayOrientation - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ORIENTATION, - EnumUtils::EnumNativeToETS_BundleManager_DisplayOrientation( - env, static_cast(abilityInfo.orientation)))); - - // launchType: bundleManager.LaunchType - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LAUNCHTYPE, - EnumUtils::EnumNativeToETS_BundleManager_LaunchType(env, static_cast(abilityInfo.launchMode)))); + ani_string process = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityInfo.process, process)); // permissions: Array - ani_ref aPermissions = ConvertAniArrayString(env, abilityInfo.permissions); - RETURN_NULL_IF_NULL(aPermissions); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PERMISSIONS, aPermissions)); + ani_ref permissions = ConvertAniArrayString(env, abilityInfo.permissions); + RETURN_NULL_IF_NULL(permissions); // deviceTypes: Array - ani_ref aDeviceTypes = ConvertAniArrayString(env, abilityInfo.deviceTypes); - RETURN_NULL_IF_NULL(aDeviceTypes); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DEVICETYPES, aDeviceTypes)); + ani_ref deviceTypes = ConvertAniArrayString(env, abilityInfo.deviceTypes); + RETURN_NULL_IF_NULL(deviceTypes); // applicationInfo: ApplicationInfo - ani_object aObject = ConvertApplicationInfo(env, abilityInfo.applicationInfo); - RETURN_NULL_IF_NULL(aObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPLICATIONINFO, aObject)); + ani_ref applicationInfo = nullptr; + if (!abilityInfo.applicationInfo.name.empty()) { + applicationInfo = ConvertApplicationInfo(env, abilityInfo.applicationInfo); + } else { + ani_status status = env->GetNull(&applicationInfo); + if (status != ANI_OK) { + APP_LOGE("GetNull applicationInfo failed %{public}d", status); + return nullptr; + } + } + RETURN_NULL_IF_NULL(applicationInfo); // metadata: Array - ani_object aMetadataObject = ConvertAniArray(env, abilityInfo.metadata, ConvertMetadata); - RETURN_NULL_IF_NULL(aMetadataObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_METADATA, aMetadataObject)); - - // enabled: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ENABLED, BoolToAniBoolean(abilityInfo.enabled))); + ani_object metadata = ConvertAniArray(env, abilityInfo.metadata, ConvertMetadata); + RETURN_NULL_IF_NULL(metadata); // supportWindowModes: Array - ani_object aSupportWindowModes = + ani_object supportWindowModes = ConvertAniArrayEnum(env, abilityInfo.windowModes, EnumUtils::EnumNativeToETS_BundleManager_SupportWindowMode); - RETURN_NULL_IF_NULL(aSupportWindowModes); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SUPPORTWINDOWMODES, aSupportWindowModes)); + RETURN_NULL_IF_NULL(supportWindowModes); // windowSize: WindowSize - ani_object aniWindowSizeObj = ConvertWindowSize(env, abilityInfo); - RETURN_NULL_IF_NULL(aniWindowSizeObj); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_WINDOWSIZE, aniWindowSizeObj)); - - // excludeFromDock: boolean - RETURN_NULL_IF_FALSE( - CallSetter(env, cls, object, PROPERTYNAME_EXCLUDEFROMDOCK, BoolToAniBoolean(abilityInfo.excludeFromDock))); + ani_object windowSize = ConvertWindowSize(env, abilityInfo); + RETURN_NULL_IF_NULL(windowSize); // skills: Array - ani_object aSkillsObject = ConvertAniArray(env, abilityInfo.skills, ConvertAbilitySkill); - RETURN_NULL_IF_NULL(aSkillsObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SKILLS, aSkillsObject)); - - // appIndex: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINDEX, abilityInfo.appIndex)); - - // orientationId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ORIENTATIONID, abilityInfo.orientationId)); - - return object; + ani_object skills = ConvertAniArray(env, abilityInfo.skills, ConvertAbilitySkill); + RETURN_NULL_IF_NULL(skills); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .r = name }, + { .r = label }, + { .l = static_cast(abilityInfo.labelId) }, + { .r = description }, + { .l = static_cast(abilityInfo.descriptionId) }, + { .r = icon }, + { .l = static_cast(abilityInfo.iconId) }, + { .r = process }, + { .z = BoolToAniBoolean(abilityInfo.visible) }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_DisplayOrientation( + env, static_cast(abilityInfo.orientation)) }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_LaunchType( + env, static_cast(abilityInfo.launchMode)) }, + { .r = permissions }, + { .r = deviceTypes }, + { .r = applicationInfo }, + { .r = metadata }, + { .z = BoolToAniBoolean(abilityInfo.enabled) }, + { .r = supportWindowModes }, + { .r = windowSize }, + { .z = BoolToAniBoolean(abilityInfo.excludeFromDock) }, + { .r = skills }, + { .i = abilityInfo.appIndex }, + { .l = static_cast(abilityInfo.orientationId) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddLong() // labelId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // description: string + .AddLong() // descriptionId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddLong() // iconId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // process: string + .AddBoolean() // exported: boolean + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_DISPLAY_ORIENTATION) // orientation + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_LAUNCH_TYPE) // launchType: bundleManager.LaunchType + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // permissions: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // deviceTypes: Array + .AddClass(CLASSNAME_APPLICATION_INFO) // applicationInfo: ApplicationInfo + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // metadata: Array + .AddBoolean() // enabled: boolean + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // supportWindowModes: Array + .AddClass(CLASSNAME_WINDOW_SIZE) // windowSize: WindowSize + .AddBoolean() // excludeFromDock: boolean + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // skills: Array + .AddInt() // appIndex: int + .AddLong() // orientationId: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_ABILITY_INFO_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertWindowSize(ani_env* env, const AbilityInfo& abilityInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_WINDOWSIZE); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - // maxWindowRatio: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MAXWINDOWRATIO, abilityInfo.maxWindowRatio)); - - // minWindowRatio: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MINWINDOWRATIO, abilityInfo.minWindowRatio)); - - // maxWindowWidth: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MAXWINDOWWIDTH, abilityInfo.maxWindowWidth)); - - // minWindowWidth: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MINWINDOWWIDTH, abilityInfo.minWindowWidth)); - - // maxWindowHeight: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MAXWINDOWHEIGHT, abilityInfo.maxWindowHeight)); - - // minWindowHeight: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MINWINDOWHEIGHT, abilityInfo.minWindowHeight)); - - return object; + ani_value args[] = { + { .d = abilityInfo.maxWindowRatio }, + { .d = abilityInfo.minWindowRatio }, + { .l = static_cast(abilityInfo.maxWindowWidth) }, + { .l = static_cast(abilityInfo.minWindowWidth) }, + { .l = static_cast(abilityInfo.maxWindowHeight) }, + { .l = static_cast(abilityInfo.minWindowHeight) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddDouble() // maxWindowRatio: double + .AddDouble() // minWindowRatio: double + .AddLong() // maxWindowWidth: long + .AddLong() // minWindowWidth: long + .AddLong() // maxWindowHeight: long + .AddLong() // minWindowHeight: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_WINDOW_SIZE_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertExtensionInfo(ani_env* env, const ExtensionAbilityInfo& extensionInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_EXTENSIONABILITYINFO); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // bundleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.bundleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.bundleName, bundleName)); // moduleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.moduleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.moduleName, moduleName)); // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); - - // labelId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABELID, extensionInfo.labelId)); - - // descriptionId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTIONID, extensionInfo.descriptionId)); - - // iconId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICONID, extensionInfo.iconId)); - - // exported: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_EXPORTED, extensionInfo.visible)); - - // extensionAbilityType: bundleManager.ExtensionAbilityType - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_EXTENSIONABILITYTYPE, - EnumUtils::EnumNativeToETS_BundleManager_ExtensionAbilityType(env, static_cast(extensionInfo.type)))); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.name, name)); // extensionAbilityTypeName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.extensionTypeName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_EXTENSIONABILITYTYPENAME, string)); + ani_string extensionAbilityTypeName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.extensionTypeName, extensionAbilityTypeName)); // permissions: Array - ani_ref aPermissions = ConvertAniArrayString(env, extensionInfo.permissions); - RETURN_NULL_IF_NULL(aPermissions); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PERMISSIONS, aPermissions)); + ani_ref permissions = ConvertAniArrayString(env, extensionInfo.permissions); + RETURN_NULL_IF_NULL(permissions); // applicationInfo: ApplicationInfo - ani_object aObject = ConvertApplicationInfo(env, extensionInfo.applicationInfo); - RETURN_NULL_IF_NULL(aObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPLICATIONINFO, aObject)); + ani_ref applicationInfo = nullptr; + if (!extensionInfo.applicationInfo.name.empty()) { + applicationInfo = ConvertApplicationInfo(env, extensionInfo.applicationInfo); + } else { + ani_status status = env->GetNull(&applicationInfo); + if (status != ANI_OK) { + APP_LOGE("GetNull applicationInfo failed %{public}d", status); + return nullptr; + } + } + RETURN_NULL_IF_NULL(applicationInfo); // metadata: Array - ani_object aMetadataObject = ConvertAniArray(env, extensionInfo.metadata, ConvertMetadata); - RETURN_NULL_IF_NULL(aMetadataObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_METADATA, aMetadataObject)); - - // enabled: boolean - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ENABLED, extensionInfo.enabled)); + ani_object metadata = ConvertAniArray(env, extensionInfo.metadata, ConvertMetadata); + RETURN_NULL_IF_NULL(metadata); // readPermission: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.readPermission, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_READPERMISSION, string)); + ani_string readPermission = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.readPermission, readPermission)); // writePermission: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.writePermission, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_WRITEPERMISSION, string)); + ani_string writePermission = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionInfo.writePermission, writePermission)); // skills: Array - ani_object aSkillsObject = ConvertAniArray(env, extensionInfo.skills, ConvertExtensionAbilitySkill); - RETURN_NULL_IF_NULL(aSkillsObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SKILLS, aSkillsObject)); - - // appIndex: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINDEX, extensionInfo.appIndex)); - - return object; + ani_object skills = ConvertAniArray(env, extensionInfo.skills, ConvertExtensionAbilitySkill); + RETURN_NULL_IF_NULL(skills); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .r = name }, + { .l = static_cast(extensionInfo.labelId) }, + { .l = static_cast(extensionInfo.descriptionId) }, + { .l = static_cast(extensionInfo.iconId) }, + { .z = BoolToAniBoolean(extensionInfo.visible) }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_ExtensionAbilityType( + env, static_cast(extensionInfo.type)) }, + { .r = extensionAbilityTypeName }, + { .r = permissions }, + { .r = applicationInfo }, + { .r = metadata }, + { .z = BoolToAniBoolean(extensionInfo.enabled) }, + { .r = readPermission }, + { .r = writePermission }, + { .r = skills }, + { .i = extensionInfo.appIndex }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddLong() // labelId: long + .AddLong() // descriptionId: long + .AddLong() // iconId: long + .AddBoolean() // exported: boolean + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_EXTENSION_ABILITY_TYPE) // extensionAbilityType + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // extensionAbilityTypeName: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // permissions: Array + .AddClass(CLASSNAME_APPLICATION_INFO) // applicationInfo: ApplicationInfo + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // metadata: Array + .AddBoolean() // enabled: boolean + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // readPermission: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // writePermission: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // skills: Array + .AddInt() // appIndex: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_EXTENSION_ABILITY_INFO_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertResource(ani_env* env, const Resource& resource) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_RESOURCE); + ani_class cls = CreateClassByName(env, CLASSNAME_RESOURCE_INNER); RETURN_NULL_IF_NULL(cls); - ani_object object = CreateNewObjectByClass(env, cls); + ani_object object = CreateNewObjectByClass(env, CLASSNAME_RESOURCE_INNER, cls); RETURN_NULL_IF_NULL(object); ani_string string = nullptr; // bundleName: string RETURN_NULL_IF_FALSE(StringToAniStr(env, resource.bundleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); + RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLE_NAME, string)); // moduleName: string RETURN_NULL_IF_FALSE(StringToAniStr(env, resource.moduleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); + RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULE_NAME, string)); - // id: number + // id: long RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ID, resource.id)); return object; @@ -817,132 +1093,147 @@ ani_object CommonFunAni::ConvertSignatureInfo(ani_env* env, const SignatureInfo& { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_SIGNATUREINFO); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // appId: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, signatureInfo.appId, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPID, string)); + ani_string appId = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, signatureInfo.appId, appId)); // fingerprint: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, signatureInfo.fingerprint, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_FINGERPRINT, string)); + ani_string fingerprint = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, signatureInfo.fingerprint, fingerprint)); // appIdentifier: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, signatureInfo.appIdentifier, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPIDENTIFIER, string)); + ani_string appIdentifier = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, signatureInfo.appIdentifier, appIdentifier)); // certificate?: string - if (StringToAniStr(env, signatureInfo.certificate, string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_CERTIFICATE, string)); + ani_string certificate = nullptr; + ani_ref certificateRef = nullptr; + if (StringToAniStr(env, signatureInfo.certificate, certificate)) { + certificateRef = certificate; + } else { + env->GetUndefined(&certificateRef); } - return object; + ani_value args[] = { + { .r = appId }, + { .r = fingerprint }, + { .r = appIdentifier }, + { .r = certificateRef }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // appId: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // fingerprint: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // appIdentifier: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // certificate?: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SIGNATURE_INFO_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertKeyValuePair( - ani_env* env, const std::pair& item, const char* className) + ani_env* env, const std::pair& item, const std::string& className) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_DATAITEM); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // key: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, item.first, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_KEY, string)); + ani_string key = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, item.first, key)); // value: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, item.second, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VALUE, string)); - - return object; + ani_string value = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, item.second, value)); + + ani_value args[] = { + { .r = key }, + { .r = value }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // key: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // value: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, className, ctorSig, args); } inline ani_object CommonFunAni::ConvertDataItem(ani_env* env, const std::pair& item) { - return ConvertKeyValuePair(env, item, CLASSNAME_DATAITEM); + return ConvertKeyValuePair(env, item, CLASSNAME_DATA_ITEM_INNER); } ani_object CommonFunAni::ConvertRouterItem(ani_env* env, const RouterItem& routerItem) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_ROUTERITEM); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.name, name)); // pageSourceFile: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.pageSourceFile, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PAGESOURCEFILE, string)); + ani_string pageSourceFile = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.pageSourceFile, pageSourceFile)); // buildFunction: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.buildFunction, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUILDFUNCTION, string)); + ani_string buildFunction = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.buildFunction, buildFunction)); // customData: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.customData, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_CUSTOMDATA, string)); + ani_string customData = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, routerItem.customData, customData)); // data: Array ani_object aDataArrayObject = ConvertAniArray(env, routerItem.data, ConvertDataItem); RETURN_NULL_IF_NULL(aDataArrayObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DATA, aDataArrayObject)); - return object; + ani_value args[] = { + { .r = name }, + { .r = pageSourceFile }, + { .r = buildFunction }, + { .r = customData }, + { .r = aDataArrayObject }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // pageSourceFile: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // buildFunction: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // customData: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // data: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_ROUTER_ITEM_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertRequestPermission(ani_env* env, const RequestPermission& requestPermission) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_PERMISSION); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermission.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermission.name, name)); // moduleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermission.moduleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermission.moduleName, moduleName)); // reason: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermission.reason, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_REASON, string)); - - // reasonId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_REASONID, requestPermission.reasonId)); + ani_string reason = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermission.reason, reason)); // usedScene: UsedScene - ani_object aObject = ConvertRequestPermissionUsedScene(env, requestPermission.usedScene); - RETURN_NULL_IF_NULL(aObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_USEDSCENE, aObject)); - - return object; + ani_object usedScene = ConvertRequestPermissionUsedScene(env, requestPermission.usedScene); + RETURN_NULL_IF_NULL(usedScene); + + ani_value args[] = { + { .r = name }, + { .r = moduleName }, + { .r = reason }, + { .l = static_cast(requestPermission.reasonId) }, + { .r = usedScene }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // reason: string + .AddLong() // reasonId: long + .AddClass(CLASSNAME_USED_SCENE) // usedScene: UsedScene + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PERMISSION_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertRequestPermissionUsedScene( @@ -950,479 +1241,1422 @@ ani_object CommonFunAni::ConvertRequestPermissionUsedScene( { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_USEDSCENE); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // when: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermissionUsedScene.when, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_WHEN, string)); - // abilities: Array - ani_ref aAbilities = ConvertAniArrayString(env, requestPermissionUsedScene.abilities); - RETURN_NULL_IF_NULL(aAbilities); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ABILITIES, aAbilities)); + ani_object abilities = ConvertAniArrayString(env, requestPermissionUsedScene.abilities); + RETURN_NULL_IF_NULL(abilities); - return object; + // when: string + ani_string when = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, requestPermissionUsedScene.when, when)); + + ani_value args[] = { + { .r = abilities }, + { .r = when }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // abilities: Array + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // when: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_USED_SCENE_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertPreloadItem(ani_env* env, const PreloadItem& preloadItem) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_PRELOADITEM); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // moduleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, preloadItem.moduleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); - - return object; + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, preloadItem.moduleName, moduleName)); + + ani_value args[] = { + { .r = moduleName }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PRELOAD_ITEM_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertDependency(ani_env* env, const Dependency& dependency) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_DEPENDENCY); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; // moduleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, dependency.moduleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, dependency.moduleName, moduleName)); // bundleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, dependency.bundleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); - - // versionCode: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VERSIONCODE, dependency.versionCode)); - - return object; + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, dependency.bundleName, bundleName)); + + ani_value args[] = { + { .r = moduleName }, + { .r = bundleName }, + { .l = static_cast(dependency.versionCode) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddLong() // versionCode: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_DEPENDENCY_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertHapModuleInfo(ani_env* env, const HapModuleInfo& hapModuleInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_HAPMODULEINFO); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.name, name)); // icon: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.iconPath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICON, string)); - - // iconId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICONID, hapModuleInfo.iconId)); + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.iconPath, icon)); // label: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.label, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABEL, string)); - - // labelId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABELID, hapModuleInfo.labelId)); + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.label, label)); // description: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.description, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTION, string)); - - // descriptionId: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DESCRIPTIONID, hapModuleInfo.descriptionId)); + ani_string description = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.description, description)); // mainElementName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.mainElementName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MAINELEMENTNAME, string)); + ani_string mainElementName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.mainElementName, mainElementName)); // abilitiesInfo: Array - ani_object aAbilityInfoObject = ConvertAniArray(env, hapModuleInfo.abilityInfos, ConvertAbilityInfo); - RETURN_NULL_IF_NULL(aAbilityInfoObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ABILITIESINFO, aAbilityInfoObject)); + ani_object abilitiesInfo = ConvertAniArray(env, hapModuleInfo.abilityInfos, ConvertAbilityInfo); + RETURN_NULL_IF_NULL(abilitiesInfo); // extensionAbilitiesInfo: Array - ani_object aExtensionAbilityInfoObject = ConvertAniArray(env, hapModuleInfo.extensionInfos, ConvertExtensionInfo); - RETURN_NULL_IF_NULL(aExtensionAbilityInfoObject); - RETURN_NULL_IF_FALSE( - CallSetter(env, cls, object, PROPERTYNAME_EXTENSIONABILITIESINFO, aExtensionAbilityInfoObject)); + ani_object extensionAbilitiesInfo = ConvertAniArray(env, hapModuleInfo.extensionInfos, ConvertExtensionInfo); + RETURN_NULL_IF_NULL(extensionAbilitiesInfo); // metadata: Array - ani_object aMetadataObject = ConvertAniArray(env, hapModuleInfo.metadata, ConvertMetadata); - RETURN_NULL_IF_NULL(aMetadataObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_METADATA, aMetadataObject)); + ani_object metadata = ConvertAniArray(env, hapModuleInfo.metadata, ConvertMetadata); + RETURN_NULL_IF_NULL(metadata); // deviceTypes: Array - ani_ref aDeviceTypes = ConvertAniArrayString(env, hapModuleInfo.deviceTypes); - RETURN_NULL_IF_NULL(aDeviceTypes); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DEVICETYPES, aDeviceTypes)); - - // installationFree: boolean - RETURN_NULL_IF_FALSE( - CallSetter(env, cls, object, PROPERTYNAME_INSTALLATIONFREE, BoolToAniBoolean(hapModuleInfo.installationFree))); + ani_object deviceTypes = ConvertAniArrayString(env, hapModuleInfo.deviceTypes); + RETURN_NULL_IF_NULL(deviceTypes); // hashValue: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.hashValue, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_HASHVALUE, string)); - - // type: bundleManager.ModuleType - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_TYPE, - EnumUtils::EnumNativeToETS_BundleManager_ModuleType(env, static_cast(hapModuleInfo.moduleType)))); + ani_string hashValue = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.hashValue, hashValue)); // dependencies: Array - ani_object aDependenciesObject = ConvertAniArray(env, hapModuleInfo.dependencies, ConvertDependency); - RETURN_NULL_IF_NULL(aDependenciesObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_DEPENDENCIES, aDependenciesObject)); + ani_object dependencies = ConvertAniArray(env, hapModuleInfo.dependencies, ConvertDependency); + RETURN_NULL_IF_NULL(dependencies); // preloads: Array - ani_object aPreloadsObject = ConvertAniArray(env, hapModuleInfo.preloads, ConvertPreloadItem); - RETURN_NULL_IF_NULL(aPreloadsObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PRELOADS, aPreloadsObject)); + ani_object preloads = ConvertAniArray(env, hapModuleInfo.preloads, ConvertPreloadItem); + RETURN_NULL_IF_NULL(preloads); // fileContextMenuConfig: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.fileContextMenu, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_FILECONTEXTMENUCONFIG, string)); + ani_string fileContextMenuConfig = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.fileContextMenu, fileContextMenuConfig)); // routerMap: Array - ani_object aRouterMapObject = ConvertAniArray(env, hapModuleInfo.routerArray, ConvertRouterItem); - RETURN_NULL_IF_NULL(aRouterMapObject); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ROUTERMAP, aRouterMapObject)); + ani_object routerMap = ConvertAniArray(env, hapModuleInfo.routerArray, ConvertRouterItem); + RETURN_NULL_IF_NULL(routerMap); // nativeLibraryPath: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, hapModuleInfo.nativeLibraryPath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NATIVELIBRARYPATH, string)); + ani_string nativeLibraryPath = nullptr; + std::string externalNativeLibraryPath = ""; + if (!hapModuleInfo.nativeLibraryPath.empty() && !hapModuleInfo.moduleName.empty()) { + externalNativeLibraryPath = CONTEXT_DATA_STORAGE_BUNDLE + hapModuleInfo.nativeLibraryPath; + } + RETURN_NULL_IF_FALSE(StringToAniStr(env, externalNativeLibraryPath, nativeLibraryPath)); // codePath: string - std::string codePath = hapModuleInfo.hapPath; + ani_string codePath = nullptr; + std::string hapPath = hapModuleInfo.hapPath; size_t result = hapModuleInfo.hapPath.find(PATH_PREFIX); if (result != std::string::npos) { size_t pos = hapModuleInfo.hapPath.find_last_of('/'); - codePath = CODE_PATH_PREFIX; + hapPath = CODE_PATH_PREFIX; if (pos != std::string::npos && pos != hapModuleInfo.hapPath.size() - 1) { - codePath.append(hapModuleInfo.hapPath.substr(pos + 1)); + hapPath.append(hapModuleInfo.hapPath.substr(pos + 1)); } } - RETURN_NULL_IF_FALSE(StringToAniStr(env, codePath, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_CODEPATH, string)); - - return object; + RETURN_NULL_IF_FALSE(StringToAniStr(env, hapPath, codePath)); + + ani_value args[] = { + { .r = name }, + { .r = icon }, + { .l = static_cast(hapModuleInfo.iconId) }, + { .r = label }, + { .l = static_cast(hapModuleInfo.labelId) }, + { .r = description }, + { .l = static_cast(hapModuleInfo.descriptionId) }, + { .r = mainElementName }, + { .r = abilitiesInfo }, + { .r = extensionAbilitiesInfo }, + { .r = metadata }, + { .r = deviceTypes }, + { .z = BoolToAniBoolean(hapModuleInfo.installationFree) }, + { .r = hashValue }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_ModuleType( + env, static_cast(hapModuleInfo.moduleType)) }, + { .r = dependencies }, + { .r = preloads }, + { .r = fileContextMenuConfig }, + { .r = routerMap }, + { .r = nativeLibraryPath }, + { .r = codePath }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddLong() // iconId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddLong() // labelId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // description: string + .AddLong() // descriptionId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // mainElementName: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // abilitiesInfo: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // extensionAbilitiesInfo: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // metadata: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // deviceTypes: Array + .AddBoolean() // installationFree: boolean + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // hashValue: string + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_MODULE_TYPE) // type: bundleManager.ModuleType + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // dependencies: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // preloads: Array + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // fileContextMenuConfig: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // routerMap: Array + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // nativeLibraryPath: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // codePath: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_HAP_MODULE_INFO_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertElementName(ani_env* env, const ElementName& elementName) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_ELEMENTNAME); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; + ani_ref refUndefined = nullptr; + ani_status status = env->GetUndefined(&refUndefined); + if (status != ANI_OK) { + APP_LOGE("GetUndefined failed %{public}d", status); + return nullptr; + } // deviceId?: string - if (StringToAniStr(env, elementName.GetDeviceID(), string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_DEVICEID, string)); + ani_ref deviceId = refUndefined; + ani_string deviceIdString = nullptr; + if (StringToAniStr(env, elementName.GetDeviceID(), deviceIdString)) { + deviceId = deviceIdString; } // bundleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, elementName.GetBundleName(), string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, elementName.GetBundleName(), bundleName)); // moduleName?: string - if (StringToAniStr(env, elementName.GetModuleName(), string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_ref moduleName = refUndefined; + ani_string moduleNameString = nullptr; + if (StringToAniStr(env, elementName.GetModuleName(), moduleNameString)) { + moduleName = moduleNameString; } // abilityName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, elementName.GetAbilityName(), string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ABILITYNAME, string)); + ani_string abilityName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, elementName.GetAbilityName(), abilityName)); // uri?: string - if (StringToAniStr(env, elementName.GetURI(), string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_URI, string)); + ani_ref uri = refUndefined; + ani_string uriString = nullptr; + if (StringToAniStr(env, elementName.GetURI(), uriString)) { + uri = uriString; } // shortName?: string - if (StringToAniStr(env, "", string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_SHORTNAME, string)); + ani_ref shortName = refUndefined; + ani_string shortNameString = nullptr; + if (StringToAniStr(env, "", shortNameString)) { + shortName = shortNameString; } - return object; -} - -ani_object CommonFunAni::ConvertCustomizeData(ani_env* env, const CustomizeData& customizeData) -{ - RETURN_NULL_IF_NULL(env); - - ani_class cls = CreateClassByName(env, CLASSNAME_CUSTOMIZEDATA); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - - // name: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, customizeData.name, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_NAME, string)); - - // value: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, customizeData.value, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_VALUE, string)); - - // extra: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, customizeData.extra, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_EXTRA, string)); - - return object; + ani_value args[] = { + { .r = bundleName }, + { .r = abilityName }, + { .r = deviceId }, + { .r = moduleName }, + { .r = uri }, + { .r = shortName }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // abilityName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // deviceId?: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName?: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // uri?: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // shortName?: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_ELEMENT_NAME_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertAbilitySkillUriInner(ani_env* env, const SkillUri& skillUri, bool isExtension) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_SKILLURI); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; - // scheme: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.scheme, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SCHEME, string)); + ani_string scheme = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.scheme, scheme)); // host: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.host, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_HOST, string)); + ani_string host = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.host, host)); - // port: number - int32_t nPort = 0; + // port: int + int32_t port = 0; if (!skillUri.port.empty()) { - auto [ptr, ec] = std::from_chars(skillUri.port.data(), skillUri.port.data() + skillUri.port.size(), nPort); + auto [ptr, ec] = std::from_chars(skillUri.port.data(), skillUri.port.data() + skillUri.port.size(), port); if (ec != std::errc() || ptr != skillUri.port.data() + skillUri.port.size()) { APP_LOGE("skillUri port convert failed"); return nullptr; } } - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PORT, nPort)); // path: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.path, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PATH, string)); + ani_string path = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.path, path)); // pathStartWith: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.pathStartWith, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PATHSTARTWITH, string)); + ani_string pathStartWith = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.pathStartWith, pathStartWith)); // pathRegex: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.pathRegex, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_PATHREGEX, string)); + ani_string pathRegex = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.pathRegex, pathRegex)); // type: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.type, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_TYPE, string)); + ani_string type = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.type, type)); // utd: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.utd, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_UTD, string)); - - // maxFileSupported: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_MAXFILESUPPORTED, skillUri.maxFileSupported)); - - if (!isExtension) { - // linkFeature: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.linkFeature, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LINKFEATURE, string)); - } - - return object; + ani_string utd = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, skillUri.utd, utd)); + + // linkFeature: string + ani_string linkFeature = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, isExtension? std::string(): skillUri.linkFeature, linkFeature)); + + ani_value args[] = { + { .r = scheme }, + { .r = host }, + { .i = port }, + { .r = path }, + { .r = pathStartWith }, + { .r = pathRegex }, + { .r = type }, + { .r = utd }, + { .i = skillUri.maxFileSupported }, + { .r = linkFeature }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // scheme: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // host: string + .AddInt() // port: int + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // path: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // pathStartWith: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // pathRegex: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // type: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // utd: string + .AddInt() // maxFileSupported: int + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // linkFeature: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SKILL_URI_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertAbilitySkillInner(ani_env* env, const Skill& skill, bool isExtension) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_SKILL); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - // actions: Array - ani_ref aActions = ConvertAniArrayString(env, skill.actions); - RETURN_NULL_IF_NULL(aActions); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ACTIONS, aActions)); + ani_object actions = ConvertAniArrayString(env, skill.actions); + RETURN_NULL_IF_NULL(actions); // entities: Array - ani_ref aEntities = ConvertAniArrayString(env, skill.entities); - RETURN_NULL_IF_NULL(aEntities); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ENTITIES, aEntities)); + ani_object entities = ConvertAniArrayString(env, skill.entities); + RETURN_NULL_IF_NULL(entities); // uris: Array - ani_object aSkillUri = + ani_object uris = ConvertAniArray(env, skill.uris, isExtension ? ConvertExtensionAbilitySkillUri : ConvertAbilitySkillUri); - RETURN_NULL_IF_NULL(aSkillUri); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_URIS, aSkillUri)); + RETURN_NULL_IF_NULL(uris); + + ani_value args[] = { + { .r = actions }, + { .r = entities }, + { .r = uris }, + { .z = BoolToAniBoolean(isExtension? false: skill.domainVerify) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // actions: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // entities: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // uris: Array + .AddBoolean() // domainVerify: boolean + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SKILL_INNER, ctorSig, args); +} - if (!isExtension) { - // domainVerify: boolean - RETURN_NULL_IF_FALSE( - CallSetter(env, cls, object, PROPERTYNAME_DOMAINVERIFY, BoolToAniBoolean(skill.domainVerify))); - } +ani_object CommonFunAni::ConvertAppCloneIdentity(ani_env* env, const std::string& bundleName, const int32_t appIndex) +{ + RETURN_NULL_IF_NULL(env); - return object; + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleName, name)); + + ani_value args[] = { + { .r = name }, + { .i = appIndex }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddInt() // appIndex: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_APP_CLONE_IDENTITY_INNER, ctorSig, args); } -ani_object CommonFunAni::ConvertBundleResourceInfo(ani_env* env, const BundleResourceInfo& bundleResInfo) +ani_object CommonFunAni::ConvertPermissionDef(ani_env* env, const PermissionDef& permissionDef) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_BUNDLERESINFO); - RETURN_NULL_IF_NULL(cls); + // permissionName: string + ani_string permissionName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, permissionDef.permissionName, permissionName)); + + ani_value args[] = { + { .r = permissionName }, + { .i = permissionDef.grantMode }, + { .l = static_cast(permissionDef.labelId) }, + { .l = static_cast(permissionDef.descriptionId) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // permissionName: string + .AddInt() // grantMode: int + .AddLong() // labelId: long + .AddLong() // descriptionId: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PERMISSION_DEF_INNER, ctorSig, args); +} - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); +ani_object CommonFunAni::ConvertSharedBundleInfo(ani_env* env, const SharedBundleInfo& sharedBundleInfo) +{ + RETURN_NULL_IF_NULL(env); - ani_string string = nullptr; + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, sharedBundleInfo.name, name)); + + // sharedModuleInfo: Array + ani_object sharedModuleInfo = + ConvertAniArray(env, sharedBundleInfo.sharedModuleInfos, ConvertSharedModuleInfo); + RETURN_NULL_IF_NULL(sharedModuleInfo); + + ani_value args[] = { + { .r = name }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_CompatiblePolicy( + env, static_cast(CompatiblePolicy::BACKWARD_COMPATIBILITY)) }, + { .r = sharedModuleInfo }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // permissionName: string + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_COMPATIBLE_POLICY) // compatiblePolicy + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // sharedModuleInfo: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SHARED_BUNDLE_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertSharedModuleInfo(ani_env* env, const SharedModuleInfo& sharedModuleInfo) +{ + RETURN_NULL_IF_NULL(env); + + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, sharedModuleInfo.name, name)); + + // versionName: string + ani_string versionName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, sharedModuleInfo.versionName, versionName)); + + // description: string + ani_string description = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, sharedModuleInfo.description, description)); + + ani_value args[] = { + { .r = name }, + { .l = static_cast(sharedModuleInfo.versionCode) }, + { .r = versionName }, + { .r = description }, + { .l = static_cast(sharedModuleInfo.descriptionId) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddLong() // versionCode: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // versionName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // description: string + .AddLong() // descriptionId: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SHARED_MODULE_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertAppProvisionInfo(ani_env* env, const AppProvisionInfo& appProvisionInfo) +{ + RETURN_NULL_IF_NULL(env); + + // versionName: string + ani_string versionName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.versionName, versionName)); + + // uuid: string + ani_string uuid = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.uuid, uuid)); + + // type: string + ani_string type = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.type, type)); + + // appDistributionType: string + ani_string appDistributionType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.appDistributionType, appDistributionType)); + + // validity: Validity + ani_object validity = ConvertValidity(env, appProvisionInfo.validity); + RETURN_NULL_IF_NULL(validity); + + // developerId: string + ani_string developerId = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.developerId, developerId)); + + // certificate: string + ani_string certificate = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.certificate, certificate)); + + // apl: string + ani_string apl = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.apl, apl)); + + // issuer: string + ani_string issuer = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.issuer, issuer)); + + // appIdentifier: string + ani_string appIdentifier = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.appIdentifier, appIdentifier)); + + // organization: string + ani_string organization = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, appProvisionInfo.organization, organization)); + + ani_value args[] = { + { .l = static_cast(appProvisionInfo.versionCode) }, + { .r = versionName }, + { .r = uuid }, + { .r = type }, + { .r = appDistributionType }, + { .r = validity }, + { .r = developerId }, + { .r = certificate }, + { .r = apl }, + { .r = issuer }, + { .r = appIdentifier }, + { .r = organization }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddLong() // versionCode: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // versionName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // uuid: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // type: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // appDistributionType: string + .AddClass(CLASSNAME_VALIDITY) // validity: Validity + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // developerId: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // certificate: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // apl: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // issuer: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // appIdentifier: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // organization: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_APP_PROVISION_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertValidity(ani_env* env, const Validity& validity) +{ + RETURN_NULL_IF_NULL(env); + + ani_value args[] = { + { .l = validity.notBefore }, + { .l = validity.notAfter }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddLong() // notBefore: long + .AddLong() // notAfter: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_VALIDITY_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertRecoverableApplicationInfo( + ani_env* env, const RecoverableApplicationInfo& recoverableApplicationInfo) +{ + RETURN_NULL_IF_NULL(env); // bundleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleResInfo.bundleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, recoverableApplicationInfo.bundleName, bundleName)); - // icon: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleResInfo.icon, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ICON, string)); + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, recoverableApplicationInfo.moduleName, moduleName)); + + // codePaths: Array + ani_ref codePaths = ConvertAniArrayString(env, recoverableApplicationInfo.codePaths); + RETURN_NULL_IF_NULL(codePaths); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .l = static_cast(recoverableApplicationInfo.labelId) }, + { .l = static_cast(recoverableApplicationInfo.iconId) }, + { .z = BoolToAniBoolean(recoverableApplicationInfo.systemApp) }, + { .r = EnumUtils::EnumNativeToETS_BundleManager_BundleType( + env, static_cast(recoverableApplicationInfo.bundleType)) }, + { .r = codePaths }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddLong() // labelId: long + .AddLong() // iconId: long + .AddBoolean() // systemApp: boolean + .AddClass(CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_BUNDLE_TYPE) // bundleType: bundleManager.BundleType + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // codePaths: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_RECOVERABLE_APPLICATION_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertPreinstalledApplicationInfo( + ani_env* env, const PreinstalledApplicationInfo& reinstalledApplicationInfo) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, reinstalledApplicationInfo.bundleName, bundleName)); + + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, reinstalledApplicationInfo.moduleName, moduleName)); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .l = static_cast(reinstalledApplicationInfo.iconId) }, + { .l = static_cast(reinstalledApplicationInfo.labelId) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddLong() // iconId: long + .AddLong() // labelId: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PREINSTALLED_APPLICATION_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertPluginBundleInfo(ani_env* env, const PluginBundleInfo& pluginBundleInfo) +{ + RETURN_NULL_IF_NULL(env); // label: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleResInfo.label, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_LABEL, string)); + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, pluginBundleInfo.label, label)); - // drawableDecriptor: drawableDecriptor + // icon: string + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, pluginBundleInfo.icon, icon)); - // appIndex: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINDEX, bundleResInfo.appIndex)); + // pluginBundleName: string + ani_string pluginBundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, pluginBundleInfo.pluginBundleName, pluginBundleName)); - return object; + // versionName: string + ani_string versionName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, pluginBundleInfo.versionName, versionName)); + + // pluginModuleInfos: Array + ani_object pluginModuleInfos = + ConvertAniArray(env, pluginBundleInfo.pluginModuleInfos, ConvertPluginModuleInfo); + RETURN_NULL_IF_NULL(pluginModuleInfos); + + ani_value args[] = { + { .r = label }, + { .l = static_cast(pluginBundleInfo.labelId) }, + { .r = icon }, + { .l = static_cast(pluginBundleInfo.iconId) }, + { .r = pluginBundleName }, + { .l = static_cast(pluginBundleInfo.versionCode) }, + { .r = versionName }, + { .r = pluginModuleInfos }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddLong() // labelId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddLong() // iconId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // pluginBundleName: string + .AddLong() // versionCode: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // versionName: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // pluginModuleInfos: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PLUGIN_BUNDLE_INFO_INNER, ctorSig, args); } -ani_object CommonFunAni::ConvertShortcutInfo(ani_env* env, const ShortcutInfo& shortcutInfo) +ani_object CommonFunAni::ConvertPluginModuleInfo(ani_env* env, const PluginModuleInfo& pluginModuleInfo) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_SHORTCUTINFO); - RETURN_NULL_IF_NULL(cls); + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, pluginModuleInfo.moduleName, moduleName)); - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); + // description: string + ani_string description = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, pluginModuleInfo.description, description)); + + ani_value args[] = { + { .r = moduleName }, + { .l = static_cast(pluginModuleInfo.descriptionId) }, + { .r = description }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddLong() // descriptionId: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // description: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PLUGIN_MODULE_INFO_INNER, ctorSig, args); +} - ani_string string = nullptr; +ani_object CommonFunAni::ConvertShortcutInfo(ani_env* env, const ShortcutInfo& shortcutInfo) +{ + RETURN_NULL_IF_NULL(env); + + ani_ref refUndefined = nullptr; + ani_status status = env->GetUndefined(&refUndefined); + if (status != ANI_OK) { + APP_LOGE("GetUndefined failed %{public}d", status); + return nullptr; + } // id: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutInfo.id, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_ID, string)); + ani_string id = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutInfo.id, id)); // bundleName: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutInfo.bundleName, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_BUNDLENAME, string)); + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutInfo.bundleName, bundleName)); // moduleName?: string - if (StringToAniStr(env, shortcutInfo.moduleName, string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_MODULENAME, string)); + ani_ref moduleName = refUndefined; + ani_string moduleNameString = nullptr; + if (StringToAniStr(env, shortcutInfo.moduleName, moduleNameString)) { + moduleName = moduleNameString; } // hostAbility?: string - if (StringToAniStr(env, shortcutInfo.hostAbility, string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_HOSTABILITY, string)); + ani_ref hostAbility = refUndefined; + ani_string hostAbilityString = nullptr; + if (StringToAniStr(env, shortcutInfo.hostAbility, hostAbilityString)) { + hostAbility = hostAbilityString; } // icon?: string - if (StringToAniStr(env, shortcutInfo.icon, string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_ICON, string)); + ani_ref icon = refUndefined; + ani_string iconString = nullptr; + if (StringToAniStr(env, shortcutInfo.icon, iconString)) { + icon = iconString; } - // iconId?: number - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_ICONID, shortcutInfo.iconId)); + // iconId?: long + ani_object iconId = BoxValue(env, static_cast(shortcutInfo.iconId)); + RETURN_NULL_IF_FALSE(iconId); // label?: string - if (StringToAniStr(env, shortcutInfo.label, string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_LABEL, string)); + ani_ref label = refUndefined; + ani_string labelString = nullptr; + if (StringToAniStr(env, shortcutInfo.label, labelString)) { + label = labelString; } - // labelId?: number - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_LABELID, shortcutInfo.labelId)); + // labelId?: long + ani_object labelId = BoxValue(env, static_cast(shortcutInfo.labelId)); + RETURN_NULL_IF_FALSE(labelId); // wants?: Array - ani_object aShortcutWantObject = ConvertAniArray(env, shortcutInfo.intents, ConvertShortcutIntent); - RETURN_NULL_IF_NULL(aShortcutWantObject); - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_WANTS, aShortcutWantObject)); - - // appIndex: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_APPINDEX, shortcutInfo.appIndex)); - - // sourceType: number - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_SOURCETYPE, shortcutInfo.sourceType)); - - return object; + ani_object wants = ConvertAniArray(env, shortcutInfo.intents, ConvertShortcutIntent); + RETURN_NULL_IF_NULL(wants); + + // visible?: boolean + ani_object visible = BoxValue(env, BoolToAniBoolean(shortcutInfo.visible)); + RETURN_NULL_IF_FALSE(visible); + + ani_value args[] = { + { .r = id }, + { .r = bundleName }, + { .i = shortcutInfo.appIndex }, + { .i = shortcutInfo.sourceType }, + { .r = moduleName }, + { .r = hostAbility }, + { .r = icon }, + { .r = iconId }, + { .r = label }, + { .r = labelId }, + { .r = wants }, + { .r = visible }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // id: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddInt() // appIndex: int + .AddInt() // sourceType: int + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName?: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // hostAbility?: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon?: string + .AddClass(CommonFunAniNS::CLASSNAME_LONG) // iconId?: long + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label?: string + .AddClass(CommonFunAniNS::CLASSNAME_LONG) // labelId?: long + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // wants?: Array + .AddClass(CommonFunAniNS::CLASSNAME_BOOLEAN) // visible?: boolean + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SHORTCUT_INFO_INNER, ctorSig, args); } ani_object CommonFunAni::ConvertShortcutIntent(ani_env* env, const ShortcutIntent& shortcutIntent) { RETURN_NULL_IF_NULL(env); - ani_class cls = CreateClassByName(env, CLASSNAME_SHORTCUTWANT); - RETURN_NULL_IF_NULL(cls); - - ani_object object = CreateNewObjectByClass(env, cls); - RETURN_NULL_IF_NULL(object); - - ani_string string = nullptr; + ani_ref refUndefined = nullptr; + ani_status status = env->GetUndefined(&refUndefined); + if (status != ANI_OK) { + APP_LOGE("GetUndefined failed %{public}d", status); + return nullptr; + } // targetBundle: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutIntent.targetBundle, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_TARGETBUNDLE, string)); + ani_string targetBundle = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutIntent.targetBundle, targetBundle)); // targetModule?: string - if (StringToAniStr(env, shortcutIntent.targetModule, string)) { - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_TARGETMODULE, string)); + ani_ref targetModule = refUndefined; + ani_string targetModuleString = nullptr; + if (StringToAniStr(env, shortcutIntent.targetModule, targetModuleString)) { + targetModule = targetModuleString; } // targetAbility: string - RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutIntent.targetClass, string)); - RETURN_NULL_IF_FALSE(CallSetter(env, cls, object, PROPERTYNAME_TARGETABILITY, string)); + ani_string targetAbility = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, shortcutIntent.targetClass, targetAbility)); // parameters?: Array - ani_object aParameters = ConvertAniArray(env, shortcutIntent.parameters, ConvertShortcutIntentParameter); - RETURN_NULL_IF_NULL(aParameters); - RETURN_NULL_IF_FALSE(CallSetterOptional(env, cls, object, PROPERTYNAME_PARAMETERS, aParameters)); - - return object; + ani_object parameters = ConvertAniArray(env, shortcutIntent.parameters, ConvertShortcutIntentParameter); + RETURN_NULL_IF_NULL(parameters); + + ani_value args[] = { + { .r = targetBundle }, + { .r = targetAbility }, + { .r = targetModule }, + { .r = parameters }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // targetBundle: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // targetAbility: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // targetModule?: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // parameters?: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_SHORTCUT_WANT_INNER, ctorSig, args); } inline ani_object CommonFunAni::ConvertShortcutIntentParameter( ani_env* env, const std::pair& item) { - return ConvertKeyValuePair(env, item, CLASSNAME_SHORTCUT_PARAMETERITEM); + return ConvertKeyValuePair(env, item, CLASSNAME_SHORTCUT_PARAMETER_ITEM_INNER); +} + +ani_object CommonFunAni::ConvertLauncherAbilityInfo(ani_env* env, const LauncherAbilityInfo& launcherAbility) +{ + RETURN_NULL_IF_NULL(env); + + // applicationInfo: ApplicationInfo + ani_object applicationInfo = ConvertApplicationInfo(env, launcherAbility.applicationInfo); + RETURN_NULL_IF_NULL(applicationInfo); + + // elementName: ElementName + ani_object elementName = ConvertElementName(env, launcherAbility.elementName); + RETURN_NULL_IF_NULL(elementName); + + ani_value args[] = { + { .r = applicationInfo }, + { .r = elementName }, + { .l = static_cast(launcherAbility.labelId) }, + { .l = static_cast(launcherAbility.iconId) }, + { .i = launcherAbility.userId }, + { .l = launcherAbility.installTime }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CLASSNAME_APPLICATION_INFO) // applicationInfo: ApplicationInfo + .AddClass(CLASSNAME_ELEMENT_NAME) // elementName: ElementName + .AddLong() // labelId: long + .AddLong() // iconId: long + .AddInt() // userId: int + .AddLong() // installTime: long + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_LAUNCHER_ABILITY_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertOverlayModuleInfo(ani_env* env, const OverlayModuleInfo& overlayModuleInfo) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, overlayModuleInfo.bundleName, bundleName)); + + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, overlayModuleInfo.moduleName, moduleName)); + + // targetModuleName: string + ani_string targetModuleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, overlayModuleInfo.targetModuleName, targetModuleName)); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .r = targetModuleName }, + { .i = overlayModuleInfo.priority }, + { .i = overlayModuleInfo.state }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // targetModuleName: string + .AddInt() // priority: int + .AddInt() // state: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_OVERLAY_MODULE_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::CreateBundleChangedInfo( + ani_env* env, const std::string& bundleName, int32_t userId, int32_t appIndex) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string aniBundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, bundleName, aniBundleName)); + + ani_value args[] = { + { .r = aniBundleName }, + { .i = userId }, + { .i = appIndex }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddInt() // userId: int + .AddInt() // appIndex: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_CHANGED_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertVersion(ani_env* env, const Version& version) +{ + RETURN_NULL_IF_NULL(env); + + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, version.name, name)); + + ani_value args[] = { + { .i = static_cast(version.minCompatibleVersionCode) }, + { .r = name }, + { .i = static_cast(version.code) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddInt() // minCompatibleVersionCode: int + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddInt() // code: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_VERSION_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertPackageApp(ani_env* env, const PackageApp& packageApp) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, packageApp.bundleName, bundleName)); + + // version: Version + ani_object version = ConvertVersion(env, packageApp.version); + RETURN_NULL_IF_NULL(version); + + ani_value args[] = { + { .r = bundleName }, + { .r = version }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CLASSNAME_VERSION) // version: Version + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_CONFIG_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertAbilityFormInfo(ani_env* env, const AbilityFormInfo& abilityFormInfo) +{ + RETURN_NULL_IF_NULL(env); + + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityFormInfo.name, name)); + + // type: string + ani_string type = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityFormInfo.type, type)); + + // scheduledUpdateTime: string + ani_string scheduledUpdateTime = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityFormInfo.scheduledUpdateTime, scheduledUpdateTime)); + + // supportDimensions: Array + ani_ref supportDimensions = ConvertAniArrayString(env, abilityFormInfo.supportDimensions); + RETURN_NULL_IF_NULL(supportDimensions); + + // defaultDimension: string + ani_string defaultDimension = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, abilityFormInfo.defaultDimension, defaultDimension)); + + ani_value args[] = { + { .r = name }, + { .r = type }, + { .z = BoolToAniBoolean(abilityFormInfo.updateEnabled) }, + { .r = scheduledUpdateTime }, + { .i = static_cast(abilityFormInfo.updateDuration) }, + { .r = supportDimensions }, + { .r = defaultDimension }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // type: string + .AddBoolean() // updateEnabled: boolean + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // scheduledUpdateTime: string + .AddInt() // updateDuration: int + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // supportDimensions: Array + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // defaultDimension: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_ABILITY_FORM_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertModuleAbilityInfo(ani_env* env, const ModuleAbilityInfo& moduleAbilityInfo) +{ + RETURN_NULL_IF_NULL(env); + + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, moduleAbilityInfo.name, name)); + + // label: string + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, moduleAbilityInfo.label, label)); + + // forms: Array + ani_object forms = ConvertAniArray(env, moduleAbilityInfo.forms, ConvertAbilityFormInfo); + RETURN_NULL_IF_NULL(forms); + + ani_value args[] = { + { .r = name }, + { .r = label }, + { .z = BoolToAniBoolean(moduleAbilityInfo.visible) }, + { .r = forms }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddBoolean() // exported: boolean + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // forms: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_MODULE_ABILITY_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertModuleDistro(ani_env* env, const ModuleDistro& moduleDistro) +{ + RETURN_NULL_IF_NULL(env); + + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, moduleDistro.moduleName, moduleName)); + + // moduleType: string + ani_string moduleType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, moduleDistro.moduleType, moduleType)); + + ani_value args[] = { + { .z = BoolToAniBoolean(moduleDistro.deliveryWithInstall) }, + { .z = BoolToAniBoolean(moduleDistro.installationFree) }, + { .r = moduleName }, + { .r = moduleType }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddBoolean() // deliveryWithInstall: boolean + .AddBoolean() // installationFree: boolean + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleType: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_MODULE_DISTRO_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertApiVersion(ani_env* env, const ApiVersion& apiVersion) +{ + RETURN_NULL_IF_NULL(env); + + // releaseType: string + ani_string releaseType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, apiVersion.releaseType, releaseType)); + + ani_value args[] = { + { .r = releaseType }, + { .i = static_cast(apiVersion.compatible) }, + { .i = static_cast(apiVersion.target) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // releaseType: string + .AddInt() // compatible: int + .AddInt() // target: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_API_VERSION_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertExtensionAbilities(ani_env* env, const ExtensionAbilities& extensionAbilities) +{ + RETURN_NULL_IF_NULL(env); + + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, extensionAbilities.name, name)); + + // forms: Array + ani_object forms = ConvertAniArray(env, extensionAbilities.forms, ConvertAbilityFormInfo); + RETURN_NULL_IF_NULL(forms); + + ani_value args[] = { + { .r = name }, + { .r = forms }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // forms: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_EXTENSION_ABILITY_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertPackageModule(ani_env* env, const PackageModule& packageModule) +{ + RETURN_NULL_IF_NULL(env); + + // mainAbility: string + ani_string mainAbility = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, packageModule.mainAbility, mainAbility)); + + // apiVersion: ApiVersion + ani_object apiVersion = ConvertApiVersion(env, packageModule.apiVersion); + RETURN_NULL_IF_NULL(apiVersion); + + // deviceTypes: Array + ani_ref deviceTypes = ConvertAniArrayString(env, packageModule.deviceType); + RETURN_NULL_IF_NULL(deviceTypes); + + // distro: ModuleDistroInfo + ani_object distro = ConvertModuleDistro(env, packageModule.distro); + RETURN_NULL_IF_NULL(distro); + + // abilities: Array + ani_object abilities = ConvertAniArray(env, packageModule.abilities, ConvertModuleAbilityInfo); + RETURN_NULL_IF_NULL(abilities); + + // extensionAbilities: Array + ani_object extensionAbilities = + ConvertAniArray(env, packageModule.extensionAbilities, ConvertExtensionAbilities); + RETURN_NULL_IF_NULL(extensionAbilities); + + ani_value args[] = { + { .r = mainAbility }, + { .r = apiVersion }, + { .r = deviceTypes }, + { .r = distro }, + { .r = abilities }, + { .r = extensionAbilities }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // mainAbility: string + .AddClass(CLASSNAME_API_VERSION) // apiVersion: ApiVersion + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // deviceTypes: Array + .AddClass(CLASSNAME_MODULE_DISTRO_INFO) // distro: ModuleDistroInfo + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // abilities: Array + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // extensionAbilities: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_MODULE_CONFIG_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertSummary(ani_env* env, const Summary& summary, bool withApp) +{ + RETURN_NULL_IF_NULL(env); + + // app: BundleConfigInfo + ani_object app = nullptr; + if (withApp) { + app = ConvertPackageApp(env, summary.app); + RETURN_NULL_IF_NULL(app); + } + + // modules: Array + ani_object modules = ConvertAniArray(env, summary.modules, ConvertPackageModule); + RETURN_NULL_IF_NULL(modules); + + ani_value args[] = { + { .r = modules }, + { .r = app }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // modules: Array + .BuildSignatureDescriptor(); + static const std::string ctorSigWithApp = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // modules: Array + .AddClass(CLASSNAME_BUNDLE_CONFIG_INFO) // app: BundleConfigInfo + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PACKAGE_SUMMARY_INNER, withApp ? ctorSigWithApp : ctorSig, args); +} + +ani_object CommonFunAni::ConvertPackages(ani_env* env, const Packages& packages) +{ + RETURN_NULL_IF_NULL(env); + + // deviceTypes: Array + ani_ref deviceTypes = ConvertAniArrayString(env, packages.deviceType); + RETURN_NULL_IF_NULL(deviceTypes); + + // name: string + ani_string name = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, packages.name, name)); + + // moduleType: string + ani_string moduleType = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, packages.moduleType, moduleType)); + + ani_value args[] = { + { .r = deviceTypes }, + { .r = name }, + { .r = moduleType }, + { .z = BoolToAniBoolean(packages.deliveryWithInstall) }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // deviceTypes: Array + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // name: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleType: string + .AddBoolean() // deliveryWithInstall: boolean + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_PACKAGE_CONFIG_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertBundlePackInfo(ani_env* env, const BundlePackInfo& bundlePackInfo, const uint32_t flag) +{ + RETURN_NULL_IF_NULL(env); + + if (flag & BundlePackFlag::GET_PACKAGES) { + // packages: Array + ani_object packages = ConvertAniArray(env, bundlePackInfo.packages, ConvertPackages); + RETURN_NULL_IF_NULL(packages); + + ani_value args[] = { + { .r = packages }, + }; + static const std::string ctorSigPackages = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // packages: Array + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_PACK_INFO_INNER, ctorSigPackages, args); + } + + if (flag & BundlePackFlag::GET_BUNDLE_SUMMARY) { + // summary: PackageSummary + ani_object summary = ConvertSummary(env, bundlePackInfo.summary, true); + RETURN_NULL_IF_NULL(summary); + + ani_value args[] = { + { .r = summary }, + }; + static const std::string ctorSigBundleSummary = SignatureBuilder() + .AddClass(CLASSNAME_PACKAGE_SUMMARY) // summary: PackageSummary + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_PACK_INFO_INNER, ctorSigBundleSummary, args); + } + + if (flag & BundlePackFlag::GET_MODULE_SUMMARY) { + // summary: PackageSummary + ani_object summary = ConvertSummary(env, bundlePackInfo.summary, false); + RETURN_NULL_IF_NULL(summary); + + ani_value args[] = { + { .r = summary }, + }; + static const std::string ctorSigModuleSummary = SignatureBuilder() + .AddClass(CLASSNAME_PACKAGE_SUMMARY) // summary: PackageSummary + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_PACK_INFO_INNER, ctorSigModuleSummary, args); + } + + // packages: Array + ani_object packages = ConvertAniArray(env, bundlePackInfo.packages, ConvertPackages); + RETURN_NULL_IF_NULL(packages); + + // summary: PackageSummary + ani_object summary = ConvertSummary(env, bundlePackInfo.summary, true); + RETURN_NULL_IF_NULL(summary); + + ani_value args[] = { + { .r = packages }, + { .r = summary }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ARRAY) // packages: Array + .AddClass(CLASSNAME_PACKAGE_SUMMARY) // summary: PackageSummary + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_PACK_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::CreateDispatchInfo( + ani_env* env, const std::string& version, const std::string& dispatchAPIVersion) +{ + RETURN_NULL_IF_NULL(env); + + // version: string + ani_string aniVersion = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, version, aniVersion)); + + // dispatchAPIVersion: string + ani_string aniDispatchAPIVersion = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, dispatchAPIVersion, aniDispatchAPIVersion)); + + ani_value args[] = { + { .r = aniVersion }, + { .r = aniDispatchAPIVersion }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // version: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // dispatchAPIVersion: string + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_DISPATCH_INFO_INNER, ctorSig, args); +} + +ani_object CommonFunAni::ConvertDynamicIconInfo(ani_env* env, const DynamicIconInfo& dynamicIconInfo) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, dynamicIconInfo.bundleName, bundleName)); + + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(StringToAniStr(env, dynamicIconInfo.moduleName, moduleName)); + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .i = dynamicIconInfo.userId }, + { .i = dynamicIconInfo.appIndex }, + }; + static const std::string ctorSig = SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddInt() // userId: int + .AddInt() // appIndex: int + .BuildSignatureDescriptor(); + return CreateNewObjectByClassV2(env, CLASSNAME_DYNAMIC_ICON_INFO_INNER, ctorSig, args); +} + +bool CommonFunAni::ParseBundleOptions(ani_env* env, ani_object object, int32_t& appIndex, int32_t& userId) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_int intValue = 0; + bool isDefault = true; + + // userId?: int + if (CallGetterOptional(env, object, PROPERTYNAME_USER_ID, &intValue)) { + if (intValue < 0) { + intValue = Constants::INVALID_USERID; + } + userId = intValue; + isDefault = false; + } + + // appIndex?: int + if (CallGetterOptional(env, object, PROPERTYNAME_APP_INDEX, &intValue)) { + appIndex = intValue; + isDefault = false; + } + + return isDefault; +} + +ani_object CommonFunAni::ConvertWantInfo(ani_env* env, const Want& want) +{ + RETURN_NULL_IF_NULL(env); + + ani_class cls = CreateClassByName(env, CLASSNAME_WANT); + RETURN_NULL_IF_NULL(cls); + + ani_object object = CreateNewObjectByClass(env, CLASSNAME_WANT, cls); + RETURN_NULL_IF_NULL(object); + + // bundleName?: string + ani_string string = nullptr; + if (StringToAniStr(env, want.GetElement().GetBundleName(), string)) { + RETURN_NULL_IF_FALSE(CallSetField(env, cls, object, PROPERTYNAME_BUNDLE_NAME, string)); + } + + // abilityName?: string + if (StringToAniStr(env, want.GetElement().GetAbilityName(), string)) { + RETURN_NULL_IF_FALSE(CallSetField(env, cls, object, PROPERTYNAME_ABILITY_NAME, string)); + } + + // deviceId?: string + if (StringToAniStr(env, want.GetElement().GetDeviceID(), string)) { + RETURN_NULL_IF_FALSE(CallSetField(env, cls, object, PROPERTYNAME_DEVICE_ID, string)); + } + + // action?: string + if (StringToAniStr(env, want.GetAction(), string)) { + RETURN_NULL_IF_FALSE(CallSetField(env, cls, object, PROPERTYNAME_ACTION, string)); + } + + // entities?: Array + auto entities = want.GetEntities(); + if (entities.size() > 0) { + ani_object aEntities = ConvertAniArrayString(env, entities); + RETURN_NULL_IF_NULL(aEntities); + RETURN_NULL_IF_FALSE(CallSetField(env, cls, object, PROPERTYNAME_ENTITIES, aEntities)); + } + + // moduleName?: string + if (StringToAniStr(env, want.GetElement().GetModuleName(), string)) { + RETURN_NULL_IF_FALSE(CallSetField(env, cls, object, PROPERTYNAME_MODULE_NAME, string)); + } + + return object; } bool CommonFunAni::ParseShortcutInfo(ani_env* env, ani_object object, ShortcutInfo& shortcutInfo) @@ -1439,16 +2673,16 @@ bool CommonFunAni::ParseShortcutInfo(ani_env* env, ani_object object, ShortcutIn shortcutInfo.id = AniStrToString(env, string); // bundleName: string - RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_BUNDLENAME, &string)); + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_BUNDLE_NAME, &string)); shortcutInfo.bundleName = AniStrToString(env, string); // moduleName?: string - if (CallGetterOptional(env, object, PROPERTYNAME_MODULENAME, &string)) { + if (CallGetterOptional(env, object, PROPERTYNAME_MODULE_NAME, &string)) { shortcutInfo.moduleName = AniStrToString(env, string); } // hostAbility?: string - if (CallGetterOptional(env, object, PROPERTYNAME_HOSTABILITY, &string)) { + if (CallGetterOptional(env, object, PROPERTYNAME_HOST_ABILITY, &string)) { shortcutInfo.hostAbility = AniStrToString(env, string); } @@ -1457,8 +2691,8 @@ bool CommonFunAni::ParseShortcutInfo(ani_env* env, ani_object object, ShortcutIn shortcutInfo.icon = AniStrToString(env, string); } - // iconId?: number - if (CallGetterOptional(env, object, PROPERTYNAME_ICONID, &uintValue)) { + // iconId?: long + if (CallGetterOptional(env, object, PROPERTYNAME_ICON_ID, &uintValue)) { shortcutInfo.iconId = uintValue; } @@ -1467,9 +2701,9 @@ bool CommonFunAni::ParseShortcutInfo(ani_env* env, ani_object object, ShortcutIn shortcutInfo.label = AniStrToString(env, string); } - // labelId?: number - if (CallGetterOptional(env, object, PROPERTYNAME_LABELID, &intValue)) { - shortcutInfo.labelId = intValue; + // labelId?: long + if (CallGetterOptional(env, object, PROPERTYNAME_LABEL_ID, &uintValue)) { + shortcutInfo.labelId = uintValue; } // wants?: Array @@ -1478,14 +2712,20 @@ bool CommonFunAni::ParseShortcutInfo(ani_env* env, ani_object object, ShortcutIn RETURN_FALSE_IF_FALSE(ParseAniArray(env, array, shortcutInfo.intents, ParseShortcutIntent)); } - // appIndex: number - RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_APPINDEX, &intValue)); + // appIndex: int + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_APP_INDEX, &intValue)); shortcutInfo.appIndex = intValue; - // sourceType: number - RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_SOURCETYPE, &intValue)); + // sourceType: int + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_SOURCE_TYPE, &intValue)); shortcutInfo.sourceType = intValue; + ani_boolean boolValue = false; + // visible?: boolean + if (CallGetterOptional(env, object, PROPERTYNAME_VISIBLE, &boolValue)) { + shortcutInfo.visible = boolValue; + } + return true; } @@ -1497,16 +2737,16 @@ bool CommonFunAni::ParseShortcutIntent(ani_env* env, ani_object object, Shortcut ani_string string = nullptr; // targetBundle: string - RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_TARGETBUNDLE, &string)); + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_TARGET_BUNDLE, &string)); shortcutIntent.targetBundle = AniStrToString(env, string); // targetModule?: string - if (CallGetterOptional(env, object, PROPERTYNAME_TARGETMODULE, &string)) { + if (CallGetterOptional(env, object, PROPERTYNAME_TARGET_MODULE, &string)) { shortcutIntent.targetModule = AniStrToString(env, string); } // targetAbility: string - RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_TARGETABILITY, &string)); + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_TARGET_ABILITY, &string)); shortcutIntent.targetClass = AniStrToString(env, string); // parameters?: Array @@ -1522,8 +2762,8 @@ bool CommonFunAni::ParseShortcutIntent(ani_env* env, ani_object object, Shortcut return true; } -bool CommonFunAni::ParseKeyValuePairWithName(ani_env* env, ani_object object, - std::pair& pair, const char* keyName, const char* valueName) +bool CommonFunAni::ParseKeyValuePairWithName(ani_env* env, ani_object object, std::pair& pair, + const char* keyName, const char* valueName) { RETURN_FALSE_IF_NULL(env); RETURN_FALSE_IF_NULL(object); @@ -1545,5 +2785,266 @@ bool CommonFunAni::ParseKeyValuePair(ani_env* env, ani_object object, std::pair< { return ParseKeyValuePairWithName(env, object, pair, PROPERTYNAME_KEY, PROPERTYNAME_VALUE); } + +bool CommonFunAni::ParseHashParams(ani_env* env, ani_object object, std::pair& pair) +{ + return ParseKeyValuePairWithName(env, object, pair, PROPERTYNAME_MODULE_NAME, PROPERTYNAME_HASH_VALUE); +} + +bool CommonFunAni::ParsePgoParams(ani_env* env, ani_object object, std::pair& pair) +{ + return ParseKeyValuePairWithName(env, object, pair, PROPERTYNAME_MODULE_NAME, PROPERTYNAME_PGO_FILE_PATH); +} + +bool CommonFunAni::ParseInstallParam(ani_env* env, ani_object object, InstallParam& installParam) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_array array = nullptr; + // hashParams? + if (CallGetterOptional(env, object, PROPERTYNAME_HASH_PARAMS, &array)) { + std::vector> hashParams; + RETURN_FALSE_IF_FALSE(ParseAniArray(env, array, hashParams, ParseHashParams)); + for (const auto& parameter : hashParams) { + if (parameter.first.empty() || parameter.second.empty()) { + APP_LOGE("key or value is empty"); + return false; + } + if (installParam.hashParams.find(parameter.first) != installParam.hashParams.end()) { + APP_LOGE("duplicate key found"); + return false; + } + installParam.hashParams[parameter.first] = parameter.second; + } + } + + // parameters? + if (CallGetterOptional(env, object, PROPERTYNAME_PARAMETERS, &array)) { + std::vector> parameters; + RETURN_FALSE_IF_FALSE(ParseAniArray(env, array, parameters, ParseKeyValuePair)); + for (const auto& parameter : parameters) { + installParam.parameters[parameter.first] = parameter.second; + } + } + + // pgoParams? + if (CallGetterOptional(env, object, PROPERTYNAME_PGO_PARAMS, &array)) { + std::vector> pgoParams; + RETURN_FALSE_IF_FALSE(ParseAniArray(env, array, pgoParams, ParsePgoParams)); + for (const auto& parameter : pgoParams) { + if (parameter.first.empty() || parameter.second.empty()) { + APP_LOGE("key or value is empty"); + return false; + } + installParam.pgoParams[parameter.first] = parameter.second; + } + } + + ani_int intValue = 0; + // userId?: int + if (CallGetterOptional(env, object, PROPERTYNAME_USER_ID, &intValue)) { + installParam.userId = intValue; + } else { + APP_LOGW("Parse userId failed,using default value"); + } + // installFlag?: int + if (CallGetterOptional(env, object, PROPERTYNAME_INSTALL_FLAG, &intValue)) { + if ((intValue != static_cast(OHOS::AppExecFwk::InstallFlag::NORMAL)) && + (intValue != static_cast(OHOS::AppExecFwk::InstallFlag::REPLACE_EXISTING)) && + (intValue != static_cast(OHOS::AppExecFwk::InstallFlag::FREE_INSTALL))) { + APP_LOGE("invalid installFlag param"); + } else { + installParam.installFlag = static_cast(intValue); + } + } else { + APP_LOGW("Parse installFlag failed,using default value"); + } + + ani_boolean boolValue = false; + // isKeepData?: boolean + if (CallGetterOptional(env, object, PROPERTYNAME_IS_KEEP_DATA, &boolValue)) { + installParam.isKeepData = boolValue; + } else { + APP_LOGW("Parse isKeepData failed,using default value"); + } + + ani_long longValue = 0; + // crowdtestDeadline?: long + if (CallGetterOptional(env, object, PROPERTYNAME_CROWD_TEST_DEADLINE, &longValue)) { + installParam.crowdtestDeadline = longValue; + } else { + APP_LOGW("Parse crowdtestDeadline failed,using default value"); + } + + // sharedBundleDirPaths?: Array + if (CallGetterOptional(env, object, PROPERTYNAME_SHARED_BUNDLE_DIR_PATHS, &array)) { + RETURN_FALSE_IF_FALSE(ParseStrArray(env, array, installParam.sharedBundleDirPaths)); + } + + ani_string string = nullptr; + + // specifiedDistributionType?: string + if (CallGetterOptional(env, object, PROPERTYNAME_SPECIFIED_DISTRIBUTION_TYPE, &string)) { + installParam.specifiedDistributionType = AniStrToString(env, string); + } else { + APP_LOGW("Parse specifiedDistributionType failed,using default value"); + } + + // additionalInfo?: string + if (CallGetterOptional(env, object, PROPERTYNAME_ADDITIONAL_INFO, &string)) { + installParam.additionalInfo = AniStrToString(env, string); + } else { + APP_LOGW("Parse additionalInfo failed,using default value"); + } + return true; +} + +bool CommonFunAni::ParseUninstallParam(ani_env* env, ani_object object, UninstallParam& uninstallParam) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + ani_string string = nullptr; + // bundleName: string + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_BUNDLE_NAME, &string)); + uninstallParam.bundleName = AniStrToString(env, string); + ani_int intValue = 0; + // versionCode?: int + if (CallGetterOptional(env, object, PROPERTYNAME_VERSION_CODE, &intValue)) { + uninstallParam.versionCode = intValue; + } else { + APP_LOGW("Parse crowdtestDeadline failed,using default value"); + } + return true; +} + +bool CommonFunAni::ParseDestroyAppCloneParam( + ani_env* env, ani_object object, DestroyAppCloneParam& destroyAppCloneParam) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + ani_int intValue = 0; + // userId?: int + if (CallGetterOptional(env, object, PROPERTYNAME_USER_ID, &intValue)) { + destroyAppCloneParam.userId = intValue; + } else { + destroyAppCloneParam.userId = Constants::UNSPECIFIED_USERID; + APP_LOGW("Parse userId failed,using default value"); + } + ani_array array = nullptr; + // parameters? + if (CallGetterOptional(env, object, PROPERTYNAME_PARAMETERS, &array)) { + std::vector> parameters; + RETURN_FALSE_IF_FALSE(ParseAniArray(env, array, parameters, ParseKeyValuePair)); + for (const auto& parameter : parameters) { + destroyAppCloneParam.parameters[parameter.first] = parameter.second; + } + } + return true; +} + +bool CommonFunAni::ParsePluginParam(ani_env* env, ani_object object, InstallPluginParam& installPluginParam) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_int intValue = 0; + ani_array array = nullptr; + + // userId?: int + if (CallGetterOptional(env, object, PROPERTYNAME_USER_ID, &intValue)) { + installPluginParam.userId = intValue; + } else { + installPluginParam.userId = Constants::UNSPECIFIED_USERID; + APP_LOGW("Parse userId failed, using default value"); + } + + // parameters? + if (CallGetterOptional(env, object, PROPERTYNAME_PARAMETERS, &array)) { + std::vector> parameters; + RETURN_FALSE_IF_FALSE(ParseAniArray(env, array, parameters, ParseKeyValuePair)); + for (const auto& parameter : parameters) { + installPluginParam.parameters[parameter.first] = parameter.second; + } + } + + return true; +} + +bool CommonFunAni::ParseCreateAppCloneParam(ani_env* env, ani_object object, int32_t& userId, int32_t& appIdx) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + ani_int intValue = 0; + // userId?: int + if (CallGetterOptional(env, object, PROPERTYNAME_USER_ID, &intValue)) { + userId = intValue; + } else { + userId = Constants::UNSPECIFIED_USERID; + APP_LOGW("Parse userId failed,using default value"); + } + + // appIdx?: int + if (CallGetterOptional(env, object, PROPERTYNAME_APP_INDEX, &intValue)) { + appIdx = intValue; + if (appIdx == 0) { + APP_LOGI("parse appIndex success, but appIndex is 0, assign a value: %{public}d", ILLEGAL_APP_INDEX); + appIdx = ILLEGAL_APP_INDEX; + } + } else { + appIdx = Constants::INITIAL_APP_INDEX; + APP_LOGW("Parse appIdx failed,using default value"); + } + return true; +} + +bool CommonFunAni::ParseAbilityInfo(ani_env* env, ani_object object, AbilityInfo& abilityInfo) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_string string = nullptr; + // bundleName: string + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_BUNDLE_NAME, &string)); + abilityInfo.bundleName = AniStrToString(env, string); + + // moduleName: string + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_MODULE_NAME, &string)); + abilityInfo.moduleName = AniStrToString(env, string); + + // name: string + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_NAME, &string)); + abilityInfo.name = AniStrToString(env, string); + + return true; +} + +bool CommonFunAni::ParseElementName(ani_env* env, ani_object object, ElementName& elementName) +{ + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_string string = nullptr; + + // deviceId?: string + if (CallGetterOptional(env, object, PROPERTYNAME_DEVICE_ID, &string)) { + elementName.SetDeviceID(AniStrToString(env, string)); + } + + // bundleName: string + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_BUNDLE_NAME, &string)); + elementName.SetBundleName(AniStrToString(env, string)); + + // moduleName?: string + if (CallGetterOptional(env, object, PROPERTYNAME_MODULE_NAME, &string)) { + elementName.SetModuleName(AniStrToString(env, string)); + } + + // abilityName: string + RETURN_FALSE_IF_FALSE(CallGetter(env, object, PROPERTYNAME_ABILITY_NAME, &string)); + elementName.SetAbilityName(AniStrToString(env, string)); + + return true; +} } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/common/common_fun_ani.h b/interfaces/kits/ani/common/common_fun_ani.h index 3c320c7cbe3b33b81cf4eabe0fc5d7dd7e6b3d8c..c32848c0d56dfdd90c097cecce87f014a19d2783 100644 --- a/interfaces/kits/ani/common/common_fun_ani.h +++ b/interfaces/kits/ani/common/common_fun_ani.h @@ -26,10 +26,17 @@ #include "app_log_wrapper.h" #include "bundle_mgr_interface.h" #include "bundle_resource_info.h" +#include "clone_param.h" #include "enum_util.h" +#include "install_param.h" +#include "launcher_ability_info.h" namespace OHOS { namespace AppExecFwk { +using Want = OHOS::AAFwk::Want; +namespace CommonFunAniNS { +constexpr const char* PROPERTYNAME_UNBOXED = "unboxed"; +} // namespace CommonFunAniNS #define RETURN_IF_NULL(ptr) \ do { \ @@ -73,6 +80,15 @@ namespace AppExecFwk { return res; \ } \ } while (0) +namespace CommonFunAniNS { +constexpr const char* CLASSNAME_BOOLEAN = "std.core.Boolean"; +constexpr const char* CLASSNAME_INT = "std.core.Int"; +constexpr const char* CLASSNAME_LONG = "std.core.Long"; +constexpr const char* CLASSNAME_DOUBLE = "std.core.Double"; +constexpr const char* CLASSNAME_OBJECT = "std.core.Object"; +constexpr const char* CLASSNAME_ARRAY = "escompat.Array"; +constexpr const char* CLASSNAME_STRING = "std.core.String"; +} // namespace CommonFunAniNS class CommonFunAni { public: // Data conversion. @@ -118,14 +134,12 @@ public: static ani_object ConvertSignatureInfo(ani_env* env, const SignatureInfo& signatureInfo); static ani_object ConvertKeyValuePair( - ani_env* env, const std::pair& item, const char* className); + ani_env* env, const std::pair& item, const std::string& className); static ani_object ConvertDataItem(ani_env* env, const std::pair& item); static ani_object ConvertRouterItem(ani_env* env, const RouterItem& routerItem); static ani_object ConvertElementName(ani_env* env, const ElementName& elementName); - static ani_object ConvertCustomizeData(ani_env* env, const CustomizeData& customizeData); - static ani_object ConvertAbilitySkillUriInner(ani_env* env, const SkillUri& skillUri, bool isExtension); static inline ani_object ConvertAbilitySkillUri(ani_env* env, const SkillUri& skillUri) { @@ -145,14 +159,53 @@ public: return ConvertAbilitySkillInner(env, skill, true); } static ani_object ConvertBundleInfo(ani_env* env, const BundleInfo& bundleInfo, int32_t flags); - - static ani_object ConvertBundleResourceInfo(ani_env* env, const BundleResourceInfo& bundleResInfo); + static ani_object ConvertDefaultAppAbilityInfo(ani_env* env, const AbilityInfo& abilityInfo); + static ani_object ConvertDefaultAppExtensionInfo(ani_env* env, const ExtensionAbilityInfo& extensionInfo); + static ani_object ConvertDefaultAppHapModuleInfo(ani_env* env, const BundleInfo &bundleInfo); + static ani_object ConvertDefaultAppBundleInfo(ani_env* env, const BundleInfo &bundleInfo); + + static ani_object ConvertAppCloneIdentity(ani_env* env, const std::string& bundleName, const int32_t appIndex); + static ani_object ConvertPermissionDef(ani_env* env, const PermissionDef& permissionDef); + static ani_object ConvertSharedBundleInfo(ani_env* env, const SharedBundleInfo& sharedBundleInfo); + static ani_object ConvertSharedModuleInfo(ani_env* env, const SharedModuleInfo& sharedModuleInfo); + static ani_object ConvertAppProvisionInfo(ani_env* env, const AppProvisionInfo& appProvisionInfo); + static ani_object ConvertValidity(ani_env* env, const Validity& validity); + static ani_object ConvertRecoverableApplicationInfo( + ani_env* env, const RecoverableApplicationInfo& recoverableApplicationInfo); + static ani_object ConvertPreinstalledApplicationInfo( + ani_env* env, const PreinstalledApplicationInfo& reinstalledApplicationInfo); + static ani_object ConvertPluginBundleInfo(ani_env* env, const PluginBundleInfo& pluginBundleInfo); + static ani_object ConvertPluginModuleInfo(ani_env* env, const PluginModuleInfo& pluginModuleInfo); static ani_object ConvertShortcutInfo(ani_env* env, const ShortcutInfo& shortcutInfo); static ani_object ConvertShortcutIntent(ani_env* env, const ShortcutIntent& shortcutIntent); static ani_object ConvertShortcutIntentParameter(ani_env* env, const std::pair& item); + static ani_object ConvertLauncherAbilityInfo(ani_env* env, const LauncherAbilityInfo& launcherAbility); + + static ani_object ConvertOverlayModuleInfo(ani_env* env, const OverlayModuleInfo& overlayModuleInfo); + + static ani_object CreateBundleChangedInfo( + ani_env* env, const std::string& bundleName, int32_t userId, int32_t appIndex); + static ani_object ConvertVersion(ani_env* env, const Version& version); + static ani_object ConvertPackageApp(ani_env* env, const PackageApp& packageApp); + static ani_object ConvertAbilityFormInfo(ani_env* env, const AbilityFormInfo& abilityFormInfo); + static ani_object ConvertModuleAbilityInfo(ani_env* env, const ModuleAbilityInfo& moduleAbilityInfo); + static ani_object ConvertModuleDistro(ani_env* env, const ModuleDistro& moduleDistro); + static ani_object ConvertApiVersion(ani_env* env, const ApiVersion& apiVersion); + static ani_object ConvertExtensionAbilities(ani_env* env, const ExtensionAbilities& extensionAbilities); + static ani_object ConvertPackageModule(ani_env* env, const PackageModule& packageModule); + static ani_object ConvertSummary(ani_env* env, const Summary& summary, bool withApp); + static ani_object ConvertPackages(ani_env* env, const Packages& packages); + static ani_object ConvertBundlePackInfo(ani_env* env, const BundlePackInfo& bundlePackInfo, const uint32_t flag); + static ani_object ConvertDynamicIconInfo(ani_env* env, const DynamicIconInfo& dynamicIconInfo); + static ani_object CreateDispatchInfo( + ani_env* env, const std::string& version, const std::string& dispatchAPIVersion); + + static ani_object ConvertWantInfo(ani_env* env, const Want& want); + // Parse from ets to native + static bool ParseBundleOptions(ani_env* env, ani_object object, int32_t& appIndex, int32_t& userId); static bool ParseShortcutInfo(ani_env* env, ani_object object, ShortcutInfo& shortcutInfo); static bool ParseShortcutIntent(ani_env* env, ani_object object, ShortcutIntent& shortcutIntent); static bool ParseKeyValuePair(ani_env* env, ani_object object, std::pair& pair); @@ -160,7 +213,9 @@ public: const char* keyName, const char* valueName); static ani_class CreateClassByName(ani_env* env, const std::string& className); - static ani_object CreateNewObjectByClass(ani_env* env, ani_class cls); + static ani_object CreateNewObjectByClass(ani_env* env, const std::string& className, ani_class cls); + static ani_object CreateNewObjectByClassV2( + ani_env* env, const std::string& className, const std::string& ctorSig, const ani_value* args); static inline ani_object ConvertAniArrayString(ani_env* env, const std::vector& strings) { return ConvertAniArray(env, strings, [](ani_env* env, const std::string& nativeStr) { @@ -175,25 +230,43 @@ public: return true; }); } - - template - static bool TryCastDoubleTo(const double fromValue, toType* toValue) + template + static inline bool ParseEnumArray(ani_env* env, ani_object arrayObj, std::vector& enums) + { + return ParseAniArray(env, arrayObj, enums, [](ani_env* env, ani_object aniItem, enumType& nativeItem) { + return EnumUtils::EnumETSToNative(env, reinterpret_cast(aniItem), nativeItem); + }); + } + static bool ParseInstallParam(ani_env* env, ani_object object, InstallParam& installParam); + static bool ParseHashParams(ani_env* env, ani_object object, std::pair& pair); + static bool ParsePgoParams(ani_env* env, ani_object object, std::pair& pair); + static bool ParseUninstallParam(ani_env* env, ani_object object, UninstallParam& uninstallParam); + static bool ParseCreateAppCloneParam(ani_env* env, ani_object object, int32_t& userId, int32_t& appIdx); + static bool ParseDestroyAppCloneParam(ani_env* env, ani_object object, DestroyAppCloneParam& destroyAppCloneParam); + static bool ParsePluginParam(ani_env* env, ani_object object, InstallPluginParam& installPluginParam); + static bool ParseAbilityInfo(ani_env* env, ani_object object, AbilityInfo& abilityInfo); + static bool ParseElementName(ani_env* env, ani_object object, ElementName& elementName); + + template + static bool TryCastTo(const fromType fromValue, toType* toValue) { RETURN_FALSE_IF_NULL(toValue); - if (std::isnan(fromValue)) { - APP_LOGE("value is NaN"); - return false; - } - if (std::isinf(fromValue)) { - APP_LOGE("value is Inf"); - return false; + if constexpr (!std::is_integral_v) { + if (std::isnan(fromValue)) { + APP_LOGE("value is NaN"); + return false; + } + if (std::isinf(fromValue)) { + APP_LOGE("value is Inf"); + return false; + } } - if (fromValue > static_cast(std::numeric_limits::max())) { + if (fromValue > static_cast(std::numeric_limits::max())) { APP_LOGE("value too large"); return false; } - if (fromValue < static_cast(std::numeric_limits::lowest())) { + if (fromValue < static_cast(std::numeric_limits::lowest())) { APP_LOGE("value too small"); return false; } @@ -209,35 +282,20 @@ public: RETURN_NULL_IF_NULL(env); RETURN_NULL_IF_NULL(converter); - ani_class arrayCls = nullptr; - ani_status status = env->FindClass("Lescompat/Array;", &arrayCls); - if (status != ANI_OK) { - APP_LOGE("FindClass failed %{public}d", status); - return nullptr; - } + ani_int length = static_cast(cArray.size()); + ani_value arg = { .i = length }; + ani_object arrayObj = CreateNewObjectByClassV2(env, CommonFunAniNS::CLASSNAME_ARRAY, "i:", &arg); + RETURN_NULL_IF_NULL(arrayObj); - ani_method arrayCtor; - status = env->Class_FindMethod(arrayCls, "", "I:V", &arrayCtor); - if (status != ANI_OK) { - APP_LOGE("Class_FindMethod failed %{public}d", status); - return nullptr; - } - - ani_object arrayObj; - ani_size length = cArray.size(); - status = env->Object_New(arrayCls, arrayCtor, &arrayObj, length); - if (status != ANI_OK) { - APP_LOGE("Object_New failed %{public}d", status); - return nullptr; - } + ani_status status = ANI_OK; if (length > 0) { - for (ani_size i = 0; i < length; ++i) { + for (ani_int i = 0; i < length; ++i) { ani_enum_item item = converter(env, static_cast(cArray[i])); if (item == nullptr) { APP_LOGE("convert failed"); return nullptr; } - status = env->Object_CallMethodByName_Void(arrayObj, "$_set", "ILstd/core/Object;:V", i, item); + status = env->Object_CallMethodByName_Void(arrayObj, "$_set", "iC{std.core.Object}:", i, item); env->Reference_Delete(item); if (status != ANI_OK) { APP_LOGE("Object_CallMethodByName_Void failed %{public}d", status); @@ -256,33 +314,17 @@ public: RETURN_NULL_IF_NULL(env); RETURN_NULL_IF_NULL(converter); - ani_class arrayCls = nullptr; - ani_status status = env->FindClass("Lescompat/Array;", &arrayCls); - if (status != ANI_OK) { - APP_LOGE("FindClass failed %{public}d", status); - return nullptr; - } - - ani_method arrayCtor; - status = env->Class_FindMethod(arrayCls, "", "I:V", &arrayCtor); - if (status != ANI_OK) { - APP_LOGE("Class_FindMethod failed %{public}d", status); - return nullptr; - } - ani_size length = nativeArray.size(); - ani_object arrayObj; - status = env->Object_New(arrayCls, arrayCtor, &arrayObj, length); - if (status != ANI_OK) { - APP_LOGE("Object_New failed %{public}d", status); - return nullptr; - } + ani_value arg = { .i = static_cast(length) }; + ani_object arrayObj = CreateNewObjectByClassV2(env, CommonFunAniNS::CLASSNAME_ARRAY, "i:", &arg); + RETURN_NULL_IF_NULL(arrayObj); - ani_size i = 0; + ani_status status = ANI_OK; + ani_int i = 0; for (const auto& iter : nativeArray) { ani_object item = converter(env, iter, std::forward(args)...); RETURN_NULL_IF_NULL(item); - status = env->Object_CallMethodByName_Void(arrayObj, "$_set", "ILstd/core/Object;:V", i, item); + status = env->Object_CallMethodByName_Void(arrayObj, "$_set", "iC{std.core.Object}:", i, item); env->Reference_Delete(item); if (status != ANI_OK) { APP_LOGE("Object_CallMethodByName_Void failed %{public}d", status); @@ -300,15 +342,15 @@ public: RETURN_FALSE_IF_NULL(env); RETURN_FALSE_IF_NULL(aniArray); - ani_double length; - ani_status status = env->Object_GetPropertyByName_Double(aniArray, "length", &length); + ani_size length = 0; + ani_status status = env->Array_GetLength(reinterpret_cast(aniArray), &length); if (status != ANI_OK) { - APP_LOGE("Object_GetPropertyByName_Double failed %{public}d", status); + APP_LOGE("Array_GetLength failed %{public}d", status); return false; } for (ani_int i = 0; i < static_cast(length); ++i) { ani_ref ref; - status = env->Object_CallMethodByName_Ref(aniArray, "$_get", "I:Lstd/core/Object;", &ref, i); + status = env->Object_CallMethodByName_Ref(aniArray, "$_get", "i:C{std.core.Object}", &ref, i); if (status != ANI_OK) { APP_LOGE("Object_CallMethodByName_Ref failed %{public}d", status); return false; @@ -353,21 +395,41 @@ public: status = env->Object_GetPropertyByName_Ref(object, propertyName, reinterpret_cast(value)); } else if constexpr (std::is_same_v) { status = env->Object_GetPropertyByName_Boolean(object, propertyName, value); - } else if constexpr (std::is_same_v) { - status = env->Object_GetPropertyByName_Char(object, propertyName, value); - } else if constexpr (std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v) { - // uint64_t -> BigInt later + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v) { + ani_int i = 0; + status = env->Object_GetPropertyByName_Int(object, propertyName, &i); + if (status != ANI_OK) { + APP_LOGE("Object_GetPropertyByName %{public}s failed %{public}d", propertyName, status); + return false; + } + if (!TryCastTo(i, value)) { + APP_LOGE("TryCastTo %{public}s failed", propertyName); + return false; + } + return true; + } else if constexpr (std::is_same_v || std::is_same_v) { + ani_long l = 0; + status = env->Object_GetPropertyByName_Long(object, propertyName, &l); + if (status != ANI_OK) { + APP_LOGE("Object_GetPropertyByName %{public}s failed %{public}d", propertyName, status); + return false; + } + if (!TryCastTo(l, value)) { + APP_LOGE("TryCastTo %{public}s failed", propertyName); + return false; + } + return true; + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v) { double d = 0; status = env->Object_GetPropertyByName_Double(object, propertyName, &d); if (status != ANI_OK) { APP_LOGE("Object_GetPropertyByName %{public}s failed %{public}d", propertyName, status); return false; } - if (!TryCastDoubleTo(d, value)) { - APP_LOGE("TryCastDoubleTo %{public}s failed", propertyName); + if (!TryCastTo(d, value)) { + APP_LOGE("TryCastTo %{public}s failed", propertyName); return false; } return true; @@ -413,24 +475,45 @@ public: status = ANI_ERROR; if constexpr (std::is_same_v) { status = env->Object_CallMethodByName_Boolean( - reinterpret_cast(ref), "unboxed", ":Z", value); - } else if constexpr (std::is_same_v) { - status = - env->Object_CallMethodByName_Char(reinterpret_cast(ref), "unboxed", ":C", value); - } else if constexpr (std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || - std::is_same_v || std::is_same_v) { + reinterpret_cast(ref), CommonFunAniNS::PROPERTYNAME_UNBOXED, ":z", value); + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v) { + ani_int i = 0; + status = env->Object_CallMethodByName_Int( + reinterpret_cast(ref), CommonFunAniNS::PROPERTYNAME_UNBOXED, ":i", &i); + if (status != ANI_OK) { + APP_LOGE("Object_CallMethodByName_Int %{public}s failed %{public}d", propertyName, status); + return false; + } + if (!TryCastTo(i, value)) { + APP_LOGE("TryCastTo %{public}s failed", propertyName); + return false; + } + return true; + } else if constexpr (std::is_same_v || std::is_same_v) { + ani_long l = 0; + status = env->Object_CallMethodByName_Long( + reinterpret_cast(ref), CommonFunAniNS::PROPERTYNAME_UNBOXED, ":l", &l); + if (status != ANI_OK) { + APP_LOGE("Object_CallMethodByName_Long %{public}s failed %{public}d", propertyName, status); + return false; + } + if (!TryCastTo(l, value)) { + APP_LOGE("TryCastTo %{public}s failed", propertyName); + return false; + } + return true; + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v) { double d = 0; - status = - env->Object_CallMethodByName_Double(reinterpret_cast(ref), "doubleValue", nullptr, &d); + status = env->Object_CallMethodByName_Double( + reinterpret_cast(ref), CommonFunAniNS::PROPERTYNAME_UNBOXED, ":d", &d); if (status != ANI_OK) { - APP_LOGE("Object_GetPropertyByName %{public}s failed %{public}d", propertyName, status); + APP_LOGE("Object_CallMethodByName_Double %{public}s failed %{public}d", propertyName, status); return false; } - *value = static_cast(d); - if (!TryCastDoubleTo(d, value)) { - APP_LOGE("TryCastDoubleTo %{public}s failed", propertyName); + if (!TryCastTo(d, value)) { + APP_LOGE("TryCastTo %{public}s failed", propertyName); return false; } return true; @@ -448,134 +531,185 @@ public: } template - static bool CallSetter(ani_env* env, ani_class cls, ani_object object, const char* propertyName, valueType value) + static bool CallGetFieldOptional(ani_env *env, ani_object object, const char *name, valueType* value) { RETURN_FALSE_IF_NULL(env); - RETURN_FALSE_IF_NULL(cls); RETURN_FALSE_IF_NULL(object); - std::string setterName(""); - setterName.append(propertyName); - ani_method setter; - ani_status status = env->Class_FindMethod(cls, setterName.c_str(), nullptr, &setter); + ani_ref ref = nullptr; + ani_status status = env->Object_GetFieldByName_Ref(object, name, &ref); if (status != ANI_OK) { - APP_LOGE("Class_FindMethod %{public}s failed %{public}d", propertyName, status); + APP_LOGE("Class_FindField %{public}s failed %{public}d", name, status); return false; } - if constexpr (std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || - std::is_same_v || std::is_same_v) { - status = env->Object_CallMethod_Void(object, setter, static_cast(value)); - } else { - status = env->Object_CallMethod_Void(object, setter, value); - } - + ani_boolean isUndefined; + status = env->Reference_IsUndefined(ref, &isUndefined); if (status != ANI_OK) { - APP_LOGE("Object_CallMethod_Void %{public}s failed %{public}d", propertyName, status); + APP_LOGE("Reference_IsUndefined %{public}s failed %{public}d", name, status); + return false; + } + if (isUndefined) { return false; } + if constexpr (std::is_pointer_v && std::is_base_of_v<__ani_ref, std::remove_pointer_t>) { + *value = reinterpret_cast(ref); + } else { + status = ANI_ERROR; + if constexpr (std::is_same_v) { + ani_int i = 0; + status = env->Object_CallMethodByName_Int( + reinterpret_cast(ref), CommonFunAniNS::PROPERTYNAME_UNBOXED, ":I", &i); + if (status != ANI_OK) { + APP_LOGE("Object_CallMethodByName_Int %{public}s failed %{public}d", name, status); + return false; + } + if (!TryCastTo(i, value)) { + APP_LOGE("TryCastTo %{public}s failed", name); + return false; + } + return true; + } else { + APP_LOGE("Object_CallMethodByName %{public}s Unsupported", name); + return false; + } + } + return true; } - // sets property to null - static bool CallSetterNull(ani_env* env, ani_class cls, ani_object object, const char* propertyName) + template + static bool CallSetField(ani_env *env, ani_class cls, ani_object object, const char *name, valueType* value) { RETURN_FALSE_IF_NULL(env); RETURN_FALSE_IF_NULL(cls); - RETURN_FALSE_IF_NULL(object); - ani_ref nullRef = nullptr; - ani_status status = env->GetNull(&nullRef); + ani_field field = nullptr; + ani_status status = env->Class_FindField(cls, name, &field); if (status != ANI_OK) { - APP_LOGE("GetNull %{public}s failed %{public}d", propertyName, status); + APP_LOGE("Class_FindField %{public}s failed %{public}d", name, status); return false; } - - return CallSetter(env, cls, object, propertyName, nullRef); - } - - // sets optional property to undefined - static bool CallSetterOptionalUndefined(ani_env* env, ani_class cls, ani_object object, const char* propertyName) - { - RETURN_FALSE_IF_NULL(env); - RETURN_FALSE_IF_NULL(cls); - RETURN_FALSE_IF_NULL(object); - - ani_ref undefined = nullptr; - ani_status status = env->GetUndefined(&undefined); + status = env->Object_SetField_Ref(object, field, value); if (status != ANI_OK) { - APP_LOGE("GetUndefined %{public}s failed %{public}d", propertyName, status); + APP_LOGE("Object_SetField_Ref %{public}s failed %{public}d", name, status); return false; } - - return CallSetter(env, cls, object, propertyName, undefined); + return true; } template - static bool CallSetterOptional( - ani_env* env, ani_class cls, ani_object object, const char* propertyName, valueType value) + static bool CallSetter(ani_env* env, ani_class cls, ani_object object, const char* propertyName, valueType value, + const char* valueClassName = nullptr) { RETURN_FALSE_IF_NULL(env); RETURN_FALSE_IF_NULL(cls); RETURN_FALSE_IF_NULL(object); - if constexpr (std::is_pointer_v && std::is_base_of_v<__ani_ref, std::remove_pointer_t>) { - return CallSetter(env, cls, object, propertyName, value); - } - - const char* valueClassName = nullptr; - const char* ctorSig = nullptr; + std::string setterSig; + ani_value setterParam { }; if constexpr (std::is_same_v) { - valueClassName = "Lstd/core/Boolean;"; - ctorSig = "Z:V"; - } else if constexpr (std::is_same_v) { - valueClassName = "Lstd/core/Char;"; - ctorSig = "C:V"; - } else if constexpr (std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || - std::is_same_v || std::is_same_v) { - valueClassName = "Lstd/core/Double;"; - ctorSig = "D:V"; + setterSig = "z:"; + setterParam.z = value; + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v) { + setterSig = "i:"; + setterParam.i = static_cast(value); + } else if constexpr (std::is_same_v || std::is_same_v) { + setterSig = "l:"; + setterParam.l = static_cast(value); + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v) { + setterSig = "d:"; + setterParam.d = static_cast(value); + } else if constexpr (std::is_pointer_v && + std::is_base_of_v<__ani_ref, std::remove_pointer_t>) { + if constexpr (std::is_same_v) { + valueClassName = CommonFunAniNS::CLASSNAME_STRING; + } + if (valueClassName != nullptr) { + setterSig.append("C{"); + setterSig.append(valueClassName); + setterSig.append("}:"); + } + setterParam.r = value; } else { APP_LOGE("Classname %{public}s Unsupported", propertyName); return false; } - ani_class valueClass = nullptr; - ani_status status = env->FindClass(valueClassName, &valueClass); + std::string setterName(""); + setterName.append(propertyName); + ani_method setter; + ani_status status = + env->Class_FindMethod(cls, setterName.c_str(), setterSig.empty() ? nullptr : setterSig.c_str(), &setter); if (status != ANI_OK) { - APP_LOGE("FindClass %{public}s %{public}s failed %{public}d", propertyName, valueClassName, status); + APP_LOGE("Class_FindMethod %{public}s failed %{public}d", propertyName, status); return false; } - ani_method ctor = nullptr; - status = env->Class_FindMethod(valueClass, "", ctorSig, &ctor); + status = env->Object_CallMethod_Void_A(object, setter, &setterParam); if (status != ANI_OK) { - APP_LOGE("Class_FindMethod %{public}s failed %{public}d", propertyName, status); + APP_LOGE("Object_CallMethod_Void_A %{public}s failed %{public}d", propertyName, status); return false; } - ani_object valueObj = nullptr; - if constexpr (std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || - std::is_same_v || std::is_same_v) { - status = env->Object_New(valueClass, ctor, &valueObj, static_cast(value)); + return true; + } + + template + static ani_object BoxValue(ani_env* env, valueType value, const char** pValueClassName = nullptr) + { + RETURN_NULL_IF_NULL(env); + + const char* valueClassName = nullptr; + std::string ctorSig; + ani_value ctorParam { }; + if constexpr (std::is_same_v) { + valueClassName = CommonFunAniNS::CLASSNAME_BOOLEAN; + ctorSig = "z:"; + ctorParam.z = value; + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v) { + valueClassName = CommonFunAniNS::CLASSNAME_INT; + ctorSig = "i:"; + ctorParam.i = static_cast(value); + } else if constexpr (std::is_same_v || std::is_same_v) { + valueClassName = CommonFunAniNS::CLASSNAME_LONG; + ctorSig = "l:"; + ctorParam.l = static_cast(value); + } else if constexpr (std::is_same_v || std::is_same_v || + std::is_same_v) { + valueClassName = CommonFunAniNS::CLASSNAME_DOUBLE; + ctorSig = "d:"; + ctorParam.d = static_cast(value); } else { - APP_LOGE("Classname %{public}s Unsupported", propertyName); - return false; + APP_LOGE("Type Unsupported"); + return nullptr; + } + if (pValueClassName != nullptr) { + *pValueClassName = valueClassName; } + ani_class valueClass = CreateClassByName(env, valueClassName); + RETURN_NULL_IF_NULL(valueClass); + + ani_method ctor = nullptr; + ani_status status = env->Class_FindMethod(valueClass, "", ctorSig.c_str(), &ctor); if (status != ANI_OK) { - APP_LOGE("Object_New %{public}s failed %{public}d", propertyName, status); - return false; + APP_LOGE("Class_FindMethod failed %{public}d", status); + return nullptr; + } + + ani_object valueObj = nullptr; + status = env->Object_New_A(valueClass, ctor, &valueObj, &ctorParam); + if (status != ANI_OK) { + APP_LOGE("Object_New failed %{public}d", status); + return nullptr; } - return CallSetter(env, cls, object, propertyName, valueObj); + return valueObj; } }; } // namespace AppExecFwk diff --git a/interfaces/kits/ani/common/enum_util.h b/interfaces/kits/ani/common/enum_util.h index 165b00ba3f48664d523d4e544fecb6a085c58dca..90affd7d7cc9eaf4564a5dc165a969319cd357b4 100644 --- a/interfaces/kits/ani/common/enum_util.h +++ b/interfaces/kits/ani/common/enum_util.h @@ -25,29 +25,39 @@ namespace OHOS { namespace AppExecFwk { namespace CommonFunAniNS { -constexpr const char* CLASSNAME_BUNDLEMANAGER_BUNDLE_FLAG = "L@ohos/bundle/bundleManager/bundleManager/BundleFlag;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_BUNDLE_TYPE = "L@ohos/bundle/bundleManager/bundleManager/BundleType;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_MULTIAPPMODE_TYPE = - "L@ohos/bundle/bundleManager/bundleManager/MultiAppModeType;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_DISPLAYORIENTATION = - "L@ohos/bundle/bundleManager/bundleManager/DisplayOrientation;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_LAUNCH_TYPE = "L@ohos/bundle/bundleManager/bundleManager/LaunchType;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_SUPPORTWINDOWMODE = - "L@ohos/bundle/bundleManager/bundleManager/SupportWindowMode;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_EXTENSIONABILITY_TYPE = - "L@ohos/bundle/bundleManager/bundleManager/ExtensionAbilityType;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_MODULE_TYPE = "L@ohos/bundle/bundleManager/bundleManager/ModuleType;"; -constexpr const char* CLASSNAME_BUNDLEMANAGER_PERMISSIONGRANTSTATE = - "L@ohos/bundle/bundleManager/bundleManager/PermissionGrantState;"; +constexpr int32_t UNSPECIFIED = 255; + +constexpr const char* CLASSNAME_BUNDLEMANAGER_BUNDLE_FLAG = "@ohos.bundle.bundleManager.bundleManager.BundleFlag"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_BUNDLE_TYPE = "@ohos.bundle.bundleManager.bundleManager.BundleType"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_MULTI_APP_MODE_TYPE = + "@ohos.bundle.bundleManager.bundleManager.MultiAppModeType"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_DISPLAY_ORIENTATION = + "@ohos.bundle.bundleManager.bundleManager.DisplayOrientation"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_LAUNCH_TYPE = "@ohos.bundle.bundleManager.bundleManager.LaunchType"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_SUPPORT_WINDOW_MODE = + "@ohos.bundle.bundleManager.bundleManager.SupportWindowMode"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_EXTENSION_ABILITY_TYPE = + "@ohos.bundle.bundleManager.bundleManager.ExtensionAbilityType"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_MODULE_TYPE = "@ohos.bundle.bundleManager.bundleManager.ModuleType"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_PERMISSION_GRANT_STATE = + "@ohos.bundle.bundleManager.bundleManager.PermissionGrantState"; constexpr const char* CLASSNAME_BUNDLEMANAGER_APPLICATION_FLAG = - "L@ohos/bundle/bundleManager/bundleManager/ApplicationFlag;"; -constexpr const char* CLASSNAME_BUNDLE_DISPLAYORIENTATION = "L@ohos/bundle/bundle/DisplayOrientation;"; -constexpr const char* CLASSNAME_BUNDLE_ABILITY_TYPE = "L@ohos/bundle/bundle/AbilityType;"; -constexpr const char* CLASSNAME_BUNDLE_ABILITYSUB_TYPE = "L@ohos/bundle/bundle/AbilitySubType;"; -constexpr const char* CLASSNAME_BUNDLE_LAUNCHMODE = "L@ohos/bundle/bundle/LaunchMode;"; -constexpr const char* CLASSNAME_ZLIB_COMPRESSLEVEL = "L@ohos/zlib/zlib/CompressLevel;"; -constexpr const char* CLASSNAME_ZLIB_MEMLEVEL = "L@ohos/zlib/zlib/MemLevel;"; -constexpr const char* CLASSNAME_ZLIB_COMPRESSSTRATEGY = "L@ohos/zlib/zlib/CompressStrategy;"; + "@ohos.bundle.bundleManager.bundleManager.ApplicationFlag"; +constexpr const char* CLASSNAME_BUNDLEMANAGER_COMPATIBLE_POLICY = + "@ohos.bundle.bundleManager.bundleManager.CompatiblePolicy"; +constexpr const char* CLASSNAME_BUNDLE_DISPLAY_ORIENTATION = "@ohos.bundle.bundle.DisplayOrientation"; +constexpr const char* CLASSNAME_BUNDLE_ABILITY_TYPE = "@ohos.bundle.bundle.AbilityType"; +constexpr const char* CLASSNAME_BUNDLE_ABILITY_SUB_TYPE = "@ohos.bundle.bundle.AbilitySubType"; +constexpr const char* CLASSNAME_BUNDLE_LAUNCH_MODE = "@ohos.bundle.bundle.LaunchMode"; +constexpr const char* CLASSNAME_ZLIB_COMPRESS_LEVEL = "@ohos.zlib.zlib.CompressLevel"; +constexpr const char* CLASSNAME_ZLIB_MEM_LEVEL = "@ohos.zlib.zlib.MemLevel"; +constexpr const char* CLASSNAME_ZLIB_COMPRESS_STRATEGY = "@ohos.zlib.zlib.CompressStrategy"; +constexpr const char* CLASSNAME_ZLIB_RETURN_STATUS = "@ohos.zlib.zlib.ReturnStatus"; +constexpr const char* CLASSNAME_APPCONTROL_COMPONENT_TYPE = "@ohos.bundle.appControl.appControl.ComponentType"; +constexpr const char* CLASSNAME_APPCONTROL_DISPOSED_TYPE = "@ohos.bundle.appControl.appControl.DisposedType"; +constexpr const char* CLASSNAME_APPCONTROL_CONTROL_TYPE = "@ohos.bundle.appControl.appControl.ControlType"; +constexpr const char* CLASSNAME_APPCONTROL_UNINSTALL_COMPONENT_TYPE = + "@ohos.bundle.appControl.appControl.UninstallComponentType"; } // namespace CommonFunAniNS class EnumUtils { private: @@ -236,6 +246,27 @@ private: 9, 8, }; + /* zlib.ReturnStatus + enum ReturnStatus { + OK = 0, + STREAM_END = 1, + NEED_DICT = 2, + ERRNO = -1, + STREAM_ERROR = -2, + DATA_ERROR = -3, + MEM_ERROR = -4, + BUF_ERROR = -5 + } */ + static constexpr std::array Array_Zlib_ReturnStatus = { + 0, + 1, + 2, + -1, + -2, + -3, + -4, + -5 + }; public: template @@ -287,7 +318,7 @@ public: } */ static inline ani_enum_item EnumNativeToETS_BundleManager_MultiAppModeType(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_MULTIAPPMODE_TYPE, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_MULTI_APP_MODE_TYPE, value, 0); } /* bundleManager.DisplayOrientation @@ -310,7 +341,7 @@ public: } */ static inline ani_enum_item EnumNativeToETS_BundleManager_DisplayOrientation(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_DISPLAYORIENTATION, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_DISPLAY_ORIENTATION, value, 0); } /* bundleManager.LaunchType @@ -332,14 +363,17 @@ public: } */ static inline ani_enum_item EnumNativeToETS_BundleManager_SupportWindowMode(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_SUPPORTWINDOWMODE, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_SUPPORT_WINDOW_MODE, value, 0); } // bundleManager.ExtensionAbilityType static inline ani_enum_item EnumNativeToETS_BundleManager_ExtensionAbilityType(ani_env* env, const int32_t value) { - return EnumNativeToETSByTable(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_EXTENSIONABILITY_TYPE, value, - Array_BundleManager_ExtensionAbilityType); + bool isValid = std::find(std::begin(Array_BundleManager_ExtensionAbilityType), + std::end(Array_BundleManager_ExtensionAbilityType), + value) != std::end(Array_BundleManager_ExtensionAbilityType); + return EnumNativeToETSByTable(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_EXTENSION_ABILITY_TYPE, + isValid ? value : CommonFunAniNS::UNSPECIFIED, Array_BundleManager_ExtensionAbilityType); } /* bundleManager.ModuleType @@ -360,7 +394,7 @@ public: } */ static inline ani_enum_item EnumNativeToETS_BundleManager_PermissionGrantState(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_PERMISSIONGRANTSTATE, value, -1); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_PERMISSION_GRANT_STATE, value, -1); } // bundleManager.ApplicationFlag @@ -370,6 +404,15 @@ public: env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_APPLICATION_FLAG, value, Array_BundleManager_ApplicationFlag); } + /* bundleManager.CompatiblePolicy + enum CompatiblePolicy { + BACKWARD_COMPATIBILITY = 1 + } */ + static inline ani_enum_item EnumNativeToETS_BundleManager_CompatiblePolicy(ani_env* env, const int32_t value) + { + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLEMANAGER_COMPATIBLE_POLICY, value, 1); + } + /* bundle.DisplayOrientation enum DisplayOrientation { UNSPECIFIED, @@ -379,7 +422,7 @@ public: } */ static inline ani_enum_item EnumNativeToETS_Bundle_DisplayOrientation(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLE_DISPLAYORIENTATION, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLE_DISPLAY_ORIENTATION, value, 0); } /* bundle.AbilityType @@ -401,7 +444,7 @@ public: } */ static inline ani_enum_item EnumNativeToETS_Bundle_AbilitySubType(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLE_ABILITYSUB_TYPE, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLE_ABILITY_SUB_TYPE, value, 0); } /* bundle.LaunchMode @@ -411,20 +454,20 @@ public: } */ static inline ani_enum_item EnumNativeToETS_Bundle_LaunchMode(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLE_LAUNCHMODE, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_BUNDLE_LAUNCH_MODE, value, 0); } // zlib.CompressLevel static inline ani_enum_item EnumNativeToETS_Zlib_CompressLevel(ani_env* env, const int32_t value) { return EnumNativeToETSByTable( - env, CommonFunAniNS::CLASSNAME_ZLIB_COMPRESSLEVEL, value, Array_Zlib_CompressLevel); + env, CommonFunAniNS::CLASSNAME_ZLIB_COMPRESS_LEVEL, value, Array_Zlib_CompressLevel); } // zlib.MemLevel static inline ani_enum_item EnumNativeToETS_Zlib_MemLevel(ani_env* env, const int32_t value) { - return EnumNativeToETSByTable(env, CommonFunAniNS::CLASSNAME_ZLIB_MEMLEVEL, value, Array_Zlib_MemLevel); + return EnumNativeToETSByTable(env, CommonFunAniNS::CLASSNAME_ZLIB_MEM_LEVEL, value, Array_Zlib_MemLevel); } /* zlib.CompressStrategy @@ -437,7 +480,54 @@ public: } */ static inline ani_enum_item EnumNativeToETS_Zlib_CompressStrategy(ani_env* env, const int32_t value) { - return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_ZLIB_COMPRESSSTRATEGY, value, 0); + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_ZLIB_COMPRESS_STRATEGY, value, 0); + } + + // zlib.ReturnStatus + static inline ani_enum_item EnumNativeToETS_Zlib_ReturnStatus(ani_env* env, const int32_t value) + { + return EnumNativeToETSByTable(env, + CommonFunAniNS::CLASSNAME_ZLIB_RETURN_STATUS, value, Array_Zlib_ReturnStatus); + } + + // appControl.ComponentType + // enum ComponentType { + // UI_ABILITY = 1, + // UI_EXTENSION = 2 + // } + static inline ani_enum_item EnumNativeToETS_AppControl_ComponentType(ani_env* env, const int32_t value) + { + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_APPCONTROL_COMPONENT_TYPE, value, 1); + } + + /* appControl.DisposedType + enum DisposedType { + BLOCK_APPLICATION = 1, + BLOCK_ABILITY = 2, + NON_BLOCK = 3 + } */ + static inline ani_enum_item EnumNativeToETS_AppControl_DisposedType(ani_env* env, const int32_t value) + { + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_APPCONTROL_DISPOSED_TYPE, value, 1); + } + + /* appControl.ControlType + enum ControlType { + ALLOWED_LIST = 1, + DISALLOWED_LIST = 2 + } */ + static inline ani_enum_item EnumNativeToETS_AppControl_ControlType(ani_env* env, const int32_t value) + { + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_APPCONTROL_CONTROL_TYPE, value, 1); + } + + /* appControl.UninstallComponentType + enum UninstallComponentType { + EXTENSION = 1, + } */ + static inline ani_enum_item EnumNativeToETS_AppControl_UninstallComponentType(ani_env* env, const int32_t value) + { + return EnumNativeToETSByOffset(env, CommonFunAniNS::CLASSNAME_APPCONTROL_UNINSTALL_COMPONENT_TYPE, value, 1); } }; } // namespace AppExecFwk diff --git a/interfaces/kits/ani/default_app_manager/BUILD.gn b/interfaces/kits/ani/default_app_manager/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..74bea214fce472ceec4ed69edcd3775e14cc2345 --- /dev/null +++ b/interfaces/kits/ani/default_app_manager/BUILD.gn @@ -0,0 +1,98 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") + +ohos_shared_library("ani_default_app_manager") { + shlib_type = "ani" + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + + include_dirs = [ + "${inner_api_path}/appexecfwk_core/include", + "${kits_path}/ani/common", + "${kits_path}/js/common", + ] + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/common:bundle_napi_common", + ] + + external_deps = [ + "ability_base:want", + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_core", + "napi:ace_napi", + "runtime_core:ani", + "runtime_core:ani_helpers", + "samgr:samgr_proxy", + ] + + if (bundle_framework_default_app) { + sources = [ "ani_default_app_manager.cpp" ] + defines += [ "BUNDLE_FRAMEWORK_DEFAULT_APP" ] + } else { + sources = [ "ani_default_app_manager_unsupported.cpp" ] + } + + if (bundle_framework_graphics) { + defines += [ "BUNDLE_FRAMEWORK_GRAPHICS" ] + } + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + +generate_static_abc("default_app_manager") { + base_url = "./ets" + files = [ "./ets/@ohos.bundle.defaultAppManager.ets" ] + is_boot_abc = "True" + device_dst_file = "/system/framework/default_app_manager.abc" +} + +ohos_prebuilt_etc("default_app_manager_etc") { + source = "$target_out_dir/default_app_manager.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":default_app_manager" ] +} diff --git a/interfaces/kits/ani/default_app_manager/ani_default_app_manager.cpp b/interfaces/kits/ani/default_app_manager/ani_default_app_manager.cpp new file mode 100644 index 0000000000000000000000000000000000000000..615335eef99e8e98d450a8878e5eee9ba04b5f5f --- /dev/null +++ b/interfaces/kits/ani/default_app_manager/ani_default_app_manager.cpp @@ -0,0 +1,224 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "bundle_mgr_interface.h" +#include "business_error_ani.h" +#include "common_func.h" +#include "common_fun_ani.h" +#include "ipc_skeleton.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +using namespace OHOS::AAFwk; +namespace { +constexpr const char* NS_NAME_DEFAULTAPPMANAGER = "@ohos.bundle.defaultAppManager.defaultAppManager"; +} // namespace + +static bool ParseType(ani_env *env, ani_string aniType, std::string& result) +{ + if (!CommonFunAni::ParseString(env, aniType, result)) { + APP_LOGE("parse type failed"); + return false; + } + if (TYPE_MAPPING.find(result) != TYPE_MAPPING.end()) { + result = TYPE_MAPPING.at(result); + } + return true; +} + +static ani_boolean AniIsDefaultApplication(ani_env *env, ani_string aniType, ani_boolean aniIsSync) +{ + APP_LOGD("ani IsDefaultApplication called"); + std::string type; + if (!ParseType(env, aniType, type)) { + APP_LOGE("type invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TYPE_CHECK, TYPE_STRING); + return false; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); + if (defaultAppProxy == nullptr) { + APP_LOGE("defaultAppProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + isSync ? IS_DEFAULT_APPLICATION_SYNC : IS_DEFAULT_APPLICATION, ""); + return false; + } + + bool isDefaultApp = false; + ErrCode ret = defaultAppProxy->IsDefaultApplication(type, isDefaultApp); + if (ret != ERR_OK) { + APP_LOGE("IsDefaultApplication failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? IS_DEFAULT_APPLICATION_SYNC : IS_DEFAULT_APPLICATION, ""); + return false; + } + + return CommonFunAni::BoolToAniBoolean(isDefaultApp); +} + +static ani_object AniGetDefaultApplication(ani_env *env, + ani_string aniType, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetDefaultApplication called"); + std::string type; + if (!ParseType(env, aniType, type)) { + APP_LOGE("type invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TYPE_CHECK, TYPE_STRING); + return nullptr; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); + if (defaultAppProxy == nullptr) { + APP_LOGE("defaultAppProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + isSync ? GET_DEFAULT_APPLICATION_SYNC : GET_DEFAULT_APPLICATION, + isSync ? "" : Constants::PERMISSION_GET_DEFAULT_APPLICATION); + return nullptr; + } + + BundleInfo bundleInfo; + ErrCode ret = defaultAppProxy->GetDefaultApplication(aniUserId, type, bundleInfo); + if (ret != ERR_OK) { + APP_LOGE("GetDefaultApplication failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? GET_DEFAULT_APPLICATION_SYNC : GET_DEFAULT_APPLICATION, + Constants::PERMISSION_GET_DEFAULT_APPLICATION); + return nullptr; + } + + return CommonFunAni::ConvertDefaultAppBundleInfo(env, bundleInfo); +} + +static void AniSetDefaultApplication(ani_env *env, + ani_string aniType, ani_object aniElementName, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani SetDefaultApplication called"); + std::string type; + if (!ParseType(env, aniType, type)) { + APP_LOGE("type invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TYPE_CHECK, TYPE_STRING); + return; + } + ElementName elementName; + if (!CommonFunAni::ParseElementName(env, aniElementName, elementName)) { + APP_LOGE("ParseElementName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, WANT_CHECK, TYPE_OBJECT); + return; + } + Want want; + want.SetElement(elementName); + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); + if (defaultAppProxy == nullptr) { + APP_LOGE("defaultAppProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + isSync ? SET_DEFAULT_APPLICATION_SYNC : SET_DEFAULT_APPLICATION, + isSync ? "" : Constants::PERMISSION_SET_DEFAULT_APPLICATION); + return; + } + + ErrCode ret = defaultAppProxy->SetDefaultApplication(aniUserId, type, want); + if (ret != ERR_OK) { + APP_LOGE("SetDefaultApplication failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? SET_DEFAULT_APPLICATION_SYNC : SET_DEFAULT_APPLICATION, + Constants::PERMISSION_SET_DEFAULT_APPLICATION); + } +} + +static void AniResetDefaultApplication(ani_env *env, ani_string aniType, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani ResetDefaultApplication called"); + std::string type; + if (!ParseType(env, aniType, type)) { + APP_LOGE("type invalid"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TYPE_CHECK, TYPE_STRING); + return; + } + if (aniUserId == EMPTY_USER_ID) { + aniUserId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); + if (defaultAppProxy == nullptr) { + APP_LOGE("defaultAppProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + isSync ? RESET_DEFAULT_APPLICATION_SYNC : RESET_DEFAULT_APPLICATION, + isSync ? "" : Constants::PERMISSION_SET_DEFAULT_APPLICATION); + return; + } + + ErrCode ret = defaultAppProxy->ResetDefaultApplication(aniUserId, type); + if (ret != ERR_OK) { + APP_LOGE("ResetDefaultApplication failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? RESET_DEFAULT_APPLICATION_SYNC : RESET_DEFAULT_APPLICATION, + Constants::PERMISSION_SET_DEFAULT_APPLICATION); + } +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor defaultAppManager called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = arkts::ani_signature::Builder::BuildNamespace(NS_NAME_DEFAULTAPPMANAGER); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_DEFAULTAPPMANAGER, status); + return status; + } + + std::array methods = { + ani_native_function { "isDefaultApplicationNative", nullptr, reinterpret_cast(AniIsDefaultApplication) }, + ani_native_function { "getDefaultApplicationNative", nullptr, + reinterpret_cast(AniGetDefaultApplication) }, + ani_native_function { "setDefaultApplicationNative", nullptr, + reinterpret_cast(AniSetDefaultApplication) }, + ani_native_function { "resetDefaultApplicationNative", nullptr, + reinterpret_cast(AniResetDefaultApplication) } + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE( + "Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_DEFAULTAPPMANAGER, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/default_app_manager/ani_default_app_manager_unsupported.cpp b/interfaces/kits/ani/default_app_manager/ani_default_app_manager_unsupported.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2b97d252502416e69020c9395caf8e043b4dda85 --- /dev/null +++ b/interfaces/kits/ani/default_app_manager/ani_default_app_manager_unsupported.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_DEFAULTAPPMANAGER = "@ohos.bundle.defaultAppManager.defaultAppManager"; +} // namespace + +static ani_boolean AniIsDefaultApplication(ani_env *env, ani_string aniType, ani_boolean aniIsSync) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.DefaultApp not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? IS_DEFAULT_APPLICATION_SYNC : IS_DEFAULT_APPLICATION, ""); + return false; +} + +static ani_object AniGetDefaultApplication(ani_env *env, + ani_string aniType, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.DefaultApp not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? GET_DEFAULT_APPLICATION_SYNC : GET_DEFAULT_APPLICATION, ""); + return nullptr; +} + +static void AniSetDefaultApplication(ani_env *env, + ani_string aniType, ani_object aniElementName, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.DefaultApp not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? SET_DEFAULT_APPLICATION_SYNC : SET_DEFAULT_APPLICATION, ""); +} + +static void AniResetDefaultApplication(ani_env *env, ani_string aniType, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.DefaultApp not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? RESET_DEFAULT_APPLICATION_SYNC : RESET_DEFAULT_APPLICATION, ""); +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor defaultAppManager called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = + arkts::ani_signature::Builder::BuildNamespace(NS_NAME_DEFAULTAPPMANAGER); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_DEFAULTAPPMANAGER, status); + return status; + } + + std::array methods = { + ani_native_function { "isDefaultApplicationNative", nullptr, reinterpret_cast(AniIsDefaultApplication) }, + ani_native_function { "getDefaultApplicationNative", nullptr, + reinterpret_cast(AniGetDefaultApplication) }, + ani_native_function { "setDefaultApplicationNative", nullptr, + reinterpret_cast(AniSetDefaultApplication) }, + ani_native_function { "resetDefaultApplicationNative", nullptr, + reinterpret_cast(AniResetDefaultApplication) } + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE( + "Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_DEFAULTAPPMANAGER, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/default_app_manager/ets/@ohos.bundle.defaultAppManager.ets b/interfaces/kits/ani/default_app_manager/ets/@ohos.bundle.defaultAppManager.ets new file mode 100644 index 0000000000000000000000000000000000000000..435053eed3a62bcf545380aba03eff9b1d3f3bf4 --- /dev/null +++ b/interfaces/kits/ani/default_app_manager/ets/@ohos.bundle.defaultAppManager.ets @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +import { AsyncCallback, BusinessError } from '@ohos.base'; +import { BundleInfo } from 'bundleManager.BundleInfo'; +import { ElementName } from 'bundleManager.ElementName'; + +export default namespace defaultAppManager { + + loadLibrary("ani_default_app_manager.z"); + + const EMPTY_USER_ID: int = -500; + + export enum ApplicationType { + BROWSER = 'Web Browser', + IMAGE = 'Image Gallery', + AUDIO = 'Audio Player', + VIDEO = 'Video Player', + PDF = 'PDF Viewer', + WORD = 'Word Viewer', + EXCEL = 'Excel Viewer', + PPT = 'PPT Viewer', + EMAIL = 'Email' + } + + export native function isDefaultApplicationNative(type: string, isSync: boolean): boolean; + export native function getDefaultApplicationNative(type: string, userId: int, isSync: boolean): BundleInfo; + export native function setDefaultApplicationNative(type: string, elementName: ElementName, userId: int, isSync: boolean): void; + export native function resetDefaultApplicationNative(type: string, userId: int, isSync: boolean): void; + + function isDefaultApplication(type: string, callback: AsyncCallback): void { + let cb = (): boolean => { + return defaultAppManager.isDefaultApplicationNative(type, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: boolean = e as boolean; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + + } + + function isDefaultApplication(type: string): Promise { + let p = new Promise((resolve: (isDefaultApp: boolean) => void, reject: (error: Error) => void) => { + let cb = (): boolean => { + return defaultAppManager.isDefaultApplicationNative(type, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: boolean = e as boolean; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function isDefaultApplicationSync(type: string): boolean { + return defaultAppManager.isDefaultApplicationNative(type, true); + } + + function getDefaultApplication(type: string, userId: int, callback: AsyncCallback): void { + let cb = (): BundleInfo => { + return defaultAppManager.getDefaultApplicationNative(type, userId, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: BundleInfo = e as BundleInfo; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getDefaultApplication(type: string, callback: AsyncCallback): void { + let cb = (): BundleInfo => { + return defaultAppManager.getDefaultApplicationNative(type, EMPTY_USER_ID, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: BundleInfo = e as BundleInfo; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getDefaultApplication(type: string, userId?: int): Promise { + let userIdInfo: int = userId ?? EMPTY_USER_ID; + let p = new Promise((resolve: (bundleInfo: BundleInfo) => void, reject: (error: Error) => void) => { + let cb = (): BundleInfo => { + return defaultAppManager.getDefaultApplicationNative(type, userIdInfo, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: BundleInfo = e as BundleInfo; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getDefaultApplicationSync(type: string, userId?: int): BundleInfo { + let userIdInfo: int = userId ?? EMPTY_USER_ID; + return defaultAppManager.getDefaultApplicationNative(type, userIdInfo, true); + } + + function setDefaultApplication(type: string, elementName: ElementName, userId: int, callback: AsyncCallback): void { + let cb = (): void => { + return defaultAppManager.setDefaultApplicationNative(type, elementName, userId, false); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCallback): void { + let cb = (): void => { + return defaultAppManager.setDefaultApplicationNative(type, elementName, EMPTY_USER_ID, false); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setDefaultApplication(type: string, elementName: ElementName, userId?: int): Promise { + let userIdInfo: int = userId ?? EMPTY_USER_ID; + let p = new Promise((resolve: (v: undefined) => void, reject: (error: Error) => void) : void => { + let cb = (): void => { + return defaultAppManager.setDefaultApplicationNative(type, elementName, userIdInfo, false); + }; + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setDefaultApplicationSync(type: string, elementName: ElementName, userId?: int): void { + let userIdInfo: int = userId ?? EMPTY_USER_ID; + return defaultAppManager.setDefaultApplicationNative(type, elementName, userIdInfo, true); + } + + function resetDefaultApplication(type: string, userId: int, callback: AsyncCallback): void { + let cb = (): void => { + return defaultAppManager.resetDefaultApplicationNative(type, userId, false); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function resetDefaultApplication(type: string, callback: AsyncCallback): void { + let cb = (): void => { + return defaultAppManager.resetDefaultApplicationNative(type, EMPTY_USER_ID, false); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function resetDefaultApplication(type: string, userId?: int): Promise { + let userIdInfo: int = userId ?? EMPTY_USER_ID; + let p = new Promise((resolve: (v: undefined) => void, reject: (error: Error) => void) : void => { + let cb = (): void => { + return defaultAppManager.resetDefaultApplicationNative(type, userIdInfo, false); + }; + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function resetDefaultApplicationSync(type: string, userId?: int): void { + let userIdInfo: int = userId ?? EMPTY_USER_ID; + return defaultAppManager.resetDefaultApplicationNative(type, userIdInfo, true); + } +} diff --git a/interfaces/kits/ani/freeInstall/BUILD.gn b/interfaces/kits/ani/freeInstall/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..bbd2d219574167438ce98a8f7a787f5cd47d5867 --- /dev/null +++ b/interfaces/kits/ani/freeInstall/BUILD.gn @@ -0,0 +1,132 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") + +ohos_shared_library("ani_freeInstall") { + shlib_type = "ani" + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + include_dirs = [ + "${inner_api_path}/appexecfwk_core/include", + "${kits_path}/ani/freeInstall", + "${kits_path}/ani/common", + "${kits_path}/js/common", + ] + + sources = [] + if (bundle_framework_free_install) { + sources += [ "ani_free_install.cpp" ] + } else { + sources += [ "ani_free_install_unsupported.cpp" ] + } + + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/common:bundle_napi_common", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + external_deps = [ + "c_utils:utils", + "common_event_service:cesfwk_core", + "common_event_service:cesfwk_innerkits", + "hilog:libhilog", + "ipc:ipc_core", + "napi:ace_napi", + "runtime_core:ani", + "runtime_core:ani_helpers", + "samgr:samgr_proxy", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + +generate_static_abc("bundle_pack_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/BundlePackInfo.ets", + "./ets/bundleManager/BundlePackInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/bundle_pack_info.abc" +} + +ohos_prebuilt_etc("bundle_pack_info_etc") { + source = "$target_out_dir/bundle_pack_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":bundle_pack_info" ] +} + +generate_static_abc("dispatch_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/DispatchInfo.ets", + "./ets/bundleManager/DispatchInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/dispatch_info.abc" +} + +ohos_prebuilt_etc("dispatch_info_etc") { + source = "$target_out_dir/dispatch_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":dispatch_info" ] +} + +generate_static_abc("freeInstall") { + base_url = "./ets" + files = [ "./ets/@ohos.bundle.freeInstall.ets" ] + is_boot_abc = "True" + device_dst_file = "/system/framework/freeInstall.abc" +} + +ohos_prebuilt_etc("freeInstall_etc") { + source = "$target_out_dir/freeInstall.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":freeInstall" ] +} diff --git a/interfaces/kits/ani/freeInstall/ani_free_install.cpp b/interfaces/kits/ani/freeInstall/ani_free_install.cpp new file mode 100644 index 0000000000000000000000000000000000000000..25ff53dd038f604617effab9399927f682dd6af6 --- /dev/null +++ b/interfaces/kits/ani/freeInstall/ani_free_install.cpp @@ -0,0 +1,210 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "bundle_mgr_interface.h" +#include "bundle_mgr_proxy.h" +#include "business_error.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "enum_util.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_FREEINSTALL = "@ohos.bundle.freeInstall.freeInstall"; +} // namespace + +static void AniSetHapModuleUpgradeFlag( + ani_env* env, ani_string aniBundleName, ani_string aniModuleName, ani_enum_item aniUpgradeFlag) +{ + APP_LOGD("ani SetHapModuleUpgradeFlag called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGE("parse moduleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return; + } + + int32_t upgradeFlag = 0; + if (!EnumUtils::EnumETSToNative(env, aniUpgradeFlag, upgradeFlag)) { + APP_LOGE("parse upgradeFlag failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, UPGRADE_FLAG, TYPE_NUMBER); + return; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + RESOURCE_NAME_OF_SET_HAP_MODULE_UPGRADE_FLAG, Constants::PERMISSION_INSTALL_BUNDLE); + return; + } + + auto result = iBundleMgr->SetModuleUpgradeFlag(bundleName, moduleName, upgradeFlag); + if (result != ERR_OK) { + APP_LOGE("SetModuleUpgradeFlag failed, bundleName is %{public}s, moduleName is %{public}s", bundleName.c_str(), + moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(result), + RESOURCE_NAME_OF_SET_HAP_MODULE_UPGRADE_FLAG, Constants::PERMISSION_INSTALL_BUNDLE); + return; + } +} + +static ani_boolean AniIsHapModuleRemovable(ani_env* env, ani_string aniBundleName, ani_string aniModuleName) +{ + APP_LOGD("ani IsHapModuleRemovable called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return false; + } + + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGE("parse moduleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return false; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + RESOURCE_NAME_OF_IS_HAP_MODULE_REMOVABLE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + } + bool isRemovable = false; + auto result = iBundleMgr->IsModuleRemovable(bundleName, moduleName, isRemovable); + if (result != ERR_OK) { + APP_LOGE("IsModuleRemovable failed, bundleName is %{public}s, moduleName is %{public}s", bundleName.c_str(), + moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(result), + RESOURCE_NAME_OF_IS_HAP_MODULE_REMOVABLE, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return false; + } + return CommonFunAni::BoolToAniBoolean(isRemovable); +} + +static ani_object AniGetBundlePackInfo(ani_env* env, ani_string aniBundleName, ani_enum_item aniBundlePackFlag) +{ + APP_LOGD("ani GetBundlePackInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + + BundlePackFlag bundlePackFlag = BundlePackFlag::GET_PACK_INFO_ALL; + if (!EnumUtils::EnumETSToNative(env, aniBundlePackFlag, bundlePackFlag)) { + APP_LOGE("parse upgradeFlag failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_PACK_FLAG, TYPE_NUMBER); + return nullptr; + } + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, RESOURCE_NAME_OF_GET_BUNDLE_PACK_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + } + BundlePackInfo bundlePackInfo; + auto result = iBundleMgr->GetBundlePackInfo(bundleName, static_cast(bundlePackFlag), bundlePackInfo); + if (result != ERR_OK) { + APP_LOGE("GetBundlePackInfo failed, bundleName is %{public}s", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(result), + RESOURCE_NAME_OF_GET_BUNDLE_PACK_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + return CommonFunAni::ConvertBundlePackInfo(env, bundlePackInfo, static_cast(bundlePackFlag)); +} + +static ani_object AniGetDispatchInfo(ani_env* env) +{ + APP_LOGD("ani GetDispatchInfo called"); + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, RESOURCE_NAME_OF_GET_DISPATCH_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + if (!iBundleMgr->VerifySystemApi(Constants::INVALID_API_VERSION)) { + APP_LOGE("non-system app calling system api"); + BusinessErrorAni::ThrowCommonError(env, ERROR_NOT_SYSTEM_APP, RESOURCE_NAME_OF_GET_DISPATCH_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + if (!iBundleMgr->VerifyCallingPermission(Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED)) { + APP_LOGE("GetDispatchInfo failed due to permission denied"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PERMISSION_DENIED_ERROR, RESOURCE_NAME_OF_GET_DISPATCH_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::CreateDispatchInfo(env, DISPATCH_INFO_VERSION, DISPATCH_INFO_DISPATCH_API); +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor freeInstall called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = arkts::ani_signature::Builder::BuildNamespace(NS_NAME_FREEINSTALL); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_FREEINSTALL, status); + return status; + } + std::array methods = { + ani_native_function { "setHapModuleUpgradeFlagNative", nullptr, + reinterpret_cast(AniSetHapModuleUpgradeFlag) }, + ani_native_function { "isHapModuleRemovableNative", nullptr, reinterpret_cast(AniIsHapModuleRemovable) }, + ani_native_function { "getBundlePackInfoNative", nullptr, reinterpret_cast(AniGetBundlePackInfo) }, + ani_native_function { "getDispatchInfoNative", nullptr, reinterpret_cast(AniGetDispatchInfo) }, + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_FREEINSTALL, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // namespace AppExecFwk +} // namespace OHOS diff --git a/interfaces/kits/ani/freeInstall/ani_free_install_unsupported.cpp b/interfaces/kits/ani/freeInstall/ani_free_install_unsupported.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c89dfd73c1c15e8dbf36cef42a420b82c235541 --- /dev/null +++ b/interfaces/kits/ani/freeInstall/ani_free_install_unsupported.cpp @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "app_log_wrapper.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "enum_util.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_FREEINSTALL = "@ohos.bundle.freeInstall.freeInstall"; +} // namespace + +static void AniSetHapModuleUpgradeFlag(ani_env* env, + ani_string aniBundleName, ani_string aniModuleName, ani_enum_item aniUpgradeFlag) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.FreeInstall not supported"); + BusinessErrorAni::ThrowCommonError( + env, ERROR_SYSTEM_ABILITY_NOT_FOUND, RESOURCE_NAME_OF_SET_HAP_MODULE_UPGRADE_FLAG, ""); +} + +static bool AniIsHapModuleRemovable(ani_env* env, ani_string aniBundleName, ani_string aniModuleName) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.FreeInstall not supported"); + BusinessErrorAni::ThrowCommonError( + env, ERROR_SYSTEM_ABILITY_NOT_FOUND, RESOURCE_NAME_OF_IS_HAP_MODULE_REMOVABLE, ""); + return false; +} + +static ani_object AniGetBundlePackInfo(ani_env* env, ani_string aniBundleName, ani_enum_item aniBundlePackFlag) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.FreeInstall not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, RESOURCE_NAME_OF_GET_BUNDLE_PACK_INFO, ""); + return nullptr; +} + +static ani_object AniGetDispatchInfo(ani_env* env) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.FreeInstall not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, RESOURCE_NAME_OF_GET_DISPATCH_INFO, ""); + return nullptr; +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor freeInstall called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = arkts::ani_signature::Builder::BuildNamespace(NS_NAME_FREEINSTALL); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_FREEINSTALL, status); + return status; + } + std::array methods = { + ani_native_function { "setHapModuleUpgradeFlagNative", nullptr, + reinterpret_cast(AniSetHapModuleUpgradeFlag) }, + ani_native_function { "isHapModuleRemovableNative", nullptr, reinterpret_cast(AniIsHapModuleRemovable) }, + ani_native_function { "getBundlePackInfoNative", nullptr, reinterpret_cast(AniGetBundlePackInfo) }, + ani_native_function { "getDispatchInfoNative", nullptr, reinterpret_cast(AniGetDispatchInfo) }, + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_FREEINSTALL, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // namespace AppExecFwk +} // namespace OHOS diff --git a/interfaces/kits/ani/freeInstall/ets/@ohos.bundle.freeInstall.ets b/interfaces/kits/ani/freeInstall/ets/@ohos.bundle.freeInstall.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f939253c9425393da826a99d89e921164970d5e --- /dev/null +++ b/interfaces/kits/ani/freeInstall/ets/@ohos.bundle.freeInstall.ets @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback, BusinessError } from '@ohos.base'; +import { DispatchInfo as _DispatchInfo } from 'bundleManager.DispatchInfo'; +import { BundlePackInfo as _BundlePackInfo, PackageConfig as _PackageConfig, PackageSummary as _PackageSummary, + BundleConfigInfo as _BundleConfigInfo, ExtensionAbility as _ExtensionAbility, ModuleConfigInfo as _ModuleConfigInfo, + ModuleDistroInfo as _ModuleDistroInfo, ModuleAbilityInfo as _ModuleAbilityInfo, AbilityFormInfo as _AbilityFormInfo, + Version as _Version, ApiVersion as _ApiVersion } from 'bundleManager.BundlePackInfo'; + +namespace freeInstall { + + loadLibrary("ani_freeInstall.z"); + + export enum UpgradeFlag { + NOT_UPGRADE = 0, + SINGLE_UPGRADE = 1, + RELATION_UPGRADE = 2 + } + + export enum BundlePackFlag { + GET_PACK_INFO_ALL = 0x00000000, + GET_PACKAGES = 0x00000001, + GET_BUNDLE_SUMMARY = 0x00000002, + GET_MODULE_SUMMARY = 0x00000004 + } + + export native function setHapModuleUpgradeFlagNative(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): void; + export native function isHapModuleRemovableNative(bundleName: string, moduleName: string): boolean; + export native function getBundlePackInfoNative(bundleName: string, bundlePackFlag: BundlePackFlag): BundlePackInfo; + export native function getDispatchInfoNative(): DispatchInfo; + + function setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag, callback: AsyncCallback): void { + let execFun = (): void => { + freeInstall.setHapModuleUpgradeFlagNative(bundleName, moduleName, upgradeFlag); + }; + let p1 = taskpool.execute(execFun); + p1.then(() => { + callback(null, undefined); + }).catch((err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setHapModuleUpgradeFlag(bundleName: string, moduleName: string, upgradeFlag: UpgradeFlag): Promise { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + freeInstall.setHapModuleUpgradeFlagNative(bundleName, moduleName, upgradeFlag); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function isHapModuleRemovable(bundleName: string, moduleName: string, callback: AsyncCallback): void { + let execFun = (): boolean => { + return freeInstall.isHapModuleRemovableNative(bundleName, moduleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: boolean = e as boolean; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function isHapModuleRemovable(bundleName: string, moduleName: string): Promise { + let p = new Promise((resolve: (result: boolean) => void, reject: (error: BusinessError) => void) => { + let execFun = (): boolean => { + return freeInstall.isHapModuleRemovableNative(bundleName, moduleName); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: boolean = e as boolean; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getBundlePackInfo(bundleName: string, bundlePackFlag: BundlePackFlag, callback: AsyncCallback): void { + let execFun = (): BundlePackInfo => { + return freeInstall.getBundlePackInfoNative(bundleName, bundlePackFlag); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: BundlePackInfo = e as BundlePackInfo; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getBundlePackInfo(bundleName: string, bundlePackFlag: BundlePackFlag): Promise { + let p = new Promise((resolve: (result: BundlePackInfo) => void, reject: (error: BusinessError) => void) => { + let execFun = (): BundlePackInfo => { + return freeInstall.getBundlePackInfoNative(bundleName, bundlePackFlag); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: BundlePackInfo = e as BundlePackInfo; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getDispatchInfo(callback: AsyncCallback): void { + let execFun = (): DispatchInfo => { + return freeInstall.getDispatchInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: DispatchInfo = e as DispatchInfo; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getDispatchInfo(): Promise { + let p = new Promise((resolve: (result: DispatchInfo) => void, reject: (error: BusinessError) => void) => { + let execFun = (): DispatchInfo => { + return freeInstall.getDispatchInfoNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: DispatchInfo = e as DispatchInfo; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + export type DispatchInfo = _DispatchInfo; + export type BundlePackInfo = _BundlePackInfo; + export type PackageConfig = _PackageConfig; + export type PackageSummary = _PackageSummary; + export type BundleConfigInfo = _BundleConfigInfo; + export type ExtensionAbility = _ExtensionAbility; + export type ModuleConfigInfo = _ModuleConfigInfo; + export type ModuleDistroInfo = _ModuleDistroInfo; + export type ModuleAbilityInfo = _ModuleAbilityInfo; + export type AbilityFormInfo = _AbilityFormInfo; + export type Version = _Version; + export type ApiVersion = _ApiVersion; +} + +export default freeInstall; diff --git a/interfaces/kits/ani/freeInstall/ets/bundleManager/BundlePackInfo.ets b/interfaces/kits/ani/freeInstall/ets/bundleManager/BundlePackInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..8329aef9a06d21135ec13a5d42640177323570e7 --- /dev/null +++ b/interfaces/kits/ani/freeInstall/ets/bundleManager/BundlePackInfo.ets @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface BundlePackInfo { + readonly packages: Array; + readonly summary: PackageSummary; +} + +export interface PackageConfig { + readonly deviceTypes: Array; + readonly name: string; + readonly moduleType: string; + readonly deliveryWithInstall: boolean; +} + +export interface PackageSummary { + readonly app: BundleConfigInfo; + readonly modules: Array; +} + +export interface BundleConfigInfo { + readonly bundleName: string; + readonly version: Version; +} + +export interface ExtensionAbility { + readonly name: string; + readonly forms: Array; +} + +export interface ModuleConfigInfo { + readonly mainAbility: string; + readonly apiVersion: ApiVersion; + readonly deviceTypes: Array; + readonly distro: ModuleDistroInfo; + readonly abilities: Array; + readonly extensionAbilities: Array; +} + +export interface ModuleDistroInfo { + readonly deliveryWithInstall: boolean; + readonly installationFree: boolean; + readonly moduleName: string; + readonly moduleType: string; +} + +export interface ModuleAbilityInfo { + readonly name: string; + readonly label: string; + readonly exported: boolean; + readonly forms: Array; +} + +export interface AbilityFormInfo { + readonly name: string; + readonly type: string; + readonly updateEnabled: boolean; + readonly scheduledUpdateTime: string; + readonly updateDuration: int; + readonly supportDimensions: Array; + readonly defaultDimension: string; +} + +export interface Version { + readonly minCompatibleVersionCode: int; + readonly name: string; + readonly code: int; +} + +export interface ApiVersion { + readonly releaseType: string; + readonly compatible: int; + readonly target: int; +} \ No newline at end of file diff --git a/interfaces/kits/ani/freeInstall/ets/bundleManager/BundlePackInfoInner.ets b/interfaces/kits/ani/freeInstall/ets/bundleManager/BundlePackInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..276314cc8c69bb29589a1d74119001d5c2e4b158 --- /dev/null +++ b/interfaces/kits/ani/freeInstall/ets/bundleManager/BundlePackInfoInner.ets @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BundlePackInfo, PackageConfig, PackageSummary, BundleConfigInfo, ExtensionAbility, ModuleConfigInfo, + ModuleDistroInfo, ModuleAbilityInfo, AbilityFormInfo, Version, ApiVersion } from 'bundleManager.BundlePackInfo'; + +export class BundlePackInfoInner implements BundlePackInfo { + public readonly packages: Array = new Array; + public readonly summary: PackageSummary = new PackageSummaryInner; + + constructor() { } + constructor(packages: Array) { + this.packages = packages; + } + constructor(summary: PackageSummary) { + this.summary = summary; + } + constructor(packages: Array, summary: PackageSummary) { + this.packages = packages; + this.summary = summary; + } +} + +export class PackageConfigInner implements PackageConfig { + public readonly deviceTypes: Array = new Array; + public readonly name: string = ''; + public readonly moduleType: string = ''; + public readonly deliveryWithInstall: boolean; + + constructor() { } + constructor(deviceTypes: Array, name: string, moduleType: string, deliveryWithInstall: boolean) { + this.deviceTypes = deviceTypes; + this.name = name; + this.moduleType = moduleType; + this.deliveryWithInstall = deliveryWithInstall; + } +} + +export class PackageSummaryInner implements PackageSummary { + public readonly app: BundleConfigInfo = new BundleConfigInfoInner; + public readonly modules: Array = new Array; + + constructor() { } + constructor(modules: Array) { + this.modules = modules; + } + constructor(modules: Array, app: BundleConfigInfo) { + this.modules = modules; + this.app = app; + } +} + +export class BundleConfigInfoInner implements BundleConfigInfo { + public readonly bundleName: string = ''; + public readonly version: Version = new VersionInner; + + constructor() { } + constructor(bundleName: string, version: Version) { + this.bundleName = bundleName; + this.version = version; + } +} + +export class ExtensionAbilityInner implements ExtensionAbility { + public readonly name: string = ''; + public readonly forms: Array = new Array; + + constructor() { } + constructor(name: string, forms: Array) { + this.name = name; + this.forms = forms; + } +} + +export class ModuleConfigInfoInner implements ModuleConfigInfo { + public readonly mainAbility: string = ''; + public readonly apiVersion: ApiVersion = new ApiVersionInner; + public readonly deviceTypes: Array = new Array; + public readonly distro: ModuleDistroInfo = new ModuleDistroInfoInner; + public readonly abilities: Array = new Array; + public readonly extensionAbilities: Array = new Array; + + constructor() { } + constructor(mainAbility: string, + apiVersion: ApiVersion, + deviceTypes: Array, + distro: ModuleDistroInfo, + abilities: Array, + extensionAbilities: Array) { + this.mainAbility = mainAbility; + this.apiVersion = apiVersion; + this.deviceTypes = deviceTypes; + this.distro = distro; + this.abilities = abilities; + this.extensionAbilities = extensionAbilities; + } +} + +export class ModuleDistroInfoInner implements ModuleDistroInfo { + public readonly deliveryWithInstall: boolean; + public readonly installationFree: boolean; + public readonly moduleName: string = ''; + public readonly moduleType: string = ''; + + constructor() { } + constructor(deliveryWithInstall: boolean, installationFree: boolean, moduleName: string, moduleType: string) { + this.deliveryWithInstall = deliveryWithInstall; + this.installationFree = installationFree; + this.moduleName = moduleName; + this.moduleType = moduleType; + } +} + +export class ModuleAbilityInfoInner implements ModuleAbilityInfo { + public readonly name: string = ''; + public readonly label: string = ''; + public readonly exported: boolean; + public readonly forms: Array = new Array; + + constructor() { } + constructor(name: string, label: string, exported: boolean, forms: Array) { + this.name = name; + this.label = label; + this.exported = exported; + this.forms = forms; + } +} + +export class AbilityFormInfoInner implements AbilityFormInfo { + public readonly name: string = ''; + public readonly type: string = ''; + public readonly updateEnabled: boolean; + public readonly scheduledUpdateTime: string = ''; + public readonly updateDuration: int; + public readonly supportDimensions: Array = new Array; + public readonly defaultDimension: string = ''; + + constructor() { } + constructor(name: string, + type: string, + updateEnabled: boolean, + scheduledUpdateTime: string, + updateDuration: int, + supportDimensions: Array, + defaultDimension: string) { + this.name = name; + this.type = type; + this.updateEnabled = updateEnabled; + this.scheduledUpdateTime = scheduledUpdateTime; + this.updateDuration = updateDuration; + this.supportDimensions = supportDimensions; + this.defaultDimension = defaultDimension; + } +} + +export class VersionInner implements Version { + public readonly minCompatibleVersionCode: int; + public readonly name: string = ''; + public readonly code: int; + + constructor() { } + constructor(minCompatibleVersionCode: int, name: string, code: int) { + this.minCompatibleVersionCode = minCompatibleVersionCode; + this.name = name; + this.code = code; + } +} + +export class ApiVersionInner implements ApiVersion { + public readonly releaseType: string = ''; + public readonly compatible: int; + public readonly target: int; + + constructor() { } + constructor(releaseType: string, compatible: int, target: int) { + this.releaseType = releaseType; + this.compatible = compatible; + this.target = target; + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/app.js b/interfaces/kits/ani/freeInstall/ets/bundleManager/DispatchInfo.ets old mode 100755 new mode 100644 similarity index 70% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/app.js rename to interfaces/kits/ani/freeInstall/ets/bundleManager/DispatchInfo.ets index 6abda63f0e61d4a957e4320291c42647eb231991..440b6610551c4caa27319639c0d379a76df49d19 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/app.js +++ b/interfaces/kits/ani/freeInstall/ets/bundleManager/DispatchInfo.ets @@ -1,22 +1,19 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface DispatchInfo { + readonly version: string; + readonly dispatchAPIVersion: string; +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.js b/interfaces/kits/ani/freeInstall/ets/bundleManager/DispatchInfoInner.ets old mode 100755 new mode 100644 similarity index 57% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.js rename to interfaces/kits/ani/freeInstall/ets/bundleManager/DispatchInfoInner.ets index eb5be916aa414adb35cf8541635725d702a893dc..06a585ea48934c654ade6b5266e324789e0541b5 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.js +++ b/interfaces/kits/ani/freeInstall/ets/bundleManager/DispatchInfoInner.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,14 +12,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} +import { DispatchInfo } from 'bundleManager.DispatchInfo'; + +export class DispatchInfoInner implements DispatchInfo { + public readonly version: string = ''; + public readonly dispatchAPIVersion: string = ''; + + constructor() { } + constructor(version: string, dispatchAPIVersion: string) { + this.version = version; + this.dispatchAPIVersion = dispatchAPIVersion; + } +} \ No newline at end of file diff --git a/interfaces/kits/ani/launcher_bundle_manager/BUILD.gn b/interfaces/kits/ani/launcher_bundle_manager/BUILD.gn index 596da050ecd31ffad2aba683c752d02715ef6055..f8863695f8954f8cc166788376ae4069d9554633 100644 --- a/interfaces/kits/ani/launcher_bundle_manager/BUILD.gn +++ b/interfaces/kits/ani/launcher_bundle_manager/BUILD.gn @@ -16,6 +16,7 @@ import("//build/ohos.gni") import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") ohos_shared_library("ani_launcher_bundle_manager") { + shlib_type = "ani" branch_protector_ret = "pac_ret" sanitize = { @@ -93,3 +94,40 @@ ohos_prebuilt_etc("launcher_bundle_manager_etc") { part_name = "bundle_framework" deps = [ ":launcher_bundle_manager" ] } + +generate_static_abc("element_name") { + base_url = "./ets" + files = [ + "./ets/bundleManager/ElementName.ets", + "./ets/bundleManager/ElementNameInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/element_name.abc" +} + +ohos_prebuilt_etc("element_name_etc") { + source = "$target_out_dir/element_name.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":element_name" ] +} + +generate_static_abc("launcher_ability_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/LauncherAbilityInfo.ets", + "./ets/bundleManager/LauncherAbilityInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/launcher_ability_info.abc" + external_dependencies = [ "bundle_framework:copy_bundleManager_ets" ] +} + +ohos_prebuilt_etc("launcher_ability_info_etc") { + source = "$target_out_dir/launcher_ability_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":launcher_ability_info" ] +} diff --git a/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager.cpp b/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager.cpp index 3954c657ca71561a27a37021caed004c3e9fe34d..5140f1523ddaf9a999a78f18a04ba2f7716c199a 100644 --- a/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager.cpp +++ b/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager.cpp @@ -33,8 +33,6 @@ namespace OHOS { namespace AppExecFwk { namespace { -constexpr int32_t EMPTY_USER_ID = -500; -constexpr const char* PARSE_SHORTCUT_INFO = "parse ShortcutInfo failed"; constexpr const char* NS_NAME_LAUNCHERMANAGER = "@ohos.bundle.launcherBundleManager.launcherBundleManager"; const std::map START_SHORTCUT_RES_MAP = { @@ -50,7 +48,7 @@ static void AniStartShortcut(ani_env *env, ani_object aniShortcutInfo, ani_objec ShortcutInfo shortcutInfo; if (!CommonFunAni::ParseShortcutInfo(env, aniShortcutInfo, shortcutInfo)) { APP_LOGE("parse shortcutInfo failed"); - BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO_FAILED); return; } if (shortcutInfo.intents.empty()) { @@ -77,7 +75,7 @@ static void AniStartShortcut(ani_env *env, ani_object aniShortcutInfo, ani_objec if (aniStartOptions != nullptr) { if (!UnwrapStartOptions(env, aniStartOptions, startOptions)) { APP_LOGE("ParseStartOptions error"); - BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS_FAILED); return; } } @@ -92,7 +90,7 @@ static void AniStartShortcut(ani_env *env, ani_object aniShortcutInfo, ani_objec } static ani_object AniGetShortcutInfo(ani_env *env, - ani_string aniBundleName, ani_double aniUserId, ani_boolean aniIsSync) + ani_string aniBundleName, ani_int aniUserId, ani_boolean aniIsSync) { APP_LOGD("ani GetShortcutInfo called"); std::string bundleName; @@ -101,12 +99,8 @@ static ani_object AniGetShortcutInfo(ani_env *env, BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); return nullptr; } - int32_t userId = EMPTY_USER_ID; - if (!CommonFunAni::TryCastDoubleTo(aniUserId, &userId)) { - APP_LOGW("try cast userId falied"); - } - if (userId == EMPTY_USER_ID) { - userId = Constants::UNSPECIFIED_USERID; + if (aniUserId == EMPTY_USER_ID) { + aniUserId = Constants::UNSPECIFIED_USERID; } bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); auto launcherService = JSLauncherService::GetLauncherService(); @@ -118,7 +112,7 @@ static ani_object AniGetShortcutInfo(ani_env *env, } std::vector shortcutInfos; - ErrCode ret = launcherService->GetShortcutInfoV9(bundleName, shortcutInfos, userId); + ErrCode ret = launcherService->GetShortcutInfoV9(bundleName, shortcutInfos, aniUserId); if (ret != ERR_OK) { APP_LOGE("GetShortcutInfoV9 failed, ret %{public}d", ret); BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), @@ -134,6 +128,179 @@ static ani_object AniGetShortcutInfo(ani_env *env, return shortcutInfosObject; } +static ani_object AniGetLauncherAbilityInfo(ani_env *env, + ani_string aniBundleName, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGD("ani GetLauncherAbilityInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + + auto launcherService = JSLauncherService::GetLauncherService(); + if (launcherService == nullptr) { + APP_LOGE("launcherService is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + isSync ? GET_LAUNCHER_ABILITY_INFO_SYNC : GET_LAUNCHER_ABILITY_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + std::vector launcherAbilityInfos; + ErrCode ret = ERR_OK; + if (isSync) { + ret = launcherService->GetLauncherAbilityInfoSync(bundleName, aniUserId, launcherAbilityInfos); + } else { + ret = launcherService->GetLauncherAbilityByBundleName(bundleName, aniUserId, launcherAbilityInfos); + } + if (ret != ERR_OK) { + APP_LOGE("GetLauncherAbilityInfo failed ret:%{public}d, bundleName:%{public}s, userId:%{public}d", + ret, bundleName.c_str(), aniUserId); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + isSync ? GET_LAUNCHER_ABILITY_INFO_SYNC : GET_LAUNCHER_ABILITY_INFO, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + ani_object launcherAbilityInfosObject = CommonFunAni::ConvertAniArray( + env, launcherAbilityInfos, CommonFunAni::ConvertLauncherAbilityInfo); + if (launcherAbilityInfosObject == nullptr) { + APP_LOGE("nullptr launcherAbilityInfosObject"); + } + + return launcherAbilityInfosObject; +} + +static ani_object AniGetAllLauncherAbilityInfo(ani_env *env, ani_int aniUserId) +{ + APP_LOGD("ani GetAllLauncherAbilityInfo called"); + auto launcherService = JSLauncherService::GetLauncherService(); + if (launcherService == nullptr) { + APP_LOGE("launcherService is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, + GET_ALL_LAUNCHER_ABILITY_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + std::vector launcherAbilityInfos; + ErrCode ret = launcherService->GetAllLauncherAbility(aniUserId, launcherAbilityInfos); + if (ret != ERR_OK) { + APP_LOGE("GetAllLauncherAbility failed ret:%{public}d,userId:%{public}d", ret, aniUserId); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_ALL_LAUNCHER_ABILITY_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + ani_object launcherAbilityInfosObject = CommonFunAni::ConvertAniArray( + env, launcherAbilityInfos, CommonFunAni::ConvertLauncherAbilityInfo); + if (launcherAbilityInfosObject == nullptr) { + APP_LOGE("nullptr launcherAbilityInfosObject"); + } + + return launcherAbilityInfosObject; +} + +static ani_object GetShortcutInfoByAppIndex(ani_env* env, ani_string aniBundleName, ani_int aniAppIndex) +{ + APP_LOGD("ani GetShortcutInfoByAppIndex called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (aniAppIndex < Constants::MAIN_APP_INDEX || aniAppIndex > Constants::CLONE_APP_INDEX_MAX) { + APP_LOGE("appIndex: %{public}d not in valid range", aniAppIndex); + BusinessErrorAni::ThrowCommonError(env, ERROR_INVALID_APPINDEX, APP_INDEX, TYPE_NUMBER); + return nullptr; + } + auto launcherService = JSLauncherService::GetLauncherService(); + if (launcherService == nullptr) { + APP_LOGE("launcherService is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, GET_SHORTCUT_INFO_BY_APPINDEX, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + std::vector shortcutInfos; + ErrCode ret = launcherService->GetShortcutInfoByAppIndex(bundleName, aniAppIndex, shortcutInfos); + if (ret != ERR_OK) { + APP_LOGE("GetShortcutInfoByAppIndex failed, ret %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_SHORTCUT_INFO_BY_APPINDEX, + Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + ani_object shortcutInfosObject = + CommonFunAni::ConvertAniArray(env, shortcutInfos, CommonFunAni::ConvertShortcutInfo); + if (shortcutInfosObject == nullptr) { + APP_LOGE("nullptr shortcutInfosObject"); + return nullptr; + } + return shortcutInfosObject; +} + +static ErrCode InnerStartShortcutWithReason(const OHOS::AppExecFwk::ShortcutInfo &shortcutInfo, + std::string &startReason, const OHOS::AAFwk::StartOptions &startOptions) +{ + if (shortcutInfo.intents.empty()) { + APP_LOGW("intents is empty"); + return ERR_BUNDLE_MANAGER_START_SHORTCUT_FAILED; + } + AAFwk::Want want; + ElementName element; + element.SetBundleName(shortcutInfo.intents[0].targetBundle); + element.SetModuleName(shortcutInfo.intents[0].targetModule); + element.SetAbilityName(shortcutInfo.intents[0].targetClass); + want.SetElement(element); + for (const auto &item : shortcutInfo.intents[0].parameters) { + want.SetParam(item.first, item.second); + } + want.SetParam(AAFwk::Want::PARM_LAUNCH_REASON_MESSAGE, startReason); + want.SetParam(AAFwk::Want::PARAM_APP_CLONE_INDEX_KEY, shortcutInfo.appIndex); + auto res = AAFwk::AbilityManagerClient::GetInstance()->StartShortcut(want, startOptions); + auto it = START_SHORTCUT_RES_MAP.find(res); + if (it == START_SHORTCUT_RES_MAP.end()) { + APP_LOGE("call AbilityManagerClient StartShortcut failed, res : %{public}d", res); + return ERR_BUNDLE_MANAGER_START_SHORTCUT_FAILED; + } + return it->second; +} + +static void StartShortcutWithReasonNative( + ani_env* env, ani_object aniShortcutInfo, ani_string aniStartReason, ani_object aniStartOptions) +{ + APP_LOGD("ani StartShortcutWithReason called"); + ShortcutInfo shortcutInfo; + if (!CommonFunAni::ParseShortcutInfo(env, aniShortcutInfo, shortcutInfo)) { + APP_LOGE("parse shortcutInfo failed"); + BusinessErrorAni::ThrowError(env, ERR_BUNDLE_MANAGER_START_SHORTCUT_FAILED, PARSE_SHORTCUT_INFO_FAILED); + return; + } + std::string reasonMessage; + if (!CommonFunAni::ParseString(env, aniStartReason, reasonMessage)) { + APP_LOGE("parse reasonMessage failed"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_REASON_MESSAGE); + return; + } + StartOptions startOptions; + if (aniStartOptions != nullptr) { + if (!UnwrapStartOptions(env, aniStartOptions, startOptions)) { + APP_LOGE("ParseStartOptions error"); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS_FAILED); + return; + } + } + ErrCode result = InnerStartShortcutWithReason(shortcutInfo, reasonMessage, startOptions); + if (result != ERR_OK) { + APP_LOGE("StartShortcutWithReason failed, result: %{public}d", result); + BusinessErrorAni::ThrowCommonError( + env, CommonFunc::ConvertErrCode(result), START_SHORTCUT_WITH_REASON, Constants::PERMISSION_START_SHORTCUT); + } +} + extern "C" { ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) { @@ -153,6 +320,14 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) std::array methods = { ani_native_function { "startShortcutNative", nullptr, reinterpret_cast(AniStartShortcut) }, ani_native_function { "getShortcutInfoNative", nullptr, reinterpret_cast(AniGetShortcutInfo) }, + ani_native_function { "getLauncherAbilityInfoNative", nullptr, + reinterpret_cast(AniGetLauncherAbilityInfo) }, + ani_native_function { "getAllLauncherAbilityInfoNative", nullptr, + reinterpret_cast(AniGetAllLauncherAbilityInfo) }, + ani_native_function { "getShortcutInfoByAppIndex", nullptr, + reinterpret_cast(GetShortcutInfoByAppIndex) }, + ani_native_function { "startShortcutWithReasonNative", nullptr, + reinterpret_cast(StartShortcutWithReasonNative) }, }; status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); diff --git a/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager_unsupported.cpp b/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager_unsupported.cpp index dd3e5d0cb2a3d7b1e1e216e3c954d91688c59cd4..7b854800d8457b7f733cd6d8aadca9c2b085855b 100644 --- a/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager_unsupported.cpp +++ b/interfaces/kits/ani/launcher_bundle_manager/ani_launcher_bundle_manager_unsupported.cpp @@ -34,7 +34,7 @@ static void AniStartShortcut(ani_env *env, ani_object aniShortcutInfo, ani_objec } static ani_object AniGetShortcutInfo(ani_env *env, - ani_string aniBundleName, ani_double aniUserId, ani_boolean aniIsSync) + ani_string aniBundleName, ani_int aniUserId, ani_boolean aniIsSync) { APP_LOGI("SystemCapability.BundleManager.BundleFramework.Launcher not supported"); bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); @@ -43,6 +43,37 @@ static ani_object AniGetShortcutInfo(ani_env *env, return nullptr; } +static ani_object AniGetLauncherAbilityInfo(ani_env *env, + ani_string aniBundleName, ani_int aniUserId, ani_boolean aniIsSync) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Launcher not supported"); + bool isSync = CommonFunAni::AniBooleanToBool(aniIsSync); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + isSync ? GET_LAUNCHER_ABILITY_INFO_SYNC : GET_LAUNCHER_ABILITY_INFO, ""); + return nullptr; +} + +static ani_object AniGetAllLauncherAbilityInfo(ani_env *env, ani_int aniUserId) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Launcher not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_ALL_LAUNCHER_ABILITY_INFO, ""); + return nullptr; +} + +static ani_object GetShortcutInfoByAppIndex(ani_env* env, ani_string aniBundleName, ani_int aniAppIndex) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Launcher not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_SHORTCUT_INFO_BY_APPINDEX, ""); + return nullptr; +} + +static void StartShortcutWithReasonNative( + ani_env* env, ani_object aniShortcutInfo, ani_string aniStartReason, ani_object aniStartOptions) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Launcher not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, START_SHORTCUT_WITH_REASON, ""); +} + extern "C" { ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) { @@ -62,6 +93,14 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) std::array methods = { ani_native_function { "startShortcutNative", nullptr, reinterpret_cast(AniStartShortcut) }, ani_native_function { "getShortcutInfoNative", nullptr, reinterpret_cast(AniGetShortcutInfo) }, + ani_native_function { "getLauncherAbilityInfoNative", nullptr, + reinterpret_cast(AniGetLauncherAbilityInfo) }, + ani_native_function { "getAllLauncherAbilityInfoNative", nullptr, + reinterpret_cast(AniGetAllLauncherAbilityInfo) }, + ani_native_function { "getShortcutInfoByAppIndex", nullptr, + reinterpret_cast(GetShortcutInfoByAppIndex) }, + ani_native_function { "startShortcutWithReasonNative", nullptr, + reinterpret_cast(StartShortcutWithReasonNative) }, }; status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); diff --git a/interfaces/kits/ani/launcher_bundle_manager/ets/@ohos.bundle.launcherBundleManager.ets b/interfaces/kits/ani/launcher_bundle_manager/ets/@ohos.bundle.launcherBundleManager.ets index 541d797b267da5b356f271ae4eff247ab57b6e6c..3a3b6246986542f4c93693f84d164f0408a82656 100644 --- a/interfaces/kits/ani/launcher_bundle_manager/ets/@ohos.bundle.launcherBundleManager.ets +++ b/interfaces/kits/ani/launcher_bundle_manager/ets/@ohos.bundle.launcherBundleManager.ets @@ -13,18 +13,22 @@ * limitations under the License. */ -import { BusinessError } from '@ohos.base'; +import { AsyncCallback, BusinessError } from '@ohos.base'; import { ShortcutInfo as _ShortcutInfo, ShortcutWant as _ShortcutWant, ParameterItem as _ParameterItem } from 'bundleManager.ShortcutInfo'; +import { LauncherAbilityInfo } from 'bundleManager.LauncherAbilityInfo'; import StartOptions from '@ohos.app.ability.StartOptions'; export default namespace launcherBundleManager { - loadLibrary("ani_launcher_bundle_manager.z"); - const EMPTY_USER_ID: number = -500; + const EMPTY_USER_ID: int = -500; export native function startShortcutNative(shortcutInfo: ShortcutInfo, options: StartOptions): void; - export native function getShortcutInfoNative(bundleName: string, userId: number, isSync: boolean): Array; + export native function getShortcutInfoNative(bundleName: string, userId: int, isSync: boolean): Array; + export native function getLauncherAbilityInfoNative(bundleName: string, userId: int, isSync: boolean): Array; + export native function getAllLauncherAbilityInfoNative(userId: int): Array; + export native function getShortcutInfoByAppIndex(bundleName: string, appIndex: int): Array; + export native function startShortcutWithReasonNative(shortcutInfo: ShortcutInfo, startReason: string, options: StartOptions): void; function startShortcut(shortcutInfo: ShortcutInfo, options?: StartOptions): Promise { let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void): void => { @@ -49,10 +53,120 @@ export default namespace launcherBundleManager { return launcherBundleManager.getShortcutInfoNative(bundleName, EMPTY_USER_ID, true); } - function getShortcutInfoSync(bundleName: string, userId: number): Array { + function getShortcutInfoSync(bundleName: string, userId: int): Array { return launcherBundleManager.getShortcutInfoNative(bundleName, userId, true); } + function getShortcutInfo(bundleName: string, callback: AsyncCallback>): void { + let cb = (): (Array) => { + return launcherBundleManager.getShortcutInfoNative(bundleName, EMPTY_USER_ID, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultShortcutInfo: Array = e as Array; + callback(null, resultShortcutInfo); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getShortcutInfo(bundleName: string): Promise> { + let p = new Promise>((resolve: (arrShortcutInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return launcherBundleManager.getShortcutInfoNative(bundleName, EMPTY_USER_ID, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultShortcutInfo: Array = e as Array; + resolve(resultShortcutInfo); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getLauncherAbilityInfo(bundleName: string, userId: int, callback: AsyncCallback, void>): void { + let cb = (): (Array) => { + return launcherBundleManager.getLauncherAbilityInfoNative(bundleName, userId, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getLauncherAbilityInfo(bundleName: string, userId: int): Promise> { + let p = new Promise>((resolve: (arrLauncherAbilityInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return launcherBundleManager.getLauncherAbilityInfoNative(bundleName, userId, false); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getLauncherAbilityInfoSync(bundleName: string, userId: int): Array { + return launcherBundleManager.getLauncherAbilityInfoNative(bundleName, userId, true); + } + + function getAllLauncherAbilityInfo(userId: int, callback: AsyncCallback, void>): void { + let cb = (): (Array) => { + return launcherBundleManager.getAllLauncherAbilityInfoNative(userId); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllLauncherAbilityInfo(userId: int): Promise>{ + let p = new Promise>((resolve: (arrLauncherAbilityInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return launcherBundleManager.getAllLauncherAbilityInfoNative(userId); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function startShortcutWithReason(shortcutInfo: ShortcutInfo, startReason: string, options?: StartOptions): Promise { + let p = new Promise((resolve: (v:undefined) => void, reject: (error: BusinessError) => void): void => { + let startOptions : StartOptions = {}; + if (options != undefined) { + startOptions = options; + } + let cb = (): NullishType => { + launcherBundleManager.startShortcutWithReasonNative(shortcutInfo, startReason, startOptions); + } + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + export type ShortcutInfo = _ShortcutInfo; export type ShortcutWant = _ShortcutWant; export type ParameterItem = _ParameterItem; diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/app.js b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/ElementName.ets old mode 100755 new mode 100644 similarity index 70% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/app.js rename to interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/ElementName.ets index 6abda63f0e61d4a957e4320291c42647eb231991..d4804394dd2634063037342efd744d39a9bb37e9 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/app.js +++ b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/ElementName.ets @@ -1,22 +1,23 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface ElementName { + deviceId?: string; + bundleName: string; + moduleName?: string; + abilityName: string; + uri?: string; + shortName?: string; +} \ No newline at end of file diff --git a/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/ElementNameInner.ets b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/ElementNameInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..97280b57688b5eb5bffdbee808366e3e98deb98a --- /dev/null +++ b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/ElementNameInner.ets @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ElementName } from 'bundleManager.ElementName'; + +export class ElementNameInner implements ElementName { + deviceId?: string | undefined; + bundleName: string = ""; + moduleName?: string | undefined; + abilityName: string = ""; + uri?: string | undefined; + shortName?: string | undefined; + + constructor() { } + constructor(bundleName: string, + abilityName: string, + deviceId?: string, + moduleName?: string, + uri?: string, + shortName?: string) { + this.deviceId = deviceId; + this.bundleName = bundleName; + this.moduleName = moduleName; + this.abilityName = abilityName; + this.uri = uri; + this.shortName = shortName; + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.js b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/LauncherAbilityInfo.ets old mode 100755 new mode 100644 similarity index 58% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.js rename to interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/LauncherAbilityInfo.ets index eb5be916aa414adb35cf8541635725d702a893dc..ef83807a723ec487233edbb7b9f3d6df0e36061f --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.js +++ b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/LauncherAbilityInfo.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,14 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} +import { ApplicationInfo } from 'bundleManager.ApplicationInfo'; +import { ElementName } from 'bundleManager.ElementName'; + +export interface LauncherAbilityInfo { + readonly applicationInfo: ApplicationInfo; + readonly elementName: ElementName; + readonly labelId: long; + readonly iconId: long; + readonly userId: int; + readonly installTime: long; +} \ No newline at end of file diff --git a/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/LauncherAbilityInfoInner.ets b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/LauncherAbilityInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae32bfa7a2562f69a2f79605f4b943ac7b42dc35 --- /dev/null +++ b/interfaces/kits/ani/launcher_bundle_manager/ets/bundleManager/LauncherAbilityInfoInner.ets @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { ApplicationInfo } from 'bundleManager.ApplicationInfo'; +import { ApplicationInfoInner } from 'bundleManager.ApplicationInfoInner'; +import { ElementName } from 'bundleManager.ElementName'; +import { ElementNameInner } from './ElementNameInner'; +import { LauncherAbilityInfo } from 'bundleManager.LauncherAbilityInfo'; + +export class LauncherAbilityInfoInner implements LauncherAbilityInfo { + readonly applicationInfo: ApplicationInfo = new ApplicationInfoInner; + readonly elementName: ElementName = new ElementNameInner; + readonly labelId: long; + readonly iconId: long; + readonly userId: int; + readonly installTime: long; + + constructor() { } + constructor(applicationInfo: ApplicationInfo, + elementName: ElementName, + labelId: long, + iconId: long, + userId: int, + installTime: long) { + this.applicationInfo = applicationInfo; + this.elementName = elementName; + this.labelId = labelId; + this.iconId = iconId; + this.userId = userId; + this.installTime = installTime; + } +} \ No newline at end of file diff --git a/interfaces/kits/ani/overlay/BUILD.gn b/interfaces/kits/ani/overlay/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..b813bc12871d159e3e27f2d0ed443043b55a47a9 --- /dev/null +++ b/interfaces/kits/ani/overlay/BUILD.gn @@ -0,0 +1,110 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") + +ohos_shared_library("ani_overlay") { + shlib_type = "ani" + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + + include_dirs = [ + "${kits_path}/ani/common", + "${kits_path}/ani/overlay", + "${kits_path}/js/common", + ] + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + if (bundle_framework_overlay_install) { + sources = [ "ani_overlay.cpp" ] + } else { + sources = [ "ani_overlay_unsupported.cpp" ] + } + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/common:bundle_napi_common", + ] + + external_deps = [ + "ability_base:want", + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_single", + "napi:ace_napi", + "runtime_core:ani", + "runtime_core:ani_helpers", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + +generate_static_abc("overlay") { + base_url = "./ets" + files = [ "./ets/@ohos.bundle.overlay.ets" ] + is_boot_abc = "True" + device_dst_file = "/system/framework/overlay.abc" +} + +ohos_prebuilt_etc("overlay_etc") { + source = "$target_out_dir/overlay.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":overlay" ] +} + +generate_static_abc("overlay_module_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/OverlayModuleInfo.ets", + "./ets/bundleManager/OverlayModuleInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/overlay_module_info.abc" +} + +ohos_prebuilt_etc("overlay_module_info_etc") { + source = "$target_out_dir/overlay_module_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":overlay_module_info" ] +} diff --git a/interfaces/kits/ani/overlay/ani_overlay.cpp b/interfaces/kits/ani/overlay/ani_overlay.cpp new file mode 100644 index 0000000000000000000000000000000000000000..833c830c75656b1bab9121519e46aab9df8097b8 --- /dev/null +++ b/interfaces/kits/ani/overlay/ani_overlay.cpp @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "napi_constants.h" +#include "overlay_module_info.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_OVERLAY = "@ohos.bundle.overlay.overlay"; +} // namespace + +static void AniSetOverlayEnabled(ani_env *env, ani_string aniModuleName, ani_boolean aniIsEnabled) +{ + APP_LOGD("ani SetOverlayEnabled called"); + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName) || moduleName.empty()) { + APP_LOGE("moduleName %{public}s invalid", moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return; + } + bool isEnabled = CommonFunAni::AniBooleanToBool(aniIsEnabled); + + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("overlayMgrProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + SET_OVERLAY_ENABLED, Constants::PERMISSION_CHANGE_OVERLAY_ENABLED_STATE); + return; + } + + ErrCode ret = overlayMgrProxy->SetOverlayEnabledForSelf(moduleName, isEnabled); + if (ret != ERR_OK) { + APP_LOGE("SetOverlayEnabledForSelf failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + SET_OVERLAY_ENABLED, Constants::PERMISSION_CHANGE_OVERLAY_ENABLED_STATE); + return; + } +} + +static void AniSetOverlayEnabledByBundleName(ani_env *env, + ani_string aniBundleName, ani_string aniModuleName, ani_boolean aniIsEnabled) +{ + APP_LOGD("ani SetOverlayEnabledByBundleName called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName) || bundleName.empty()) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName) || moduleName.empty()) { + APP_LOGE("moduleName %{public}s invalid", moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return; + } + bool isEnabled = CommonFunAni::AniBooleanToBool(aniIsEnabled); + + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("overlayMgrProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + SET_OVERLAY_ENABLED_BY_BUNDLE_NAME, Constants::PERMISSION_CHANGE_OVERLAY_ENABLED_STATE); + return; + } + + ErrCode ret = overlayMgrProxy->SetOverlayEnabled(bundleName, moduleName, isEnabled); + if (ret != ERR_OK) { + APP_LOGE("SetOverlayEnabled failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + SET_OVERLAY_ENABLED_BY_BUNDLE_NAME, Constants::PERMISSION_CHANGE_OVERLAY_ENABLED_STATE); + return; + } +} + +static ani_object AniGetOverlayModuleInfo(ani_env *env, ani_string aniModuleName) +{ + APP_LOGD("ani GetOverlayModuleInfo called"); + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName) || moduleName.empty()) { + APP_LOGE("moduleName %{public}s invalid", moduleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, MODULE_NAME, TYPE_STRING); + return nullptr; + } + + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("overlayMgrProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + GET_OVERLAY_MODULE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + OverlayModuleInfo overlayModuleInfo; + + ErrCode ret = overlayMgrProxy->GetOverlayModuleInfo(moduleName, overlayModuleInfo); + if (ret != ERR_OK) { + APP_LOGE("GetOverlayModuleInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_OVERLAY_MODULE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + return CommonFunAni::ConvertOverlayModuleInfo(env, overlayModuleInfo); +} + +static ani_object AniGetTargetOverlayModuleInfos(ani_env *env, ani_string aniTargetModuleName) +{ + APP_LOGD("ani GetTargetOverlayModuleInfos called"); + std::string targetModuleName; + if (!CommonFunAni::ParseString(env, aniTargetModuleName, targetModuleName) || targetModuleName.empty()) { + APP_LOGE("targetModuleName %{public}s invalid", targetModuleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TARGET_MODULE_NAME, TYPE_STRING); + return nullptr; + } + + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("overlayMgrProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + GET_TARGET_OVERLAY_MODULE_INFOS, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + std::vector overlayModuleInfos; + + ErrCode ret = overlayMgrProxy->GetTargetOverlayModuleInfo(targetModuleName, overlayModuleInfos); + if (ret != ERR_OK) { + APP_LOGE("GetTargetOverlayModuleInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_TARGET_OVERLAY_MODULE_INFOS, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + ani_object overlayModuleInfosObject = CommonFunAni::ConvertAniArray( + env, overlayModuleInfos, CommonFunAni::ConvertOverlayModuleInfo); + if (overlayModuleInfosObject == nullptr) { + APP_LOGE("nullptr overlayModuleInfosObject"); + } + + return overlayModuleInfosObject; +} + +static ani_object AniGetOverlayModuleInfoByBundleName(ani_env *env, ani_string aniBundleName, ani_string aniModuleName) +{ + APP_LOGD("ani GetOverlayModuleInfoByBundleName called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName) || bundleName.empty()) { + APP_LOGE("bundleName %{public}s invalid", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGI("MoudleName undefined, default query for all module OverlayModuleInfo"); + } + + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("overlayMgrProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + std::vector overlayModuleInfos; + + ErrCode ret = overlayMgrProxy->GetOverlayModuleInfoByBundleName(bundleName, moduleName, overlayModuleInfos); + if (ret != ERR_OK) { + APP_LOGE("GetOverlayModuleInfoByBundleName failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + ani_object overlayModuleInfosObject = CommonFunAni::ConvertAniArray( + env, overlayModuleInfos, CommonFunAni::ConvertOverlayModuleInfo); + if (overlayModuleInfosObject == nullptr) { + APP_LOGE("nullptr overlayModuleInfosObject"); + } + + return overlayModuleInfosObject; +} + +static ani_object AniGetTargetOverlayModuleInfosByBundleName(ani_env *env, + ani_string aniTargetBundleName, ani_string aniModuleName) +{ + APP_LOGD("ani GetTargetOverlayModuleInfosByBundleName called"); + std::string targetBundleName; + if (!CommonFunAni::ParseString(env, aniTargetBundleName, targetBundleName) || targetBundleName.empty()) { + APP_LOGE("targetBundleName %{public}s invalid", targetBundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, TARGET_BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + std::string moduleName; + if (!CommonFunAni::ParseString(env, aniModuleName, moduleName)) { + APP_LOGI("MoudleName undefined, default query for all module OverlayModuleInfo"); + } + + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("overlayMgrProxy is null"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, + GET_TARGET_OVERLAY_MODULE_INFOS_BY_BUNDLE_NAME, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + std::vector overlayModuleInfos; + + ErrCode ret = overlayMgrProxy->GetOverlayModuleInfoForTarget(targetBundleName, moduleName, overlayModuleInfos); + if (ret != ERR_OK) { + APP_LOGE("GetOverlayModuleInfoForTarget failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), + GET_TARGET_OVERLAY_MODULE_INFOS_BY_BUNDLE_NAME, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + return nullptr; + } + + ani_object overlayModuleInfosObject = CommonFunAni::ConvertAniArray( + env, overlayModuleInfos, CommonFunAni::ConvertOverlayModuleInfo); + if (overlayModuleInfosObject == nullptr) { + APP_LOGE("nullptr overlayModuleInfosObject"); + } + + return overlayModuleInfosObject; +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor overlay called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = arkts::ani_signature::Builder::BuildNamespace(NS_NAME_OVERLAY); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_OVERLAY, status); + return status; + } + + std::array methods = { + ani_native_function { "setOverlayEnabledNative", nullptr, + reinterpret_cast(AniSetOverlayEnabled) }, + ani_native_function { "setOverlayEnabledByBundleNameNative", nullptr, + reinterpret_cast(AniSetOverlayEnabledByBundleName) }, + ani_native_function { "getOverlayModuleInfoNative", nullptr, + reinterpret_cast(AniGetOverlayModuleInfo) }, + ani_native_function { "getTargetOverlayModuleInfosNative", nullptr, + reinterpret_cast(AniGetTargetOverlayModuleInfos) }, + ani_native_function { "getOverlayModuleInfoByBundleNameNative", nullptr, + reinterpret_cast(AniGetOverlayModuleInfoByBundleName) }, + ani_native_function { "getTargetOverlayModuleInfosByBundleNameNative", nullptr, + reinterpret_cast(AniGetTargetOverlayModuleInfosByBundleName) } + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_OVERLAY, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/overlay/ani_overlay_unsupported.cpp b/interfaces/kits/ani/overlay/ani_overlay_unsupported.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6733433a83c3051229d0cad9f3ee193f024f64d2 --- /dev/null +++ b/interfaces/kits/ani/overlay/ani_overlay_unsupported.cpp @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "app_log_wrapper.h" +#include "bundle_errors.h" +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* NS_NAME_OVERLAY = "@ohos.bundle.overlay.overlay"; +} // namespace + +static void AniSetOverlayEnabled(ani_env *env, ani_string aniModuleName, ani_boolean aniIsEnabled) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Overlay not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_OVERLAY_ENABLED, ""); + return; +} + +static void AniSetOverlayEnabledByBundleName(ani_env *env, + ani_string aniBundleName, ani_string aniModuleName, ani_boolean aniIsEnabled) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Overlay not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, SET_OVERLAY_ENABLED_BY_BUNDLE_NAME, ""); + return; +} + +static ani_object AniGetOverlayModuleInfo(ani_env *env, ani_string aniModuleName) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Overlay not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_OVERLAY_MODULE_INFO, ""); + return nullptr; +} + +static ani_object AniGetTargetOverlayModuleInfos(ani_env *env, ani_string aniTargetModuleName) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Overlay not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_TARGET_OVERLAY_MODULE_INFOS, ""); + return nullptr; +} + +static ani_object AniGetOverlayModuleInfoByBundleName(ani_env *env, ani_string aniBundleName, ani_string aniModuleName) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Overlay not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME, ""); + return nullptr; +} + +static ani_object AniGetTargetOverlayModuleInfosByBundleName(ani_env *env, + ani_string aniTargetBundleName, ani_string aniModuleName) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Overlay not supported"); + BusinessErrorAni::ThrowCommonError( + env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_TARGET_OVERLAY_MODULE_INFOS_BY_BUNDLE_NAME, ""); + return nullptr; +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor overlay called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + RETURN_ANI_STATUS_IF_NOT_OK(status, "Unsupported ANI_VERSION_1"); + + arkts::ani_signature::Namespace nsName = arkts::ani_signature::Builder::BuildNamespace(NS_NAME_OVERLAY); + ani_namespace kitNs = nullptr; + status = env->FindNamespace(nsName.Descriptor().c_str(), &kitNs); + if (status != ANI_OK) { + APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_OVERLAY, status); + return status; + } + + std::array methods = { + ani_native_function { "setOverlayEnabledNative", nullptr, + reinterpret_cast(AniSetOverlayEnabled) }, + ani_native_function { "setOverlayEnabledByBundleNameNative", nullptr, + reinterpret_cast(AniSetOverlayEnabledByBundleName) }, + ani_native_function { "getOverlayModuleInfoNative", nullptr, + reinterpret_cast(AniGetOverlayModuleInfo) }, + ani_native_function { "getTargetOverlayModuleInfosNative", nullptr, + reinterpret_cast(AniGetTargetOverlayModuleInfos) }, + ani_native_function { "getOverlayModuleInfoByBundleNameNative", nullptr, + reinterpret_cast(AniGetOverlayModuleInfoByBundleName) }, + ani_native_function { "getTargetOverlayModuleInfosByBundleNameNative", nullptr, + reinterpret_cast(AniGetTargetOverlayModuleInfosByBundleName) } + }; + + status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); + if (status != ANI_OK) { + APP_LOGE("Namespace_BindNativeFunctions: %{public}s fail with %{public}d", NS_NAME_OVERLAY, status); + return status; + } + + *result = ANI_VERSION_1; + + APP_LOGI("ANI_Constructor finished"); + + return ANI_OK; +} +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/overlay/ets/@ohos.bundle.overlay.ets b/interfaces/kits/ani/overlay/ets/@ohos.bundle.overlay.ets new file mode 100644 index 0000000000000000000000000000000000000000..102baeae51e311e87ff17e3250e20dbb59dbcb66 --- /dev/null +++ b/interfaces/kits/ani/overlay/ets/@ohos.bundle.overlay.ets @@ -0,0 +1,298 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +import { AsyncCallback, BusinessError } from '@ohos.base'; +import { OverlayModuleInfo as _OverlayModuleInfo } from 'bundleManager.OverlayModuleInfo'; + +export default namespace overlay { + + loadLibrary("ani_overlay.z"); + + const ERROR_PARAM_CHECK_ERROR: int = 401; + const PARAM_MODULENAME_EMPTY_ERROR: string = "BusinessError 401: Parameter error. The type of moduleName must be string."; + const PARAM_BUNDLENAME_EMPTY_ERROR: string = "BusinessError 401: Parameter error. The type of bundleName must be string."; + const PARAM_TARGET_MODULENAME_EMPTY_ERROR: string = "BusinessError 401: Parameter error. The type of targetModuleName must be string."; + const PARAM_TARGET_BUNDLENAME_EMPTY_ERROR: string = "BusinessError 401: Parameter error. The type of targetBundleName must be string."; + + function createBusinessError(code: int, message: string) { + let err = new BusinessError(); + err.code = code; + err.name = 'Error'; + err.message = message; + return err; + } + + export native function setOverlayEnabledNative(moduleName: string, isEnabled: boolean): void; + export native function setOverlayEnabledByBundleNameNative(bundleName: string, moduleName: string, isEnabled: boolean): void; + export native function getOverlayModuleInfoNative(moduleName: string): OverlayModuleInfo; + export native function getTargetOverlayModuleInfosNative(targetModuleName: string): Array; + export native function getOverlayModuleInfoByBundleNameNative(bundleName: string, moduleName: string): Array; + export native function getTargetOverlayModuleInfosByBundleNameNative(targetBundleName: string, moduleName: string): Array; + + function setOverlayEnabled(moduleName: string, isEnabled: boolean, callback: AsyncCallback): void { + if (moduleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + } + let cb = (): void => { + return overlay.setOverlayEnabledNative(moduleName, isEnabled); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setOverlayEnabled(moduleName: string, isEnabled: boolean): Promise { + if (moduleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + } + let p = new Promise((resolve: (v: PromiseLike) => void, reject: (error: BusinessError) => void) : void => { + let cb = (): void => { + return overlay.setOverlayEnabledNative(moduleName, isEnabled); + }; + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function setOverlayEnabledByBundleName(bundleName: string, moduleName: string, isEnabled: boolean, callback: AsyncCallback): void { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + if (moduleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + } + let cb = (): void => { + return overlay.setOverlayEnabledByBundleNameNative(bundleName, moduleName, isEnabled); + }; + let p1 = taskpool.execute(cb); + p1.then(() => { + callback(null, undefined); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function setOverlayEnabledByBundleName(bundleName: string, moduleName: string, isEnabled: boolean): Promise { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + if (moduleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + } + let p = new Promise((resolve: (v: PromiseLike) => void, reject: (error: BusinessError) => void) : void => { + let cb = (): void => { + return overlay.setOverlayEnabledByBundleNameNative(bundleName, moduleName, isEnabled); + }; + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + } + ); + return p; + } + + function getOverlayModuleInfo(moduleName: string, callback: AsyncCallback): void { + if (moduleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + } + let cb = (): OverlayModuleInfo => { + return overlay.getOverlayModuleInfoNative(moduleName); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: OverlayModuleInfo = e as OverlayModuleInfo; + callback(null, result); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getOverlayModuleInfo(moduleName: string): Promise { + if (moduleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_MODULENAME_EMPTY_ERROR); + } + let p = new Promise((resolve: (overlayModuleInfo: OverlayModuleInfo) => void, reject: (error: BusinessError) => void) => { + let cb = (): OverlayModuleInfo => { + return overlay.getOverlayModuleInfoNative(moduleName); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: OverlayModuleInfo = e as OverlayModuleInfo; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getTargetOverlayModuleInfos(targetModuleName: string, callback: AsyncCallback>): void { + if (targetModuleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_TARGET_MODULENAME_EMPTY_ERROR); + } + let cb = (): (Array) => { + return overlay.getTargetOverlayModuleInfosNative(targetModuleName); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getTargetOverlayModuleInfos(targetModuleName: string): Promise> { + if (targetModuleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_TARGET_MODULENAME_EMPTY_ERROR); + } + let p = new Promise>((resolve: (arrOverlayModuleInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return overlay.getTargetOverlayModuleInfosNative(targetModuleName); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getOverlayModuleInfoByBundleName(bundleName: string, callback: AsyncCallback>): void { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + let cb = (): (Array) => { + return overlay.getOverlayModuleInfoByBundleNameNative(bundleName, ''); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getOverlayModuleInfoByBundleName(bundleName: string, moduleName: string, callback: AsyncCallback>): void { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + let cb = (): (Array) => { + return overlay.getOverlayModuleInfoByBundleNameNative(bundleName, moduleName); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getOverlayModuleInfoByBundleName(bundleName: string, moduleName?: string): Promise> { + if (bundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } + let moduleNameInfo: string = moduleName ?? ''; + let p = new Promise>((resolve: (arrOverlayModuleInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return overlay.getOverlayModuleInfoByBundleNameNative(bundleName, moduleNameInfo); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, callback: AsyncCallback>): void { + if (targetBundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_TARGET_BUNDLENAME_EMPTY_ERROR); + } + let cb = (): (Array) => { + return overlay.getTargetOverlayModuleInfosByBundleNameNative(targetBundleName, ''); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, moduleName: string, callback: AsyncCallback>): void { + if (targetBundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_TARGET_BUNDLENAME_EMPTY_ERROR); + } + let cb = (): (Array) => { + return overlay.getTargetOverlayModuleInfosByBundleNameNative(targetBundleName, moduleName); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getTargetOverlayModuleInfosByBundleName(targetBundleName: string, moduleName?: string): Promise> { + if (targetBundleName === "") { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_TARGET_BUNDLENAME_EMPTY_ERROR); + } + let moduleNameInfo: string = moduleName ?? ''; + let p = new Promise>((resolve: (arrOverlayModuleInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return overlay.getTargetOverlayModuleInfosByBundleNameNative(targetBundleName, moduleNameInfo); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + export type OverlayModuleInfo = _OverlayModuleInfo; +} diff --git a/interfaces/kits/ani/overlay/ets/bundleManager/OverlayModuleInfo.ets b/interfaces/kits/ani/overlay/ets/bundleManager/OverlayModuleInfo.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf763a8938e9bf21b7f037d61addf6820772e98e --- /dev/null +++ b/interfaces/kits/ani/overlay/ets/bundleManager/OverlayModuleInfo.ets @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +export interface OverlayModuleInfo { + readonly bundleName: string; + readonly moduleName: string; + readonly targetModuleName: string; + readonly priority: int; + readonly state: int; +} diff --git a/interfaces/kits/ani/overlay/ets/bundleManager/OverlayModuleInfoInner.ets b/interfaces/kits/ani/overlay/ets/bundleManager/OverlayModuleInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd56a0531ad1f857b13a500ae9a4cb98462b9183 --- /dev/null +++ b/interfaces/kits/ani/overlay/ets/bundleManager/OverlayModuleInfoInner.ets @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +import { OverlayModuleInfo } from 'bundleManager.OverlayModuleInfo'; + +export class OverlayModuleInfoInner implements OverlayModuleInfo { + public readonly bundleName: string = ''; + public readonly moduleName: string = ''; + public readonly targetModuleName: string = ''; + public readonly priority: int; + public readonly state: int; + + constructor() { } + constructor(bundleName: string, + moduleName: string, + targetModuleName: string, + priority: int, + state: int) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.targetModuleName = targetModuleName; + this.priority = priority; + this.state = state; + } +} diff --git a/interfaces/kits/ani/resource_manager/BUILD.gn b/interfaces/kits/ani/resource_manager/BUILD.gn index 2478af35fa3536ed65ed3da3052073a0265998c4..7c2d22c45c7d7b4db41c05226cc6aa445a25cdd8 100644 --- a/interfaces/kits/ani/resource_manager/BUILD.gn +++ b/interfaces/kits/ani/resource_manager/BUILD.gn @@ -16,6 +16,7 @@ import("//build/ohos.gni") import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") ohos_shared_library("ani_bundle_res_manager") { + shlib_type = "ani" branch_protector_ret = "pac_ret" sanitize = { @@ -26,6 +27,7 @@ ohos_shared_library("ani_bundle_res_manager") { integer_overflow = true ubsan = true } + include_dirs = [ "${inner_api_path}/appexecfwk_core/include", "${kits_path}/ani/resource_manager", @@ -34,13 +36,31 @@ ohos_shared_library("ani_bundle_res_manager") { "${kits_path}/js/bundle_resource", ] + defines = [] + external_deps = [] + if (bundle_framework_bundle_resource) { - sources = [ "ani_resource_manager.cpp" ] + defines += [ "BUNDLE_FRAMEWORK_BUNDLE_RESOURCE" ] + + sources = [ + "ani_resource_manager.cpp", + "ani_resource_manager_common.cpp", + "ani_resource_manager_drawable_utils.cpp", + ] + if (bundle_framework_graphics) { + defines += [ "BUNDLE_FRAMEWORK_GRAPHICS" ] + + external_deps += [ + "ace_engine:drawable_inner_ani", + "image_framework:image_native", + "resource_management:global_resmgr", + ] + } } else { sources = [ "ani_resource_manager_unsupport.cpp" ] } - defines = [ + defines += [ "APP_LOG_TAG = \"BMS\"", "LOG_DOMAIN = 0xD001120", ] @@ -64,7 +84,7 @@ ohos_shared_library("ani_bundle_res_manager") { "-fstack-protector-strong", ] - external_deps = [ + external_deps += [ "ability_base:want", "c_utils:utils", "common_event_service:cesfwk_core", @@ -113,3 +133,21 @@ ohos_prebuilt_etc("bundle_resource_manager_etc") { part_name = "bundle_framework" deps = [ ":bundle_resource_manager" ] } + +generate_static_abc("launcher_ability_resource_info") { + base_url = "./ets" + files = [ + "./ets/bundleManager/LauncherAbilityResourceInfo.ets", + "./ets/bundleManager/LauncherAbilityResourceInfoInner.ets", + ] + is_boot_abc = "True" + device_dst_file = "/system/framework/launcher_ability_resource_info.abc" +} + +ohos_prebuilt_etc("launcher_ability_resource_info_etc") { + source = "$target_out_dir/launcher_ability_resource_info.abc" + module_install_dir = "framework" + subsystem_name = "bundlemanager" + part_name = "bundle_framework" + deps = [ ":launcher_ability_resource_info" ] +} diff --git a/interfaces/kits/ani/resource_manager/ani_resource_manager.cpp b/interfaces/kits/ani/resource_manager/ani_resource_manager.cpp index ed014c87c7b11692e3ac45c1a3f6d807b3e30569..2a8a280e24de90663217eb0d0d4183229d7ce246 100644 --- a/interfaces/kits/ani/resource_manager/ani_resource_manager.cpp +++ b/interfaces/kits/ani/resource_manager/ani_resource_manager.cpp @@ -14,6 +14,7 @@ */ #include +#include "ani_resource_manager_common.h" #include "app_log_wrapper.h" #include "bundle_errors.h" #include "bundle_resource_info.h" @@ -28,14 +29,14 @@ namespace OHOS { namespace AppExecFwk { namespace { -constexpr int32_t INVALID_INT = -500; +constexpr int32_t INVALID_VALUE = -500; constexpr int32_t DEFAULT_RES_FLAG = 1; constexpr int32_t DEFAULT_IDX = 0; constexpr const char* NS_NAME_RESOURCEMANAGER = "@ohos.bundle.bundleResourceManager.bundleResourceManager"; } static ani_object AniGetBundleResourceInfo(ani_env* env, ani_string aniBundleName, - ani_double aniResFlag, ani_double aniAppIndex) + ani_int aniResFlag, ani_int aniAppIndex) { APP_LOGD("ani GetBundleResourceInfo called"); std::string bundleName; @@ -44,42 +45,154 @@ static ani_object AniGetBundleResourceInfo(ani_env* env, ani_string aniBundleNam BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); return nullptr; } - int32_t resFlag = 0; - if (!CommonFunAni::TryCastDoubleTo(aniResFlag, &resFlag)) { - APP_LOGE("Cast aniResFlag failed"); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, RESOURCE_FLAGS, TYPE_NUMBER); + + if (aniResFlag == INVALID_VALUE) { + aniResFlag = DEFAULT_RES_FLAG; + } + + if (aniAppIndex == INVALID_VALUE) { + aniAppIndex = DEFAULT_IDX; + } + + BundleResourceInfo bundleResInfo; + int32_t ret = ResourceHelper::InnerGetBundleResourceInfo( + bundleName, static_cast(aniResFlag), aniAppIndex, bundleResInfo); + if (ret != ERR_OK) { + APP_LOGE("GetBundleResourceInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_BUNDLE_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); return nullptr; } - int32_t appIndex = 0; - if (!CommonFunAni::TryCastDoubleTo(aniAppIndex, &appIndex)) { - APP_LOGE("Cast aniAppIndex failed"); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, APP_INDEX, TYPE_NUMBER); + + return AniResourceManagerCommon::ConvertBundleResourceInfo(env, bundleResInfo); +} + +static ani_object AniGetLauncherAbilityResourceInfo(ani_env* env, ani_string aniBundleName, + ani_int aniResFlag, ani_int aniAppIndex) +{ + APP_LOGD("ani GetLauncherAbilityResourceInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName) || bundleName.empty()) { + APP_LOGE("parse bundleName %{public}s failed", bundleName.c_str()); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); return nullptr; } - auto resourceMgr = ResourceHelper::GetBundleResourceMgr(); - if (resourceMgr == nullptr) { - APP_LOGE("GetBundleResourceMgr failed"); + + if (aniResFlag == INVALID_VALUE) { + aniResFlag = DEFAULT_RES_FLAG; + } + + if (aniAppIndex == INVALID_VALUE) { + aniAppIndex = DEFAULT_IDX; + } + + std::vector launcherAbilityResourceInfos; + int32_t ret = ResourceHelper::InnerGetLauncherAbilityResourceInfo( + bundleName, static_cast(aniResFlag), aniAppIndex, launcherAbilityResourceInfos); + if (ret != ERR_OK) { + APP_LOGE("GetLauncherAbilityResourceInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, + GET_LAUNCHER_ABILITY_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); return nullptr; } - if (resFlag == INVALID_INT) { - resFlag = DEFAULT_RES_FLAG; + ani_object launcherAbilityResourceInfosObject = CommonFunAni::ConvertAniArray( + env, launcherAbilityResourceInfos, AniResourceManagerCommon::ConvertLauncherAbilityResourceInfo); + if (launcherAbilityResourceInfosObject == nullptr) { + APP_LOGE("nullptr launcherAbilityResourceInfosObject"); + } + + return launcherAbilityResourceInfosObject; +} + +static ani_object AniGetAllBundleResourceInfo(ani_env* env, ani_int aniResFlag) +{ + APP_LOGD("ani GetAllBundleResourceInfo called"); + + std::vector bundleResourceInfos; + int32_t ret = ResourceHelper::InnerGetAllBundleResourceInfo(static_cast(aniResFlag), bundleResourceInfos); + if (ret != ERR_OK) { + APP_LOGE("GetLauncherAbilityResourceInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, GET_ALL_BUNDLE_RESOURCE_INFO, PERMISSION_GET_ALL_BUNDLE_RESOURCES); + return nullptr; } - if (appIndex == INVALID_INT) { - appIndex = DEFAULT_IDX; + ani_object bundleResourceInfosObject = CommonFunAni::ConvertAniArray( + env, bundleResourceInfos, AniResourceManagerCommon::ConvertBundleResourceInfo); + if (bundleResourceInfosObject == nullptr) { + APP_LOGE("nullptr bundleResourceInfosObject"); } - BundleResourceInfo bundleResInfo; - int32_t ret = resourceMgr->GetBundleResourceInfo(bundleName, resFlag, bundleResInfo, appIndex); + return bundleResourceInfosObject; +} + +static ani_object AniGetAllLauncherAbilityResourceInfo(ani_env* env, ani_int aniResFlag) +{ + APP_LOGD("ani GetAllLauncherAbilityResourceInfo called"); + + std::vector launcherAbilityResourceInfos; + int32_t ret = ResourceHelper::InnerGetAllLauncherAbilityResourceInfo( + static_cast(aniResFlag), launcherAbilityResourceInfos); if (ret != ERR_OK) { - APP_LOGE("GetBundleResourceInfo failed ret: %{public}d", ret); + APP_LOGE("GetLauncherAbilityResourceInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, ret, + GET_ALL_LAUNCHER_ABILITY_RESOURCE_INFO, PERMISSION_GET_ALL_BUNDLE_RESOURCES); + return nullptr; + } + + ani_object launcherAbilityResourceInfosObject = CommonFunAni::ConvertAniArray( + env, launcherAbilityResourceInfos, AniResourceManagerCommon::ConvertLauncherAbilityResourceInfo); + if (launcherAbilityResourceInfosObject == nullptr) { + APP_LOGE("nullptr launcherAbilityResourceInfosObject"); + } + + return launcherAbilityResourceInfosObject; +} + +static ani_object GetExtensionAbilityResourceInfoNative(ani_env* env, ani_string aniBundleName, + ani_enum_item aniExtensionAbilityType, ani_int aniResourceFlags, ani_int aniAppIndex) +{ + APP_LOGD("ani GetExtensionAbilityResourceInfo called"); + std::string bundleName; + if (!CommonFunAni::ParseString(env, aniBundleName, bundleName)) { + APP_LOGE("parse bundleName failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); + return nullptr; + } + if (bundleName.empty()) { + APP_LOGE("bundleName empty"); BusinessErrorAni::ThrowCommonError( - env, CommonFunc::ConvertErrCode(ret), GET_BUNDLE_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); + env, ERROR_BUNDLE_NOT_EXIST, GET_EXTENSION_ABILITY_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); + return nullptr; + } + ExtensionAbilityType extensionAbilityType = ExtensionAbilityType::UNSPECIFIED; + if (!EnumUtils::EnumETSToNative(env, aniExtensionAbilityType, extensionAbilityType)) { + APP_LOGE("Parse extensionAbilityType failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, EXTENSION_ABILITY_TYPE, TYPE_NUMBER); return nullptr; } + if (aniResourceFlags <= 0) { + aniResourceFlags = static_cast(ResourceFlag::GET_RESOURCE_INFO_ALL); + } + if (aniAppIndex == INVALID_VALUE) { + aniAppIndex = DEFAULT_IDX; + } - return CommonFunAni::ConvertBundleResourceInfo(env, bundleResInfo); + std::vector extensionAbilityResourceInfos; + ErrCode ret = ResourceHelper::InnerGetExtensionAbilityResourceInfo( + bundleName, extensionAbilityType, aniResourceFlags, aniAppIndex, extensionAbilityResourceInfos); + if (ret != ERR_OK) { + APP_LOGE("QueryExtensionAbilityInfo failed ret: %{public}d", ret); + BusinessErrorAni::ThrowCommonError( + env, ret, GET_EXTENSION_ABILITY_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); + return nullptr; + } + ani_object launcherAbilityResourceInfosObject = CommonFunAni::ConvertAniArray( + env, extensionAbilityResourceInfos, AniResourceManagerCommon::ConvertLauncherAbilityResourceInfo); + if (launcherAbilityResourceInfosObject == nullptr) { + APP_LOGE("nullptr launcherAbilityResourceInfosObject"); + } + return launcherAbilityResourceInfosObject; } extern "C" { @@ -101,6 +214,14 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) std::array methods = { ani_native_function { "getBundleResourceInfoNative", nullptr, reinterpret_cast(AniGetBundleResourceInfo) }, + ani_native_function { "getLauncherAbilityResourceInfoNative", nullptr, + reinterpret_cast(AniGetLauncherAbilityResourceInfo) }, + ani_native_function { "getAllBundleResourceInfoNative", nullptr, + reinterpret_cast(AniGetAllBundleResourceInfo) }, + ani_native_function { "getAllLauncherAbilityResourceInfoNative", nullptr, + reinterpret_cast(AniGetAllLauncherAbilityResourceInfo) }, + ani_native_function { "getExtensionAbilityResourceInfoNative", nullptr, + reinterpret_cast(GetExtensionAbilityResourceInfoNative) } }; status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); diff --git a/interfaces/kits/ani/resource_manager/ani_resource_manager_common.cpp b/interfaces/kits/ani/resource_manager/ani_resource_manager_common.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b2ae8b62d092394ef8f2aee754a040b22cb8734c --- /dev/null +++ b/interfaces/kits/ani/resource_manager/ani_resource_manager_common.cpp @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "ani_resource_manager_common.h" +#include "ani_resource_manager_drawable_utils.h" +#include "common_fun_ani.h" + +namespace OHOS { +namespace AppExecFwk { + +namespace { +constexpr const char* CLASSNAME_BUNDLE_RES_INFO_INNER = + "bundleManager.BundleResourceInfoInner.BundleResourceInfoInner"; +constexpr const char* CLASSNAME_LAUNCHER_ABILITY_RESOURCE_INFO_INNER = + "bundleManager.LauncherAbilityResourceInfoInner.LauncherAbilityResourceInfoInner"; +constexpr const char* CLASSNAME_DRAWABLE_DESCRIPTOR = "@ohos.arkui.drawableDescriptor.DrawableDescriptor"; +} + +ani_object AniResourceManagerCommon::ConvertBundleResourceInfo(ani_env* env, const BundleResourceInfo& bundleResInfo) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, bundleResInfo.bundleName, bundleName)); + + // icon: string + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, bundleResInfo.icon, icon)); + + // label: string + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, bundleResInfo.label, label)); + + // drawableDecriptor: DrawableDescriptor + ani_ref drawableDecriptor = nullptr; + ani_object drawableDecriptorObj = AniResourceManagerDrawableUtils::ConvertDrawableDescriptor(env, + bundleResInfo.foreground, bundleResInfo.background); + if (drawableDecriptorObj == nullptr) { + ani_status status = env->GetNull(&drawableDecriptor); + if (status != ANI_OK) { + APP_LOGE("GetNull failed %{public}d", status); + return nullptr; + } + } else { + drawableDecriptor = drawableDecriptorObj; + } + + ani_value args[] = { + { .r = bundleName }, + { .r = icon }, + { .r = label }, + { .r = drawableDecriptor }, + { .i = bundleResInfo.appIndex }, + }; + static const std::string ctorSig = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddClass(CLASSNAME_DRAWABLE_DESCRIPTOR) // drawableDecriptor: DrawableDescriptor + .AddInt() // appIndex: int + .BuildSignatureDescriptor(); + return CommonFunAni::CreateNewObjectByClassV2(env, CLASSNAME_BUNDLE_RES_INFO_INNER, ctorSig, args); +} + +ani_object AniResourceManagerCommon::ConvertLauncherAbilityResourceInfo(ani_env* env, + const LauncherAbilityResourceInfo& launcherAbilityResourceInfo) +{ + RETURN_NULL_IF_NULL(env); + + // bundleName: string + ani_string bundleName = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, launcherAbilityResourceInfo.bundleName, bundleName)); + + // moduleName: string + ani_string moduleName = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, launcherAbilityResourceInfo.moduleName, moduleName)); + + // abilityName: string + ani_string abilityName = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, launcherAbilityResourceInfo.abilityName, abilityName)); + + // icon: string + ani_string icon = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, launcherAbilityResourceInfo.icon, icon)); + + // label: string + ani_string label = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, launcherAbilityResourceInfo.label, label)); + + // drawableDescriptor: DrawableDescriptor + ani_ref drawableDecriptor = nullptr; + ani_object drawableDecriptorObj = AniResourceManagerDrawableUtils::ConvertDrawableDescriptor(env, + launcherAbilityResourceInfo.foreground, launcherAbilityResourceInfo.background); + if (drawableDecriptorObj == nullptr) { + ani_status status = env->GetNull(&drawableDecriptor); + if (status != ANI_OK) { + APP_LOGE("GetNull failed %{public}d", status); + return nullptr; + } + } else { + drawableDecriptor = drawableDecriptorObj; + } + + ani_value args[] = { + { .r = bundleName }, + { .r = moduleName }, + { .r = abilityName }, + { .r = icon }, + { .r = label }, + { .r = drawableDecriptor }, + { .i = launcherAbilityResourceInfo.appIndex }, + }; + static const std::string ctorSig = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // bundleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // moduleName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // abilityName: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // icon: string + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // label: string + .AddClass(CLASSNAME_DRAWABLE_DESCRIPTOR) // drawableDecriptor: DrawableDescriptor + .AddInt() // appIndex: int + .BuildSignatureDescriptor(); + return CommonFunAni::CreateNewObjectByClassV2(env, CLASSNAME_LAUNCHER_ABILITY_RESOURCE_INFO_INNER, ctorSig, args); +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/resource_manager/ani_resource_manager_common.h b/interfaces/kits/ani/resource_manager/ani_resource_manager_common.h new file mode 100644 index 0000000000000000000000000000000000000000..a8fceada4beab62e88f88bac89387f86e5c18a3a --- /dev/null +++ b/interfaces/kits/ani/resource_manager/ani_resource_manager_common.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INTERFACE_KITS_ANI_RESOURCE_MANAGER_CONVERT_H +#define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INTERFACE_KITS_ANI_RESOURCE_MANAGER_CONVERT_H + +#include + +#include "bundle_mgr_interface.h" + +namespace OHOS { +namespace AppExecFwk { +class AniResourceManagerCommon { +public: + static ani_object ConvertBundleResourceInfo(ani_env* env, const BundleResourceInfo& bundleResInfo); + static ani_object ConvertLauncherAbilityResourceInfo( + ani_env* env, const LauncherAbilityResourceInfo& launcherAbilityResInfo); +}; +} +} +#endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INTERFACE_KITS_ANI_RESOURCE_MANAGER_CONVERT_H \ No newline at end of file diff --git a/interfaces/kits/ani/resource_manager/ani_resource_manager_drawable_utils.cpp b/interfaces/kits/ani/resource_manager/ani_resource_manager_drawable_utils.cpp new file mode 100644 index 0000000000000000000000000000000000000000..58f0ca16420df34c3fea1fcbe5d5062f45691ace --- /dev/null +++ b/interfaces/kits/ani/resource_manager/ani_resource_manager_drawable_utils.cpp @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ani_resource_manager_drawable_utils.h" + +#ifdef BUNDLE_FRAMEWORK_GRAPHICS +#include "app_log_wrapper.h" +#include "drawable_descriptor_ani.h" +#include "resource_manager.h" +#endif +namespace OHOS { +namespace AppExecFwk { +#ifdef BUNDLE_FRAMEWORK_GRAPHICS +std::shared_ptr AniResourceManagerDrawableUtils::resourceManager_ = nullptr; +std::mutex AniResourceManagerDrawableUtils::resMutex_; + +void AniResourceManagerDrawableUtils::InitResourceManager() +{ + std::lock_guard lock(resMutex_); + if (resourceManager_ == nullptr) { + std::unique_ptr resConfig(Global::Resource::CreateResConfig()); + if (resConfig == nullptr) { + APP_LOGE("resConfig is nullptr"); + return; + } + resourceManager_ = + std::shared_ptr(Global::Resource::CreateResourceManager( + "bundleName", "moduleName", "", std::vector(), *resConfig)); + } +} +#endif + +ani_object AniResourceManagerDrawableUtils::ConvertDrawableDescriptor(ani_env* env, + const std::vector &foreground, const std::vector &background) +{ +#ifdef BUNDLE_FRAMEWORK_GRAPHICS + if (foreground.empty() && background.empty()) { + APP_LOGE("foreground and background empty"); + return nullptr; + } + InitResourceManager(); + if (resourceManager_ == nullptr) { + APP_LOGE("resourceManager_ is nullptr"); + return nullptr; + } + + OHOS::Ace::Ani::DrawableInfo drawableInfo; + drawableInfo.manager = resourceManager_; + size_t lenForeground = foreground.size(); + drawableInfo.firstBuffer.data = std::make_unique(lenForeground); + drawableInfo.firstBuffer.len = lenForeground; + std::copy(foreground.data(), foreground.data() + lenForeground, drawableInfo.firstBuffer.data.get()); + + if (background.empty()) { + // base-icon + drawableInfo.type = "none"; + return OHOS::Ace::Ani::DrawableDescriptorAni::CreateDrawableDescriptor(env, drawableInfo); + } + // layered-icon + drawableInfo.type = "layered"; + size_t lenBackground = background.size(); + drawableInfo.secondBuffer.data = std::make_unique(lenBackground); + drawableInfo.secondBuffer.len = lenBackground; + std::copy(background.data(), background.data() + lenBackground, drawableInfo.secondBuffer.data.get()); + return OHOS::Ace::Ani::DrawableDescriptorAni::CreateDrawableDescriptor(env, drawableInfo); +#else + return nullptr; +#endif +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/resource_manager/ani_resource_manager_drawable_utils.h b/interfaces/kits/ani/resource_manager/ani_resource_manager_drawable_utils.h new file mode 100644 index 0000000000000000000000000000000000000000..443775d48a8fc30d337c34e43cbc24d10e923a27 --- /dev/null +++ b/interfaces/kits/ani/resource_manager/ani_resource_manager_drawable_utils.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INTERFACE_KITS_ANI_ANI_RESOURCE_MANAGER_DRAWABLE_UTILS_H +#define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INTERFACE_KITS_ANI_ANI_RESOURCE_MANAGER_DRAWABLE_UTILS_H + +#include +#include +#include + +#ifdef BUNDLE_FRAMEWORK_GRAPHICS +#include +#include "resource_manager.h" +#endif + +namespace OHOS { +namespace AppExecFwk { +class AniResourceManagerDrawableUtils { +public: + static ani_object ConvertDrawableDescriptor(ani_env* env, + const std::vector &foreground, const std::vector &background); + +private: +#ifdef BUNDLE_FRAMEWORK_GRAPHICS + static void InitResourceManager(); + + static std::shared_ptr resourceManager_; + static std::mutex resMutex_; +#endif +}; +} // AppExecFwk +} // OHOS +#endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INTERFACE_KITS_ANI_ANI_RESOURCE_MANAGER_DRAWABLE_UTILS_H \ No newline at end of file diff --git a/interfaces/kits/ani/resource_manager/ani_resource_manager_unsupport.cpp b/interfaces/kits/ani/resource_manager/ani_resource_manager_unsupport.cpp index a224910ecef36fb076a22b3d255b9e3800b69415..a57ff20aed5e0fa6902da5aa3e782d4dafc87336 100644 --- a/interfaces/kits/ani/resource_manager/ani_resource_manager_unsupport.cpp +++ b/interfaces/kits/ani/resource_manager/ani_resource_manager_unsupport.cpp @@ -27,13 +27,43 @@ constexpr const char* NS_NAME_RESOURCEMANAGER = "@ohos.bundle.bundleResourceMana } static ani_object AniGetBundleResourceInfo(ani_env* env, ani_string aniBundleName, - ani_double aniResFlag, ani_double aniAppIndex) + ani_long aniResFlag, ani_int aniAppIndex) { APP_LOGI("SystemCapability.BundleManager.BundleFramework.Resource not supported"); BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_BUNDLE_RESOURCE_INFO, ""); return nullptr; } +static ani_object AniGetLauncherAbilityResourceInfo(ani_env* env, ani_string aniBundleName, + ani_long aniResFlag, ani_int aniAppIndex) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Resource not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_LAUNCHER_ABILITY_RESOURCE_INFO, ""); + return nullptr; +} + +static ani_object AniGetAllBundleResourceInfo(ani_env* env, ani_long aniResFlag) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Resource not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_ALL_BUNDLE_RESOURCE_INFO, ""); + return nullptr; +} + +static ani_object AniGetAllLauncherAbilityResourceInfo(ani_env* env, ani_long aniResFlag) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Resource not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_ALL_LAUNCHER_ABILITY_RESOURCE_INFO, ""); + return nullptr; +} + +static ani_object GetExtensionAbilityResourceInfoNative(ani_env* env, ani_string aniBundleName, + ani_enum_item aniExtensionAbilityType, ani_int aniResourceFlags, ani_int aniAppIndex) +{ + APP_LOGI("SystemCapability.BundleManager.BundleFramework.Resource not supported"); + BusinessErrorAni::ThrowCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, GET_EXTENSION_ABILITY_RESOURCE_INFO, ""); + return nullptr; +} + extern "C" { ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) { @@ -53,6 +83,14 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) std::array methods = { ani_native_function { "getBundleResourceInfoNative", nullptr, reinterpret_cast(AniGetBundleResourceInfo) }, + ani_native_function { "getLauncherAbilityResourceInfoNative", nullptr, + reinterpret_cast(AniGetLauncherAbilityResourceInfo) }, + ani_native_function { "getAllBundleResourceInfoNative", nullptr, + reinterpret_cast(AniGetAllBundleResourceInfo) }, + ani_native_function { "getAllLauncherAbilityResourceInfoNative", nullptr, + reinterpret_cast(AniGetAllLauncherAbilityResourceInfo) }, + ani_native_function { "getExtensionAbilityResourceInfoNative", nullptr, + reinterpret_cast(GetExtensionAbilityResourceInfoNative) } }; status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); diff --git a/interfaces/kits/ani/resource_manager/ets/@ohos.bundle.bundleResourceManager.ets b/interfaces/kits/ani/resource_manager/ets/@ohos.bundle.bundleResourceManager.ets index 0ecc50c14bd016460124049e5afc77681ab4daf1..72d828bcd71c2424e730a32b795055a31e1c0dce 100644 --- a/interfaces/kits/ani/resource_manager/ets/@ohos.bundle.bundleResourceManager.ets +++ b/interfaces/kits/ani/resource_manager/ets/@ohos.bundle.bundleResourceManager.ets @@ -18,13 +18,16 @@ * @kit AbilityKit */ +import { AsyncCallback, BusinessError } from '@ohos.base'; import { BundleResourceInfo } from 'bundleManager.BundleResourceInfo'; +import { LauncherAbilityResourceInfo } from 'bundleManager.LauncherAbilityResourceInfo'; +import bundleManager from '@ohos.bundle.bundleManager'; export default namespace bundleResourceManager { loadLibrary("ani_bundle_res_manager.z"); - const INVALID_INT: number = -500; + const INVALID_VALUE: int = -500; enum ResourceFlag { GET_RESOURCE_INFO_ALL = 0x00000001, @@ -35,18 +38,98 @@ export default namespace bundleResourceManager { GET_RESOURCE_INFO_ONLY_WITH_MAIN_ABILITY = 0x00000020 } - export native function getBundleResourceInfoNative(bundleName: string, resourceFlags: number, appIndex: number): BundleResourceInfo; + export native function getBundleResourceInfoNative(bundleName: string, resourceFlags: int, appIndex: int): BundleResourceInfo; + export native function getLauncherAbilityResourceInfoNative(bundleName: string, resourceFlags: int, appIndex: int): Array; + export native function getAllBundleResourceInfoNative(resourceFlags: int): Array; + export native function getAllLauncherAbilityResourceInfoNative(resourceFlags: int): Array; + export native function getExtensionAbilityResourceInfoNative(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, resourceFlags: int, appIndex: int): Array; - function getBundleResourceInfo(bundleName: string, resourceFlags?: number): BundleResourceInfo + function getBundleResourceInfo(bundleName: string, resourceFlags?: int): BundleResourceInfo { - let resFlag = resourceFlags ?? INVALID_INT; - return bundleResourceManager.getBundleResourceInfoNative(bundleName, resFlag, INVALID_INT); + let resFlag = resourceFlags ?? INVALID_VALUE; + return bundleResourceManager.getBundleResourceInfoNative(bundleName, resFlag, INVALID_VALUE); } - function getBundleResourceInfo(bundleName: string, resourceFlags?: number, appIndex?: number): BundleResourceInfo + function getBundleResourceInfo(bundleName: string, resourceFlags?: int, appIndex?: int): BundleResourceInfo { - let resFlag = resourceFlags ?? INVALID_INT; - let appIdx = appIndex ?? INVALID_INT; + let resFlag = resourceFlags ?? INVALID_VALUE; + let appIdx = appIndex ?? INVALID_VALUE; return bundleResourceManager.getBundleResourceInfoNative(bundleName, resFlag, appIdx); } + + function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: int): Array + { + let resFlag = resourceFlags ?? INVALID_VALUE; + return bundleResourceManager.getLauncherAbilityResourceInfoNative(bundleName, resFlag, INVALID_VALUE); + } + + function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: int, appIndex?: int): Array + { + let resFlag = resourceFlags ?? INVALID_VALUE; + let appIdx = appIndex ?? INVALID_VALUE; + return bundleResourceManager.getLauncherAbilityResourceInfoNative(bundleName, resFlag, appIdx); + } + + function getExtensionAbilityResourceInfo(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, resourceFlags: int, appIndex?: int): Array { + let appIdx = appIndex ?? INVALID_VALUE; + return getExtensionAbilityResourceInfoNative(bundleName, extensionAbilityType, resourceFlags, appIdx); + } + + function getAllBundleResourceInfo(resourceFlags: int, callback: AsyncCallback>): void { + let cb = (): (Array) => { + return bundleResourceManager.getAllBundleResourceInfoNative(resourceFlags); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllBundleResourceInfo(resourceFlags: int): Promise> { + let p = new Promise>((resolve: (arrBundleResourceInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return bundleResourceManager.getAllBundleResourceInfoNative(resourceFlags); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getAllLauncherAbilityResourceInfo(resourceFlags: int, callback: AsyncCallback>): void { + let cb = (): (Array) => { + return bundleResourceManager.getAllLauncherAbilityResourceInfoNative(resourceFlags); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + callback(null, resultArray); + }, (err: Error): void => { + callback(err as BusinessError, undefined); + }); + } + + function getAllLauncherAbilityResourceInfo(resourceFlags: int): Promise> { + let p = new Promise>((resolve: (arrLauncherAbilityResourceInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return bundleResourceManager.getAllLauncherAbilityResourceInfoNative(resourceFlags); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } } \ No newline at end of file diff --git a/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfo.ets b/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfo.ets index 1cf0f5cd31b2a2ef49e6f9b144a1374e2fceeac9..5fed6eea7fd379dc79ce431c7290af557e5282e7 100644 --- a/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfo.ets +++ b/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfo.ets @@ -13,9 +13,12 @@ * limitations under the License. */ +import { DrawableDescriptor } from '@ohos.arkui.drawableDescriptor'; + export interface BundleResourceInfo { readonly bundleName: string; readonly icon: string; readonly label: string; - readonly appIndex: number; + readonly drawableDescriptor: DrawableDescriptor | null; + readonly appIndex: int; } \ No newline at end of file diff --git a/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfoInner.ets b/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfoInner.ets index a54fdcd2bcc181d0007d91989c26cec9f758e28c..0b50cc4d188e195c8c75d3e69c6b5c94e6cfe4bc 100644 --- a/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfoInner.ets +++ b/interfaces/kits/ani/resource_manager/ets/bundleManager/BundleResourceInfoInner.ets @@ -14,10 +14,25 @@ */ import { BundleResourceInfo } from 'bundleManager.BundleResourceInfo'; +import { DrawableDescriptor } from '@ohos.arkui.drawableDescriptor'; export class BundleResourceInfoInner implements BundleResourceInfo { readonly bundleName: string = ''; readonly icon: string = ''; readonly label: string = ''; - readonly appIndex: number; + readonly drawableDescriptor: DrawableDescriptor | null = null; + readonly appIndex: int; + + constructor() { } + constructor(bundleName: string, + icon: string, + label: string, + drawableDescriptor: DrawableDescriptor, + appIndex: int) { + this.bundleName = bundleName; + this.icon = icon; + this.label = label; + this.drawableDescriptor = drawableDescriptor; + this.appIndex = appIndex; + } } diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.js b/interfaces/kits/ani/resource_manager/ets/bundleManager/LauncherAbilityResourceInfo.ets old mode 100755 new mode 100644 similarity index 59% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.js rename to interfaces/kits/ani/resource_manager/ets/bundleManager/LauncherAbilityResourceInfo.ets index eb5be916aa414adb35cf8541635725d702a893dc..ef2b8dbd9f94d4635b48adc5d6629d92fde1ef8e --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.js +++ b/interfaces/kits/ani/resource_manager/ets/bundleManager/LauncherAbilityResourceInfo.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,14 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } +import { DrawableDescriptor } from '@ohos.arkui.drawableDescriptor'; + +export interface LauncherAbilityResourceInfo { + readonly bundleName: string; + readonly moduleName: string; + readonly abilityName: string; + readonly icon: string; + readonly label: string; + readonly drawableDescriptor: DrawableDescriptor | null; + readonly appIndex: int; } diff --git a/interfaces/kits/ani/resource_manager/ets/bundleManager/LauncherAbilityResourceInfoInner.ets b/interfaces/kits/ani/resource_manager/ets/bundleManager/LauncherAbilityResourceInfoInner.ets new file mode 100644 index 0000000000000000000000000000000000000000..daabeb8a791c216b8e86c5696436cad74d98977e --- /dev/null +++ b/interfaces/kits/ani/resource_manager/ets/bundleManager/LauncherAbilityResourceInfoInner.ets @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { DrawableDescriptor } from '@ohos.arkui.drawableDescriptor'; +import { LauncherAbilityResourceInfo } from 'bundleManager.LauncherAbilityResourceInfo'; + +export class LauncherAbilityResourceInfoInner implements LauncherAbilityResourceInfo { + readonly bundleName: string = ''; + readonly moduleName: string = ''; + readonly abilityName: string = ''; + readonly icon: string = ''; + readonly label: string = ''; + readonly drawableDescriptor: DrawableDescriptor | null = null; + readonly appIndex: int; + + constructor() { } + constructor(bundleName: string, + moduleName: string, + abilityName: string, + icon: string, + label: string, + drawableDescriptor: DrawableDescriptor, + appIndex: int) { + this.bundleName = bundleName; + this.moduleName = moduleName; + this.abilityName = abilityName; + this.icon = icon; + this.label = label; + this.drawableDescriptor = drawableDescriptor; + this.appIndex = appIndex; + } +} diff --git a/interfaces/kits/ani/shortcut_manager/ani_shortcut_manager.cpp b/interfaces/kits/ani/shortcut_manager/ani_shortcut_manager.cpp index 2ebcca46e717289c6bf2ef4b1de676a8e457ccab..2554df07f88aa3e41715f342a51d4983e3d569fb 100644 --- a/interfaces/kits/ani/shortcut_manager/ani_shortcut_manager.cpp +++ b/interfaces/kits/ani/shortcut_manager/ani_shortcut_manager.cpp @@ -27,26 +27,17 @@ namespace OHOS { namespace AppExecFwk { namespace { -constexpr const char* PARSE_SHORTCUT_INFO = "ParseShortCutInfo"; constexpr const char* NS_NAME_SHORTCUTMANAGER = "@ohos.bundle.shortcutManager.shortcutManager"; } -static void AniAddDesktopShortcutInfo(ani_env* env, ani_object info, ani_double aniUserId) +static void AniAddDesktopShortcutInfo(ani_env* env, ani_object info, ani_int aniUserId) { APP_LOGD("ani AddDesktopShortcutInfo called"); - int32_t userId = 0; - if (!CommonFunAni::TryCastDoubleTo(aniUserId, &userId)) { - APP_LOGE("Cast aniUserId failed"); - BusinessErrorAni::ThrowCommonError( - env, ERROR_PARAM_CHECK_ERROR, USER_ID, TYPE_NUMBER); - return; - } - ShortcutInfo shortcutInfo; if (!CommonFunAni::ParseShortcutInfo(env, info, shortcutInfo) || !CommonFunc::CheckShortcutInfo(shortcutInfo)) { - BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); - APP_LOGE("Parse shortcutInfo err. userId:%{public}d", userId); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_SHORTCUT_INFO_ERROR); + APP_LOGE("Parse shortcutInfo err. userId:%{public}d", aniUserId); return; } @@ -56,30 +47,22 @@ static void AniAddDesktopShortcutInfo(ani_env* env, ani_object info, ani_double BusinessErrorAni::ThrowError(env, ERR_APPEXECFWK_SERVICE_NOT_READY, ADD_DESKTOP_SHORTCUT_INFO); return; } - ErrCode ret = iBundleMgr->AddDesktopShortcutInfo(shortcutInfo, userId); + ErrCode ret = iBundleMgr->AddDesktopShortcutInfo(shortcutInfo, aniUserId); if (ret != ERR_OK) { - APP_LOGE("AddDesktopShortcutInfo failed ret:%{public}d,userId:%{public}d", ret, userId); + APP_LOGE("AddDesktopShortcutInfo failed ret:%{public}d,userId:%{public}d", ret, aniUserId); BusinessErrorAni::ThrowCommonError( env, CommonFunc::ConvertErrCode(ret), ADD_DESKTOP_SHORTCUT_INFO, Constants::PERMISSION_MANAGER_SHORTCUT); } } -static void AniDeleteDesktopShortcutInfo(ani_env* env, ani_object info, ani_double aniUserId) +static void AniDeleteDesktopShortcutInfo(ani_env* env, ani_object info, ani_int aniUserId) { APP_LOGD("ani DeleteDesktopShortcutInfo called"); - int32_t userId = 0; - if (!CommonFunAni::TryCastDoubleTo(aniUserId, &userId)) { - APP_LOGE("Cast aniUserId failed"); - BusinessErrorAni::ThrowCommonError( - env, ERROR_PARAM_CHECK_ERROR, USER_ID, TYPE_NUMBER); - return; - } - ShortcutInfo shortcutInfo; if (!CommonFunAni::ParseShortcutInfo(env, info, shortcutInfo) || !CommonFunc::CheckShortcutInfo(shortcutInfo)) { - APP_LOGE("Parse shortcutInfo err. userId:%{public}d", userId); - BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); + APP_LOGE("Parse shortcutInfo err. userId:%{public}d", aniUserId); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_SHORTCUT_INFO_ERROR); return; } @@ -89,26 +72,18 @@ static void AniDeleteDesktopShortcutInfo(ani_env* env, ani_object info, ani_doub BusinessErrorAni::ThrowError(env, ERR_APPEXECFWK_SERVICE_NOT_READY, DELETE_DESKTOP_SHORTCUT_INFO); return; } - ErrCode ret = iBundleMgr->DeleteDesktopShortcutInfo(shortcutInfo, userId); + ErrCode ret = iBundleMgr->DeleteDesktopShortcutInfo(shortcutInfo, aniUserId); if (ret != ERR_OK) { - APP_LOGE("DeleteDesktopShortcutInfo failed ret:%{public}d,userId:%{public}d", ret, userId); + APP_LOGE("DeleteDesktopShortcutInfo failed ret:%{public}d,userId:%{public}d", ret, aniUserId); BusinessErrorAni::ThrowCommonError( env, CommonFunc::ConvertErrCode(ret), DELETE_DESKTOP_SHORTCUT_INFO, Constants::PERMISSION_MANAGER_SHORTCUT); } } -static ani_ref AniGetAllDesktopShortcutInfo(ani_env* env, ani_double aniUserId) +static ani_ref AniGetAllDesktopShortcutInfo(ani_env* env, ani_int aniUserId) { APP_LOGD("ani GetAllDesktopShortcutInfo called"); - int32_t userId = 0; - if (!CommonFunAni::TryCastDoubleTo(aniUserId, &userId)) { - APP_LOGE("Cast aniUserId failed"); - BusinessErrorAni::ThrowCommonError( - env, ERROR_PARAM_CHECK_ERROR, USER_ID, TYPE_NUMBER); - return nullptr; - } - std::vector shortcutInfos; auto iBundleMgr = CommonFunc::GetBundleMgr(); if (iBundleMgr == nullptr) { @@ -116,9 +91,9 @@ static ani_ref AniGetAllDesktopShortcutInfo(ani_env* env, ani_double aniUserId) BusinessErrorAni::ThrowError(env, ERR_APPEXECFWK_SERVICE_NOT_READY, GET_ALL_DESKTOP_SHORTCUT_INFO); return nullptr; } - ErrCode ret = iBundleMgr->GetAllDesktopShortcutInfo(userId, shortcutInfos); + ErrCode ret = iBundleMgr->GetAllDesktopShortcutInfo(aniUserId, shortcutInfos); if (ret != ERR_OK) { - APP_LOGE("GetAllDesktopShortcutInfo failed ret:%{public}d,userId:%{public}d", ret, userId); + APP_LOGE("GetAllDesktopShortcutInfo failed ret:%{public}d,userId:%{public}d", ret, aniUserId); BusinessErrorAni::ThrowCommonError( env, CommonFunc::ConvertErrCode(ret), GET_ALL_DESKTOP_SHORTCUT_INFO, Constants::PERMISSION_MANAGER_SHORTCUT); @@ -132,6 +107,57 @@ static ani_ref AniGetAllDesktopShortcutInfo(ani_env* env, ani_double aniUserId) return shortcutInfosRef; } +static void SetShortcutVisibleForSelfNative(ani_env* env, ani_string aniId, ani_boolean aniVisible) +{ + APP_LOGD("ani SetShortcutVisibleForSelf called"); + std::string shortcutId; + if (!CommonFunAni::ParseString(env, aniId, shortcutId)) { + APP_LOGE("parse shortcutId failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, SHORTCUT_ID, TYPE_STRING); + return; + } + bool visible = CommonFunAni::AniBooleanToBool(aniVisible); + + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("Can not get iBundleMgr"); + BusinessErrorAni::ThrowCommonError( + env, CommonFunc::ConvertErrCode(ERR_APPEXECFWK_SERVICE_NOT_READY), SET_SHORTCUT_VISIBLE, ""); + return; + } + ErrCode ret = iBundleMgr->SetShortcutVisibleForSelf(shortcutId, visible); + if (ret != ERR_OK) { + APP_LOGE("SetShortcutVisibleForSelf failed ret:%{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), SET_SHORTCUT_VISIBLE, ""); + } +} + +static ani_object GetAllShortcutInfoForSelfNative(ani_env* env) +{ + APP_LOGD("ani GetAllShortcutInfoForSelf called"); + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("Can not get iBundleMgr"); + BusinessErrorAni::ThrowCommonError( + env, CommonFunc::ConvertErrCode(ERR_APPEXECFWK_NULL_PTR), GET_ALL_SHORTCUT_INFO_FOR_SELF, ""); + return nullptr; + } + std::vector shortcutInfos; + ErrCode ret = iBundleMgr->GetAllShortcutInfoForSelf(shortcutInfos); + if (ret != ERR_OK) { + APP_LOGE("GetAllShortcutInfoForSelf failed ret:%{public}d", ret); + BusinessErrorAni::ThrowCommonError(env, CommonFunc::ConvertErrCode(ret), GET_ALL_SHORTCUT_INFO_FOR_SELF, ""); + return nullptr; + } + ani_object shortcutInfosObject = + CommonFunAni::ConvertAniArray(env, shortcutInfos, CommonFunAni::ConvertShortcutInfo); + if (shortcutInfosObject == nullptr) { + APP_LOGE("nullptr shortcutInfosRef"); + } + + return shortcutInfosObject; +} + extern "C" { ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) { @@ -155,6 +181,10 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) reinterpret_cast(AniDeleteDesktopShortcutInfo) }, ani_native_function { "getAllDesktopShortcutInfoNative", nullptr, reinterpret_cast(AniGetAllDesktopShortcutInfo) }, + ani_native_function { "setShortcutVisibleForSelfNative", nullptr, + reinterpret_cast(SetShortcutVisibleForSelfNative) }, + ani_native_function { "getAllShortcutInfoForSelfNative", nullptr, + reinterpret_cast(GetAllShortcutInfoForSelfNative) }, }; status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); diff --git a/interfaces/kits/ani/shortcut_manager/ets/@ohos.bundle.shortcutManager.ets b/interfaces/kits/ani/shortcut_manager/ets/@ohos.bundle.shortcutManager.ets index d5c64e1e7136f1f1fbb35cb07d685ff43b5fc258..f55ac27de8aaeb6ca55a8fc6cb4c642e0d6db0d4 100644 --- a/interfaces/kits/ani/shortcut_manager/ets/@ohos.bundle.shortcutManager.ets +++ b/interfaces/kits/ani/shortcut_manager/ets/@ohos.bundle.shortcutManager.ets @@ -20,18 +20,36 @@ namespace shortcutManager { loadLibrary("ani_shortcut_manager.z"); - export native function addDesktopShortcutInfoNative(shortcutInfo: ShortcutInfo, userId: number): void; - export native function deleteDesktopShortcutInfoNative(shortcutInfo: ShortcutInfo, userId: number): void; - export native function getAllDesktopShortcutInfoNative(userId: number): Array; + function createBusinessError(code: int, message: string) { + let err = new BusinessError(); + err.code = code; + err.name = 'Error'; + err.message = message; + return err; + } + + const ERROR_SOURCETYPE : int = -1; + const MAIN_APP_INDEX: int = 0; + const ERROR_PARAM_CHECK_ERROR: int = 401; + const INVALID_SHORTCUT_INFO_ERROR: string = "invalid ShortcutInfo: parameter type error, or appIndex is less than 0"; - function addDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: number): Promise { - let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { + export native function addDesktopShortcutInfoNative(shortcutInfo: ShortcutInfo, userId: int): void; + export native function deleteDesktopShortcutInfoNative(shortcutInfo: ShortcutInfo, userId: int): void; + export native function getAllDesktopShortcutInfoNative(userId: int): Array; + export native function setShortcutVisibleForSelfNative(id: string, visible: boolean): void; + export native function getAllShortcutInfoForSelfNative(): Array; + + function addDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise { + if (shortcutInfo.appIndex < MAIN_APP_INDEX || shortcutInfo?.sourceType === ERROR_SOURCETYPE) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, INVALID_SHORTCUT_INFO_ERROR); + } + let p = new Promise((resolve: (v: PromiseLike) => void, reject: (error: BusinessError) => void): void => { let cb = (): NullishType => { return shortcutManager.addDesktopShortcutInfoNative(shortcutInfo, userId); } let p1 = taskpool.execute(cb); p1.then((): void => { - resolve(undefined); + resolve(Promise.resolve()); }, (err: Error): void => { reject(err as BusinessError); }); @@ -39,14 +57,17 @@ namespace shortcutManager { return p; } - function deleteDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: number): Promise { - let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { + function deleteDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise { + if (shortcutInfo.appIndex < MAIN_APP_INDEX || shortcutInfo.sourceType === ERROR_SOURCETYPE) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, INVALID_SHORTCUT_INFO_ERROR); + } + let p = new Promise((resolve: (v: PromiseLike) => void, reject: (error: BusinessError) => void): void => { let cb = (): NullishType => { return shortcutManager.deleteDesktopShortcutInfoNative(shortcutInfo, userId) } let p1 = taskpool.execute(cb); p1.then((): void => { - resolve(undefined); + resolve(Promise.resolve()); }, (err: Error): void => { reject(err as BusinessError); }); @@ -54,7 +75,7 @@ namespace shortcutManager { return p; } - function getAllDesktopShortcutInfo(userId: number): Promise> { + function getAllDesktopShortcutInfo(userId: int): Promise> { let p = new Promise>((resolve: (arrShortcutInfo: Array) => void, reject: (error: BusinessError) => void) => { let cb = (): (Array) => { return shortcutManager.getAllDesktopShortcutInfoNative(userId); @@ -70,6 +91,37 @@ namespace shortcutManager { return p; } + function setShortcutVisibleForSelf(id: string, visible: boolean): Promise { + let p = new Promise((resolve: (v: undefined) => void, reject: (error: BusinessError) => void): void => { + let cb = (): NullishType => { + return shortcutManager.setShortcutVisibleForSelfNative(id, visible); + } + let p1 = taskpool.execute(cb); + p1.then((): void => { + resolve(undefined); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function getAllShortcutInfoForSelf(): Promise> { + let p = new Promise>((resolve: (arrShortcutInfo: Array) => void, reject: (error: BusinessError) => void) => { + let cb = (): (Array) => { + return shortcutManager.getAllShortcutInfoForSelfNative(); + }; + let p1 = taskpool.execute(cb); + p1.then((e: NullishType) => { + let result: Array = e as Array; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + export type ShortcutInfo = _ShortcutInfo; export type ShortcutWant = _ShortcutWant; export type ParameterItem = _ParameterItem; diff --git a/interfaces/kits/ani/shortcut_manager/ets/bundleManager/ShortcutInfo.ets b/interfaces/kits/ani/shortcut_manager/ets/bundleManager/ShortcutInfo.ets index 18f5a2f7a9ae5cc5151674d48c025fbc63c29621..69b564af927673a7a17fbeb46e4e4ad6fe7bc598 100644 --- a/interfaces/kits/ani/shortcut_manager/ets/bundleManager/ShortcutInfo.ets +++ b/interfaces/kits/ani/shortcut_manager/ets/bundleManager/ShortcutInfo.ets @@ -19,12 +19,13 @@ export interface ShortcutInfo { moduleName?: string; hostAbility?: string; icon?: string; - iconId?: number; + iconId?: long; label?: string; - labelId?: number; + labelId?: long; wants?: Array; - appIndex: number; - sourceType: number; + appIndex: int; + sourceType: int; + visible?: boolean; } export interface ShortcutWant { @@ -42,25 +43,69 @@ export interface ParameterItem { export class ShortcutInfoInner implements ShortcutInfo { id: string = ""; bundleName: string = ""; - moduleName?: string | undefined = ""; - hostAbility?: string | undefined = ""; - icon?: string | undefined = ""; - iconId?: number | undefined; - label?: string | undefined = ""; - labelId?: number | undefined; - wants?: Array | undefined = new Array; - appIndex: number; - sourceType: number; + moduleName?: string | undefined; + hostAbility?: string | undefined; + icon?: string | undefined; + iconId?: long | undefined; + label?: string | undefined; + labelId?: long | undefined; + wants?: Array | undefined; + appIndex: int; + sourceType: int; + public visible?: boolean | undefined; + + constructor() { } + constructor(id: string, + bundleName: string, + appIndex: int, + sourceType: int, + moduleName?: string, + hostAbility?: string, + icon?: string, + iconId?: long, + label?: string, + labelId?: long, + wants?: Array, + visible?: boolean) { + this.id = id; + this.bundleName = bundleName; + this.appIndex = appIndex; + this.sourceType = sourceType; + this.moduleName = moduleName; + this.hostAbility = hostAbility; + this.icon = icon; + this.iconId = iconId; + this.label = label; + this.labelId = labelId; + this.wants = wants; + this.visible = visible; + } } class ShortcutWantInner implements ShortcutWant { targetBundle: string = ""; - targetModule?: string | undefined = ""; + targetModule?: string | undefined; targetAbility: string = ""; - parameters?: Array | undefined = new Array; + parameters?: Array | undefined; + + constructor() { } + constructor(targetBundle: string, + targetAbility: string, + targetModule?: string, + parameters?: Array) { + this.targetBundle = targetBundle; + this.targetAbility = targetAbility; + this.targetModule = targetModule; + this.parameters = parameters; + } } class ParameterItemInner implements ParameterItem { key: string = ""; value: string = ""; + constructor() { } + constructor(key: string, value: string) { + this.key = key; + this.value = value; + } } diff --git a/interfaces/kits/ani/zlib/BUILD.gn b/interfaces/kits/ani/zlib/BUILD.gn index 83d92dc1591a95eee367cdf6705f466a781edede..09ca3723175a7a7a39bf20f06fa904274c734985 100644 --- a/interfaces/kits/ani/zlib/BUILD.gn +++ b/interfaces/kits/ani/zlib/BUILD.gn @@ -16,6 +16,7 @@ import("//build/ohos.gni") import("//foundation/bundlemanager/bundle_framework/appexecfwk.gni") ohos_shared_library("ani_zlib") { + shlib_type = "ani" branch_protector_ret = "pac_ret" sanitize = { @@ -35,28 +36,26 @@ ohos_shared_library("ani_zlib") { include_dirs = [ "${inner_api_path}/appexecfwk_core/include", "${kits_path}/ani/zlib", + "${kits_path}/ani/zlib/common", "${kits_path}/ani/common", "${kits_path}/js/common", "${kits_path}/js/zip/include", "${kits_path}/js/zip/napi", + "${kits_path}/js/zip/napi/class_checksum", + "${kits_path}/js/zip/napi/common", ] sources = [ + "${kits_path}/js/zip/napi/class_checksum/checksum_common_func.cpp", "${kits_path}/js/zip/src/file_path.cpp", + "${kits_path}/js/zip/src/zip.cpp", "${kits_path}/js/zip/src/zip_internal.cpp", "${kits_path}/js/zip/src/zip_reader.cpp", "${kits_path}/js/zip/src/zip_utils.cpp", "${kits_path}/js/zip/src/zip_writer.cpp", - "ani_zip.cpp", "ani_zlib.cpp", - ] - - deps = [ - "${base_path}:appexecfwk_base", - "${common_path}:libappexecfwk_common", - "${core_path}:appexecfwk_core", - "${kits_path}/ani/common:bms_ani_common", - "${kits_path}/js/common:bundle_napi_common", + "checksum/ani_checksum.cpp", + "gzip/ani_gzip.cpp", ] cflags = [ @@ -69,6 +68,14 @@ ohos_shared_library("ani_zlib") { "-fstack-protector-strong", ] + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "${kits_path}/ani/common:bms_ani_common", + "${kits_path}/js/common:bundle_napi_common", + ] + external_deps = [ "ability_base:want", "c_utils:utils", diff --git a/interfaces/kits/ani/zlib/ani_zip.cpp b/interfaces/kits/ani/zlib/ani_zip.cpp deleted file mode 100644 index 64df5363a12f5f5786adea9e8544db4d007474c8..0000000000000000000000000000000000000000 --- a/interfaces/kits/ani/zlib/ani_zip.cpp +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ani_zip.h" -#include "zip.h" -#include "zip_reader.h" -#include "zip_writer.h" - -namespace OHOS { -namespace AppExecFwk { -namespace LIBZIP { -constexpr const char* PROPERTY_NAME_LEVEL = "level"; -constexpr const char* PROPERTY_NAME_MEMLEVEL = "memLevel"; -constexpr const char* PROPERTY_NAME_STRATEGY = "strategy"; -constexpr const char* SEPARATOR = "/"; -constexpr const char HIDDEN_SEPARATOR = '.'; - -using FilterCallback = std::function; -using DirectoryCreator = std::function; -using WriterFactory = std::function(FilePath&, FilePath&)>; - -struct ANIUnzipParam { - FilterCallback filterCB = nullptr; - bool logSkippedFiles = false; -}; - -bool ANIParseOptions(ani_env* env, ani_object object, LIBZIP::OPTIONS& options) -{ - RETURN_FALSE_IF_NULL(env); - RETURN_FALSE_IF_NULL(object); - - ani_enum_item enumItem = nullptr; - // level?: CompressLevel - if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_LEVEL, &enumItem)) { - RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.level)); - } - - // memLevel?: MemLevel - if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_MEMLEVEL, &enumItem)) { - RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.memLevel)); - } - - // strategy?: CompressStrategy - if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_STRATEGY, &enumItem)) { - RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.strategy)); - } - - return true; -} - -bool ANIIsHiddenFile(const FilePath& filePath) -{ - FilePath localFilePath = filePath; - if (!localFilePath.Value().empty()) { - return localFilePath.Value()[0] == HIDDEN_SEPARATOR; - } - - return false; -} - -bool ANIExcludeNoFilesFilter(const FilePath& filePath) -{ - return true; -} - -bool ANIExcludeHiddenFilesFilter(const FilePath& filePath) -{ - return !ANIIsHiddenFile(filePath); -} - -std::vector ANIListDirectoryContent(const FilePath& filePath, bool& isSuccess) -{ - FilePath curPath = filePath; - std::vector fileDirectoryVector; - std::vector filelist; - isSuccess = FilePath::GetZipAllDirFiles(curPath.Value(), filelist); - if (isSuccess) { - APP_LOGD("f.size=%{public}zu", filelist.size()); - for (size_t i = 0; i < filelist.size(); i++) { - std::string str(filelist[i]); - if (!str.empty()) { - fileDirectoryVector.push_back( - FileAccessor::DirectoryContentEntry(FilePath(str), FilePath::DirectoryExists(FilePath(str)))); - } - } - } - return fileDirectoryVector; -} - -bool ANICreateDirectory(FilePath& extractDir, FilePath& entryPath) -{ - std::string path = extractDir.Value(); - if (EndsWith(path, SEPARATOR)) { - APP_LOGE("ANICreateDirectory: %{public}s", FilePath(extractDir.Value() + entryPath.Value()).Value().c_str()); - return FilePath::CreateDirectory(FilePath(extractDir.Value() + entryPath.Value())); - } else { - APP_LOGE( - "ANICreateDirectory: %{public}s", FilePath(extractDir.Value() + "/" + entryPath.Value()).Value().c_str()); - return FilePath::CreateDirectory(FilePath(extractDir.Value() + "/" + entryPath.Value())); - } -} - -std::unique_ptr ANICreateFilePathWriterDelegate(FilePath& extractDir, FilePath entryPath) -{ - if (EndsWith(extractDir.Value(), SEPARATOR)) { - APP_LOGE("ANICreateFilePathWriterDelegate: %{public}s", - FilePath(extractDir.Value() + entryPath.Value()).Value().c_str()); - return std::make_unique(FilePath(extractDir.Value() + entryPath.Value())); - } else { - APP_LOGE("ANICreateFilePathWriterDelegate: %{public}s", - FilePath(extractDir.Value() + "/" + entryPath.Value()).Value().c_str()); - return std::make_unique(FilePath(extractDir.Value() + "/" + entryPath.Value())); - } -} - -ZipParams::ZipParams(const std::vector& srcDir, const FilePath& destFile) - : srcDir_(srcDir), destFile_(destFile) -{} - -// Does not take ownership of |fd|. -ZipParams::ZipParams(const std::vector& srcDir, int destFd) : srcDir_(srcDir), destFd_(destFd) {} - -FilePath ANIFilePathEndIsSeparator(FilePath paramPath) -{ - bool endIsSeparator = EndsWith(paramPath.Value(), SEPARATOR); - if (FilePath::IsDir(paramPath)) { - if (!endIsSeparator) { - paramPath.AppendSeparator(); - } - } - return paramPath; -} - -ErrCode ANIUnzipWithFilterAndWriters(const PlatformFile& srcFile, FilePath& destDir, WriterFactory writerFactory, - DirectoryCreator directoryCreator, ANIUnzipParam& unzipParam) -{ - APP_LOGI("destDir=%{private}s", destDir.Value().c_str()); - ZipReader reader; - if (!reader.OpenFromPlatformFile(srcFile)) { - APP_LOGE("Failed to open srcFile"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - while (reader.HasMore()) { - if (!reader.OpenCurrentEntryInZip()) { - APP_LOGE("Failed to open the current file in zip"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - const FilePath& constEntryPath = reader.CurrentEntryInfo()->GetFilePath(); - FilePath entryPath = constEntryPath; - if (reader.CurrentEntryInfo()->IsUnsafe()) { - APP_LOGE("Found an unsafe file in zip"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - if (!unzipParam.filterCB(entryPath)) { - if (unzipParam.logSkippedFiles) { - APP_LOGI("Skipped file"); - } - if (!reader.AdvanceToNextEntry()) { - APP_LOGE("Failed to advance to the next file"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - continue; - } - - if (reader.CurrentEntryInfo()->IsDirectory()) { - if (!directoryCreator(destDir, entryPath)) { - APP_LOGE("directory_creator(%{private}s) Failed", entryPath.Value().c_str()); - return ERR_ZLIB_DEST_FILE_DISABLED; - } - } else { - std::unique_ptr writer = writerFactory(destDir, entryPath); - if (!writer->PrepareOutput()) { - APP_LOGE("PrepareOutput err"); - return ERR_ZLIB_DEST_FILE_DISABLED; - } - if (!reader.ExtractCurrentEntry(writer.get(), std::numeric_limits::max())) { - APP_LOGE("Failed to extract"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - } - - if (!reader.AdvanceToNextEntry()) { - APP_LOGE("Failed to advance to the next file"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - } - return ERR_OK; -} - -ErrCode ANIUnzipWithFilterAndWritersParallel(const FilePath& srcFile, FilePath& destDir, WriterFactory writerFactory, - DirectoryCreator directoryCreator, ANIUnzipParam& unzipParam) -{ - ZipParallelReader reader; - FilePath src = srcFile; - - if (!reader.Open(src)) { - APP_LOGE("Failed to open srcFile"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - ErrCode ret = ERR_OK; - for (int32_t i = 0; i < reader.num_entries(); i++) { - if (!reader.OpenCurrentEntryInZip()) { - APP_LOGE("Failed to open the current file in zip"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - if (reader.CurrentEntryInfo() == nullptr) { - APP_LOGE("CurrentEntryInfo is null"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - const FilePath& constEntryPath = reader.CurrentEntryInfo()->GetFilePath(); - if (reader.CurrentEntryInfo()->IsUnsafe()) { - APP_LOGI("Found an unsafe file in zip"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - unz_file_pos position = {}; - if (!reader.GetCurrentEntryPos(position)) { - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - bool isDirectory = reader.CurrentEntryInfo()->IsDirectory(); - ffrt::submit( - [&, position, isDirectory, constEntryPath]() { - if (ret != ERR_OK) { - return; - } - int resourceId = sched_getcpu(); - unzFile zipFile = reader.GetZipHandler(resourceId); - if (!reader.GotoEntry(zipFile, position)) { - APP_LOGE("Failed to go to entry"); - ret = ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - return; - } - FilePath entryPath = constEntryPath; - if (unzipParam.filterCB(entryPath)) { - if (isDirectory) { - if (!directoryCreator(destDir, entryPath)) { - APP_LOGE("directory_creator(%{private}s) Failed", entryPath.Value().c_str()); - reader.ReleaseZipHandler(resourceId); - ret = ERR_ZLIB_DEST_FILE_DISABLED; - return; - } - } else { - std::unique_ptr writer = writerFactory(destDir, entryPath); - if (!writer->PrepareOutput()) { - APP_LOGE("PrepareOutput err"); - reader.ReleaseZipHandler(resourceId); - ret = ERR_ZLIB_DEST_FILE_DISABLED; - return; - } - if (!reader.ExtractEntry(writer.get(), zipFile, std::numeric_limits::max())) { - APP_LOGE("Failed to extract"); - reader.ReleaseZipHandler(resourceId); - ret = ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - return; - } - } - } else if (unzipParam.logSkippedFiles) { - APP_LOGI("Skipped file"); - } - reader.ReleaseZipHandler(resourceId); - }, - {}, {}); - if (!reader.AdvanceToNextEntry()) { - APP_LOGE("Failed to advance to the next file"); - return ERR_ZLIB_SRC_FILE_FORMAT_ERROR; - } - } - ffrt::wait(); - return ERR_OK; -} - -ErrCode ANIUnzipWithFilterCallback( - const FilePath& srcFile, const FilePath& destDir, const OPTIONS& options, ANIUnzipParam& unzipParam) -{ - FilePath src = srcFile; - if (!FilePathCheckValid(src.Value())) { - APP_LOGE("FilePathCheckValid returnValue is false"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } - - FilePath dest = destDir; - - APP_LOGI("srcFile=%{private}s, destFile=%{private}s", src.Value().c_str(), dest.Value().c_str()); - - if (!FilePath::PathIsValid(srcFile)) { - APP_LOGE("PathIsValid return value is false"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } - - ErrCode ret = ERR_OK; - if (options.parallel == PARALLEL_STRATEGY_PARALLEL_DECOMPRESSION) { - ret = ANIUnzipWithFilterAndWritersParallel(src, dest, - std::bind(&ANICreateFilePathWriterDelegate, std::placeholders::_1, std::placeholders::_2), - std::bind(&ANICreateDirectory, std::placeholders::_1, std::placeholders::_2), unzipParam); - } else { - PlatformFile zipFd = open(src.Value().c_str(), S_IREAD, O_CREAT); - if (zipFd == kInvalidPlatformFile) { - APP_LOGE("Failed to open"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } - ret = ANIUnzipWithFilterAndWriters(zipFd, dest, - std::bind(&ANICreateFilePathWriterDelegate, std::placeholders::_1, std::placeholders::_2), - std::bind(&ANICreateDirectory, std::placeholders::_1, std::placeholders::_2), unzipParam); - close(zipFd); - } - return ret; -} - -ErrCode ANIDecompressFileImpl(const std::string& inFile, const std::string& outFile, const LIBZIP::OPTIONS& options) -{ - LIBZIP::FilePath srcFileDir(inFile); - LIBZIP::FilePath destDir(outFile); - if ((destDir.Value().size() == 0) || LIBZIP::FilePath::HasRelativePathBaseOnAPIVersion(outFile)) { - return ERR_ZLIB_DEST_FILE_DISABLED; - } - if ((srcFileDir.Value().size() == 0) || LIBZIP::FilePath::HasRelativePathBaseOnAPIVersion(inFile)) { - APP_LOGE("srcFile doesn't Exist"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } - if (!LIBZIP::FilePath::PathIsValid(srcFileDir)) { - APP_LOGE("srcFile invalid"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } - if (LIBZIP::FilePath::DirectoryExists(destDir)) { - if (!LIBZIP::FilePath::PathIsWriteable(destDir)) { - APP_LOGE("FilePath::PathIsWriteable(destDir) fail"); - return ERR_ZLIB_DEST_FILE_DISABLED; - } - } else { - APP_LOGE("destDir isn't path"); - return ERR_ZLIB_DEST_FILE_DISABLED; - } - - ANIUnzipParam unzipParam { .filterCB = ANIExcludeNoFilesFilter, .logSkippedFiles = true }; - return ANIUnzipWithFilterCallback(srcFileDir, destDir, options, unzipParam); -} - -bool ANIZip(const ZipParams& params, const OPTIONS& options) -{ - const std::vector>* filesToAdd = ¶ms.GetFilesTozip(); - std::vector> allRelativeFiles; - FilePath srcDir = params.SrcDir().front(); - FilePath paramPath = ANIFilePathEndIsSeparator(srcDir); - if (filesToAdd->empty()) { - filesToAdd = &allRelativeFiles; - std::list entries; - if (EndsWith(paramPath.Value(), SEPARATOR)) { - entries.push_back(FileAccessor::DirectoryContentEntry(srcDir, true)); - FilterCallback filterCallback = params.GetFilterCallback(); - for (auto iter = entries.begin(); iter != entries.end(); ++iter) { - if (iter != entries.begin() && ((!params.GetIncludeHiddenFiles() && ANIIsHiddenFile(iter->path)) || - (filterCallback && !filterCallback(iter->path)))) { - continue; - } - if (iter != entries.begin()) { - FilePath relativePath; - FilePath paramsSrcPath = srcDir; - if (paramsSrcPath.AppendRelativePath(iter->path, &relativePath)) { - allRelativeFiles.push_back(std::make_pair(relativePath, iter->path)); - } - } - if (iter->isDirectory) { - bool isSuccess = false; - std::vector subEntries = - ANIListDirectoryContent(iter->path, isSuccess); - entries.insert(entries.end(), subEntries.begin(), subEntries.end()); - } - } - } else { - allRelativeFiles.push_back(std::make_pair(paramPath.BaseName(), paramPath)); - } - } - std::unique_ptr zipWriter = nullptr; - if (params.DestFd() != kInvalidPlatformFile) { - zipWriter = std::make_unique(ZipWriter::InitZipFileWithFd(params.DestFd())); - } else { - zipWriter = std::make_unique(ZipWriter::InitZipFileWithFile(params.DestFile())); - } - if (zipWriter == nullptr) { - APP_LOGE("Init zipWriter failed"); - return false; - } - return zipWriter->WriteEntries(*filesToAdd, options); -} - -ErrCode ANIZipWithFilterCallback( - const FilePath& srcDir, const FilePath& destFile, const OPTIONS& options, FilterCallback filterCB) -{ - FilePath destPath = destFile; - if (!FilePath::DirectoryExists(destPath.DirName())) { - APP_LOGE("The destPath not exist"); - return ERR_ZLIB_DEST_FILE_DISABLED; - } - if (!FilePath::PathIsWriteable(destPath.DirName())) { - APP_LOGE("The destPath not writeable"); - return ERR_ZLIB_DEST_FILE_DISABLED; - } - - if (!FilePath::PathIsValid(srcDir)) { - APP_LOGE("srcDir isn't Exist"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } else if (!FilePath::PathIsReadable(srcDir)) { - APP_LOGE("srcDir not readable"); - return ERR_ZLIB_SRC_FILE_DISABLED; - } - - std::vector srcFile = { srcDir }; - ZipParams params(srcFile, FilePath(destPath.CheckDestDirTail())); - params.SetFilterCallback(filterCB); - return ANIZip(params, options) ? ERR_OK : ERR_ZLIB_DEST_FILE_DISABLED; -} - -ErrCode ANICompressFileImpl(const std::string& inFile, const std::string& outFile, const LIBZIP::OPTIONS& options) -{ - LIBZIP::FilePath srcFileDir(inFile); - LIBZIP::FilePath destDir(outFile); - if ((destDir.Value().size() == 0) || LIBZIP::FilePath::HasRelativePathBaseOnAPIVersion(outFile)) { - return ERR_ZLIB_DEST_FILE_DISABLED; - } - if ((srcFileDir.Value().size() == 0) || LIBZIP::FilePath::HasRelativePathBaseOnAPIVersion(inFile)) { - return ERR_ZLIB_SRC_FILE_DISABLED; - } - - return ANIZipWithFilterCallback(srcFileDir, destDir, options, ANIExcludeHiddenFilesFilter); -} -} // namespace LIBZIP -} // namespace AppExecFwk -} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/zlib/ani_zlib.cpp b/interfaces/kits/ani/zlib/ani_zlib.cpp index 053abd99d93d1b9bd7080270855aa6a2510596ed..7e4cb9ebf9960ecebb5812b8ab366cdcc47e345e 100644 --- a/interfaces/kits/ani/zlib/ani_zlib.cpp +++ b/interfaces/kits/ani/zlib/ani_zlib.cpp @@ -14,117 +14,268 @@ */ #include "ani_signature_builder.h" -#include "ani_zip.h" +#include "ani_zlib_callback_info.h" +#include "business_error_ani.h" +#include "checksum/ani_checksum.h" +#include "common_fun_ani.h" #include "common_func.h" +#include "enum_util.h" +#include "gzip/ani_gzip.h" +#include "napi_business_error.h" +#include "napi_constants.h" +#include "zip.h" namespace OHOS { namespace AppExecFwk { - namespace { constexpr const char* NS_NAME_ZLIB = "@ohos.zlib.zlib"; +constexpr const char* PROPERTY_NAME_LEVEL = "level"; +constexpr const char* PROPERTY_NAME_MEMLEVEL = "memLevel"; +constexpr const char* PROPERTY_NAME_STRATEGY = "strategy"; +constexpr const char* PROPERTY_NAME_PARALLEL = "parallel"; +constexpr const char* TYPE_NAME_CHECKSUMINTERNAL = "ChecksumInternal"; +constexpr const char* TYPE_NAME_GZIPINTERNAL = "GZipInternal"; constexpr const char* PARAM_NAME_IN_FILE = "inFile"; +constexpr const char* PARAM_NAME_IN_FILES = "inFiles"; constexpr const char* PARAM_NAME_OUT_FILE = "outFile"; constexpr const char* PARAM_NAME_OPTIONS = "options"; -constexpr const char* TYPE_STRING = "string"; } // namespace using namespace arkts::ani_signature; -static void CompressFile(ani_env* env, ani_string aniInFile, ani_string aniOutFile, ani_object aniOptions) +static bool ANIParseOptions(ani_env* env, ani_object object, LIBZIP::OPTIONS& options) +{ + APP_LOGD("ANIParseOptions entry"); + + RETURN_FALSE_IF_NULL(env); + RETURN_FALSE_IF_NULL(object); + + ani_enum_item enumItem = nullptr; + // level?: CompressLevel + if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_LEVEL, &enumItem)) { + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.level)); + } + + // memLevel?: MemLevel + if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_MEMLEVEL, &enumItem)) { + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.memLevel)); + } + + // strategy?: CompressStrategy + if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_STRATEGY, &enumItem)) { + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.strategy)); + } + + // parallel?: ParallelStrategy + if (CommonFunAni::CallGetterOptional(env, object, PROPERTY_NAME_PARALLEL, &enumItem)) { + RETURN_FALSE_IF_FALSE(EnumUtils::EnumETSToNative(env, enumItem, options.parallel)); + } + + return true; +} + +static void compressFileNative(ani_env* env, ani_string aniInFile, ani_string aniOutFile, ani_object aniOptions) { - std::string inFile = CommonFunAni::AniStrToString(env, aniInFile); - if (inFile.empty()) { - APP_LOGE("inFile is empty."); + APP_LOGD("compressFileNative entry"); + + RETURN_IF_NULL(env); + RETURN_IF_NULL(aniInFile); + RETURN_IF_NULL(aniOutFile); + RETURN_IF_NULL(aniOptions); + + std::string inFile; + if (!CommonFunAni::ParseString(env, aniInFile, inFile)) { + APP_LOGE("parse aniInFile failed"); BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_IN_FILE, TYPE_STRING); return; } - std::string outFile = CommonFunAni::AniStrToString(env, aniOutFile); - if (outFile.empty()) { - APP_LOGE("outFile is empty."); + std::string outFile; + if (!CommonFunAni::ParseString(env, aniOutFile, outFile)) { + APP_LOGE("parse aniOutFile failed"); BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_OUT_FILE, TYPE_STRING); return; } LIBZIP::OPTIONS options; - if (!LIBZIP::ANIParseOptions(env, aniOptions, options)) { + if (!ANIParseOptions(env, aniOptions, options)) { APP_LOGE("options parse failed."); BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_OPTIONS); return; } - int32_t errCode = CommonFunc::ConvertErrCode(LIBZIP::ANICompressFileImpl(inFile, outFile, options)); + auto zlibCallbackInfo = std::make_shared(); + LIBZIP::Zip(inFile, outFile, options, false, zlibCallbackInfo); + const int32_t errCode = CommonFunc::ConvertErrCode(zlibCallbackInfo->GetResult()); if (errCode != ERR_OK) { - APP_LOGE("CompressFiles failed, ret %{public}d", errCode); + APP_LOGE("compressFileNative failed, ret %{public}d", errCode); BusinessErrorAni::ThrowCommonError(env, errCode, "", ""); } } -static void DecompressFile(ani_env* env, ani_string aniInFile, ani_string aniOutFile, ani_object aniOptions) +static void compressFilesNative(ani_env* env, ani_object aniInFiles, ani_string aniOutFile, ani_object aniOptions) { - std::string inFile = CommonFunAni::AniStrToString(env, aniInFile); - if (inFile.empty()) { - APP_LOGE("inFile is empty."); - BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_IN_FILE, TYPE_STRING); + APP_LOGD("compressFilesNative entry"); + + RETURN_IF_NULL(env); + RETURN_IF_NULL(aniInFiles); + RETURN_IF_NULL(aniOutFile); + RETURN_IF_NULL(aniOptions); + + std::vector inFiles; + if (aniInFiles == nullptr || !CommonFunAni::ParseStrArray(env, aniInFiles, inFiles)) { + APP_LOGE("inFiles parse failed."); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_IN_FILES, TYPE_ARRAY); return; } - std::string outFile = CommonFunAni::AniStrToString(env, aniOutFile); - if (outFile.empty()) { - APP_LOGE("outFile is empty."); + std::string outFile; + if (!CommonFunAni::ParseString(env, aniOutFile, outFile)) { + APP_LOGE("parse aniOutFile failed"); BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_OUT_FILE, TYPE_STRING); return; } LIBZIP::OPTIONS options; - if (!LIBZIP::ANIParseOptions(env, aniOptions, options)) { + if (!ANIParseOptions(env, aniOptions, options)) { APP_LOGE("options parse failed."); BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_OPTIONS); return; } - int32_t errCode = CommonFunc::ConvertErrCode(LIBZIP::ANIDecompressFileImpl(inFile, outFile, options)); + auto zlibCallbackInfo = std::make_shared(); + LIBZIP::Zips(inFiles, outFile, options, false, zlibCallbackInfo); + const int32_t errCode = CommonFunc::ConvertErrCode(zlibCallbackInfo->GetResult()); if (errCode != ERR_OK) { - APP_LOGE("DecompressFile failed, ret %{public}d", errCode); + APP_LOGE("compressFilesNative failed, ret %{public}d", errCode); BusinessErrorAni::ThrowCommonError(env, errCode, "", ""); } } -extern "C" { -ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +static void decompressFileNative(ani_env* env, ani_string aniInFile, ani_string aniOutFile, ani_object aniOptions) { - APP_LOGI("ANI_Constructor zlib called"); - if (vm == nullptr) { - APP_LOGE("vm is null"); - return ANI_ERROR; + APP_LOGD("decompressFileNative entry"); + + RETURN_IF_NULL(env); + RETURN_IF_NULL(aniInFile); + RETURN_IF_NULL(aniOutFile); + RETURN_IF_NULL(aniOptions); + + std::string inFile; + if (!CommonFunAni::ParseString(env, aniInFile, inFile)) { + APP_LOGE("parse aniInFile failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_IN_FILE, TYPE_STRING); + return; } - if (result == nullptr) { - APP_LOGE("result is null"); - return ANI_ERROR; + + std::string outFile; + if (!CommonFunAni::ParseString(env, aniOutFile, outFile)) { + APP_LOGE("parse aniOutFile failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_OUT_FILE, TYPE_STRING); + return; } - ani_env* env = nullptr; - ani_status status = vm->GetEnv(ANI_VERSION_1, &env); - if (status != ANI_OK) { - APP_LOGE("Unsupported ANI_VERSION_1: %{public}d", status); - return status; + LIBZIP::OPTIONS options; + if (!ANIParseOptions(env, aniOptions, options)) { + APP_LOGE("options parse failed."); + BusinessErrorAni::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_OPTIONS); + return; } + + auto zlibCallbackInfo = std::make_shared(); + LIBZIP::Unzip(inFile, outFile, options, zlibCallbackInfo); + const int32_t errCode = CommonFunc::ConvertErrCode(zlibCallbackInfo->GetResult()); + if (errCode != ERR_OK) { + APP_LOGE("decompressFileNative failed, ret %{public}d", errCode); + BusinessErrorAni::ThrowCommonError(env, errCode, "", ""); + } +} + +static ani_long getOriginalSizeNative(ani_env* env, ani_string aniCompressedFile) +{ + APP_LOGD("getOriginalSizeNative entry"); + if (env == nullptr) { APP_LOGE("env is null"); - return ANI_ERROR; + return 0; + } + if (aniCompressedFile == nullptr) { + APP_LOGE("aniCompressedFile is null"); + return 0; + } + + std::string compressedFile; + if (!CommonFunAni::ParseString(env, aniCompressedFile, compressedFile)) { + APP_LOGE("parse aniCompressedFile failed"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_IN_FILE, TYPE_STRING); + return 0; + } + + int64_t originalSize = 0; + const int32_t errCode = CommonFunc::ConvertErrCode(LIBZIP::GetOriginalSize(compressedFile, originalSize)); + if (errCode != ERR_OK) { + APP_LOGE("getOriginalSizeNative failed, ret %{public}d", errCode); + BusinessErrorAni::ThrowCommonError(env, errCode, "GetOriginalSize", ""); } + return originalSize; +} + +static ani_object createChecksumNative(ani_env* env, ani_boolean) +{ + APP_LOGD("createChecksumNative entry"); + + ani_object objChecksum = nullptr; + Namespace zlibNS = Builder::BuildNamespace(NS_NAME_ZLIB); + Type checksumType = Builder::BuildClass({ zlibNS.Name(), TYPE_NAME_CHECKSUMINTERNAL }); + ani_class clsChecksum = CommonFunAni::CreateClassByName(env, checksumType.Descriptor()); + if (clsChecksum != nullptr) { + objChecksum = CommonFunAni::CreateNewObjectByClass(env, checksumType.Descriptor(), clsChecksum); + } + if (objChecksum == nullptr) { + auto errorPair = LIBZIP::errCodeTable.at(EFAULT); + BusinessErrorAni::ThrowError(env, errorPair.first, errorPair.second); + } + return objChecksum; +} + +static ani_object createGZipNative(ani_env* env, ani_boolean) +{ + APP_LOGD("createGZipNative entry"); + + ani_object objGZip = nullptr; + Namespace zlibNS = Builder::BuildNamespace(NS_NAME_ZLIB); + Type gzipType = Builder::BuildClass({ zlibNS.Name(), TYPE_NAME_GZIPINTERNAL }); + ani_class clsGZip = CommonFunAni::CreateClassByName(env, gzipType.Descriptor()); + if (clsGZip != nullptr) { + objGZip = CommonFunAni::CreateNewObjectByClass(env, gzipType.Descriptor(), clsGZip); + } + if (objGZip == nullptr) { + auto errorPair = LIBZIP::errCodeTable.at(EFAULT); + BusinessErrorAni::ThrowError(env, errorPair.first, errorPair.second); + } + return objGZip; +} + +static ani_status BindNSMethods(ani_env* env) +{ + APP_LOGD("BindNSMethods entry"); + Namespace zlibNS = Builder::BuildNamespace(NS_NAME_ZLIB); ani_namespace kitNs = nullptr; - status = env->FindNamespace(zlibNS.Descriptor().c_str(), &kitNs); + ani_status status = env->FindNamespace(zlibNS.Descriptor().c_str(), &kitNs); if (status != ANI_OK) { APP_LOGE("FindNamespace: %{public}s fail with %{public}d", NS_NAME_ZLIB, status); return status; } std::array methods = { - ani_native_function { "CompressFile", nullptr, reinterpret_cast(CompressFile) }, - ani_native_function { "DecompressFile", nullptr, reinterpret_cast(DecompressFile) }, + ani_native_function { "compressFileNative", nullptr, reinterpret_cast(compressFileNative) }, + ani_native_function { "compressFilesNative", nullptr, reinterpret_cast(compressFilesNative) }, + ani_native_function { "decompressFileNative", nullptr, reinterpret_cast(decompressFileNative) }, + ani_native_function { "getOriginalSizeNative", nullptr, reinterpret_cast(getOriginalSizeNative) }, + ani_native_function { "createChecksumNative", nullptr, reinterpret_cast(createChecksumNative) }, + ani_native_function { "createGZipNative", nullptr, reinterpret_cast(createGZipNative) }, }; status = env->Namespace_BindNativeFunctions(kitNs, methods.data(), methods.size()); @@ -133,6 +284,121 @@ ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) return status; } + return status; +} + +static ani_status BindChecksumMethods(ani_env* env) +{ + APP_LOGD("BindChecksumMethods entry"); + + Type checksumType = Builder::BuildClass({ NS_NAME_ZLIB, TYPE_NAME_CHECKSUMINTERNAL }); + ani_class clsChecksum = CommonFunAni::CreateClassByName(env, checksumType.Descriptor()); + if (clsChecksum == nullptr) { + APP_LOGE("CreateClassByName: %{public}s fail", TYPE_NAME_CHECKSUMINTERNAL); + return ANI_ERROR; + } + + std::array methodsChecksum = { + ani_native_function { "adler32Native", nullptr, reinterpret_cast(AniZLibChecksum::adler32Native) }, + ani_native_function { + "adler32CombineNative", nullptr, reinterpret_cast(AniZLibChecksum::adler32CombineNative) }, + ani_native_function { "crc32Native", nullptr, reinterpret_cast(AniZLibChecksum::crc32Native) }, + ani_native_function { + "crc32CombineNative", nullptr, reinterpret_cast(AniZLibChecksum::crc32CombineNative) }, + ani_native_function { "crc64Native", nullptr, reinterpret_cast(AniZLibChecksum::crc64Native) }, + ani_native_function { + "getCrcTableNative", nullptr, reinterpret_cast(AniZLibChecksum::getCrcTableNative) }, + ani_native_function { + "getCrc64TableNative", nullptr, reinterpret_cast(AniZLibChecksum::getCrc64TableNative) }, + }; + + ani_status status = env->Class_BindNativeMethods(clsChecksum, methodsChecksum.data(), methodsChecksum.size()); + if (status != ANI_OK) { + APP_LOGE("Class_BindNativeMethods: %{public}s fail with %{public}d", TYPE_NAME_CHECKSUMINTERNAL, status); + return ANI_ERROR; + } + + return status; +} + +static ani_status BindGZipMethods(ani_env* env) +{ + APP_LOGD("BindGZipMethods entry"); + + Type gzipType = Builder::BuildClass({ NS_NAME_ZLIB, TYPE_NAME_GZIPINTERNAL }); + ani_class clsGZip = CommonFunAni::CreateClassByName(env, gzipType.Descriptor()); + if (clsGZip == nullptr) { + APP_LOGE("CreateClassByName: %{public}s fail", TYPE_NAME_GZIPINTERNAL); + return ANI_ERROR; + } + + std::array methodsGZip = { + ani_native_function { "gzdopenNative", nullptr, reinterpret_cast(AniZLibGZip::gzdopenNative) }, + ani_native_function { "gzbufferNative", nullptr, reinterpret_cast(AniZLibGZip::gzbufferNative) }, + ani_native_function { "gzopenNative", nullptr, reinterpret_cast(AniZLibGZip::gzopenNative) }, + ani_native_function { "gzeofNative", nullptr, reinterpret_cast(AniZLibGZip::gzeofNative) }, + ani_native_function { "gzdirectNative", nullptr, reinterpret_cast(AniZLibGZip::gzdirectNative) }, + ani_native_function { "gzcloseNative", nullptr, reinterpret_cast(AniZLibGZip::gzcloseNative) }, + ani_native_function { "gzclearerrNative", nullptr, reinterpret_cast(AniZLibGZip::gzclearerrNative) }, + ani_native_function { "gzerrorNative", nullptr, reinterpret_cast(AniZLibGZip::gzerrorNative) }, + ani_native_function { "gzgetcNative", nullptr, reinterpret_cast(AniZLibGZip::gzgetcNative) }, + ani_native_function { "gzflushNative", nullptr, reinterpret_cast(AniZLibGZip::gzflushNative) }, + ani_native_function { "gzfwriteNative", nullptr, reinterpret_cast(AniZLibGZip::gzfwriteNative) }, + ani_native_function { "gzfreadNative", nullptr, reinterpret_cast(AniZLibGZip::gzfreadNative) }, + ani_native_function { "gzclosewNative", nullptr, reinterpret_cast(AniZLibGZip::gzclosewNative) }, + ani_native_function { "gzcloserNative", nullptr, reinterpret_cast(AniZLibGZip::gzcloserNative) }, + ani_native_function { "gzwriteNative", nullptr, reinterpret_cast(AniZLibGZip::gzwriteNative) }, + ani_native_function { "gzungetcNative", nullptr, reinterpret_cast(AniZLibGZip::gzungetcNative) }, + ani_native_function { "gztellNative", nullptr, reinterpret_cast(AniZLibGZip::gztellNative) }, + ani_native_function { "gzsetparamsNative", nullptr, reinterpret_cast(AniZLibGZip::gzsetparamsNative) }, + ani_native_function { "gzseekNative", nullptr, reinterpret_cast(AniZLibGZip::gzseekNative) }, + ani_native_function { "gzrewindNative", nullptr, reinterpret_cast(AniZLibGZip::gzrewindNative) }, + ani_native_function { "gzreadNative", nullptr, reinterpret_cast(AniZLibGZip::gzreadNative) }, + ani_native_function { "gzputsNative", nullptr, reinterpret_cast(AniZLibGZip::gzputsNative) }, + ani_native_function { "gzputcNative", nullptr, reinterpret_cast(AniZLibGZip::gzputcNative) }, + ani_native_function { "gzprintfNative", nullptr, reinterpret_cast(AniZLibGZip::gzprintfNative) }, + ani_native_function { "gzoffsetNative", nullptr, reinterpret_cast(AniZLibGZip::gzoffsetNative) }, + ani_native_function { "gzgetsNative", nullptr, reinterpret_cast(AniZLibGZip::gzgetsNative) }, + }; + + ani_status status = env->Class_BindNativeMethods(clsGZip, methodsGZip.data(), methodsGZip.size()); + if (status != ANI_OK) { + APP_LOGE("Class_BindNativeMethods: %{public}s fail with %{public}d", TYPE_NAME_GZIPINTERNAL, status); + return ANI_ERROR; + } + + return status; +} + +extern "C" { +ANI_EXPORT ani_status ANI_Constructor(ani_vm* vm, uint32_t* result) +{ + APP_LOGI("ANI_Constructor zlib called"); + ani_env* env; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + if (status != ANI_OK) { + APP_LOGE("Unsupported ANI_VERSION_1: %{public}d", status); + return status; + } + + status = BindNSMethods(env); + if (status != ANI_OK) { + APP_LOGE("BindNSMethods: %{public}d", status); + return status; + } + + status = BindChecksumMethods(env); + if (status != ANI_OK) { + APP_LOGE("BindChecksumMethods: %{public}d", status); + return status; + } + + status = BindGZipMethods(env); + if (status != ANI_OK) { + APP_LOGE("BindGZipMethods: %{public}d", status); + return status; + } + *result = ANI_VERSION_1; APP_LOGI("ANI_Constructor finished"); diff --git a/interfaces/kits/ani/zlib/ani_zlib_callback_info.h b/interfaces/kits/ani/zlib/ani_zlib_callback_info.h new file mode 100644 index 0000000000000000000000000000000000000000..e3eecc340a7561a9c8ce9a84f78385c94b506d94 --- /dev/null +++ b/interfaces/kits/ani/zlib/ani_zlib_callback_info.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_CALLBACK_INFO_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_CALLBACK_INFO_H + +#include "zlib_callback_info_base.h" + +namespace OHOS { +namespace AppExecFwk { +class ANIZlibCallbackInfo : public LIBZIP::ZlibCallbackInfoBase { +public: + ANIZlibCallbackInfo() = default; + virtual ~ANIZlibCallbackInfo() = default; + virtual void OnZipUnZipFinish(ErrCode result) + { + result_ = result; + } + virtual void DoTask(const OHOS::AppExecFwk::InnerEvent::Callback& task) + { + task(); + } + +public: + inline ErrCode GetResult() + { + return result_; + } + +private: + ErrCode result_ = SUCCESS; +}; +} // namespace AppExecFwk +} // namespace OHOS +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_CALLBACK_INFO_H \ No newline at end of file diff --git a/interfaces/kits/ani/zlib/checksum/ani_checksum.cpp b/interfaces/kits/ani/zlib/checksum/ani_checksum.cpp new file mode 100644 index 0000000000000000000000000000000000000000..823e1f41a6bbdd4eca644f55e688b9bffb9c4121 --- /dev/null +++ b/interfaces/kits/ani/zlib/checksum/ani_checksum.cpp @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ani_checksum.h" +#include "ani_signature_builder.h" +#include "ani_zlib_common.h" +#include "checksum_common_func.h" +#include "napi_constants.h" + +namespace OHOS { +namespace AppExecFwk { +namespace AniZLibChecksum { +namespace { +constexpr const char* PARAM_NAME_BUF = "buf"; +constexpr const char* PARAM_NAME_ADLER = "adler"; +constexpr const char* PARAM_NAME_ADLER1 = "adler1"; +constexpr const char* PARAM_NAME_ADLER2 = "adler2"; +constexpr const char* PARAM_NAME_CRC = "crc"; +constexpr const char* PARAM_NAME_CRC1 = "crc1"; +constexpr const char* PARAM_NAME_CRC2 = "crc2"; +constexpr const char* PARAM_NAME_LEN2 = "len2"; +constexpr const size_t TABLE_SIZE = 256; +} // namespace + +using namespace arkts::ani_signature; + +template +static ani_object ConvertCRCTable(ani_env* env, const tableType* table, const size_t tableSize) +{ + ani_value arg = { .i = static_cast(tableSize) }; + ani_object arrayObj = CommonFunAni::CreateNewObjectByClassV2( + env, CommonFunAniNS::CLASSNAME_ARRAY, Builder::BuildSignatureDescriptor({ Builder::BuildInt() }), &arg); + RETURN_NULL_IF_NULL(arrayObj); + + static const std::string setterSig = Builder::BuildSignatureDescriptor( + { Builder::BuildInt(), Builder::BuildClass(CommonFunAniNS::CLASSNAME_OBJECT) }); + static const std::string longCtorSig = Builder::BuildSignatureDescriptor({ Builder::BuildLong() }); + for (size_t i = 0; i < tableSize; ++i) { + ani_value argLong = { .l = static_cast(table[i]) }; + ani_object longObj = + CommonFunAni::CreateNewObjectByClassV2(env, CommonFunAniNS::CLASSNAME_LONG, longCtorSig, &argLong); + RETURN_NULL_IF_NULL(longObj); + ani_status status = + env->Object_CallMethodByName_Void(arrayObj, "$_set", setterSig.c_str(), static_cast(i), longObj); + env->Reference_Delete(longObj); + if (status != ANI_OK) { + APP_LOGE("Object_CallMethodByName_Void failed %{public}d", status); + return nullptr; + } + } + + return arrayObj; +} + +ani_long adler32Native(ani_env* env, ani_object, ani_long aniAdler, ani_arraybuffer buf) +{ + APP_LOGD("adler32Native entry"); + + if (buf == nullptr) { + APP_LOGE("buf is nullptr"); + BusinessErrorAni::ThrowCommonError( + env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + size_t bufferLength = 0; + void* buffer = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(buf, &buffer, &bufferLength); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + if (buffer == nullptr) { + APP_LOGE("native buf is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + return static_cast( + adler32(static_cast(aniAdler), reinterpret_cast(buffer), static_cast(bufferLength))); +} + +ani_long adler32CombineNative(ani_env* env, ani_object, ani_long aniAdler1, ani_long aniAdler2, ani_long aniLen2) +{ + APP_LOGD("adler32CombineNative entry"); + + if (aniLen2 < 0) { + APP_LOGE("negative aniLen2"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + +#ifdef Z_LARGE64 + return static_cast(adler32_combine64( + static_cast(aniAdler1), static_cast(aniAdler2), static_cast(aniLen2))); +#else + return static_cast(adler32_combine( + static_cast(aniAdler1), static_cast(aniAdler2), static_cast(aniLen2))); +#endif +} + +ani_long crc32Native(ani_env* env, ani_object, ani_long aniCrc, ani_arraybuffer buf) +{ + APP_LOGD("crc32Native entry"); + + if (buf == nullptr) { + APP_LOGE("buf is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + size_t bufferLength = 0; + void* buffer = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(buf, &buffer, &bufferLength); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + if (buffer == nullptr) { + APP_LOGE("native buf is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + return static_cast( + crc32(static_cast(aniCrc), reinterpret_cast(buffer), static_cast(bufferLength))); +} + +ani_long crc32CombineNative(ani_env* env, ani_object, ani_long aniCrc1, ani_long aniCrc2, ani_long aniLen2) +{ + APP_LOGD("crc32CombineNative entry"); + + if (aniLen2 < 0) { + APP_LOGE("negative aniLen2"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + +#ifdef Z_LARGE64 + return static_cast( + crc32_combine64(static_cast(aniCrc1), static_cast(aniCrc2), static_cast(aniLen2))); +#else + return static_cast( + crc32_combine(static_cast(aniCrc1), static_cast(aniCrc2), static_cast(aniLen2))); +#endif +} + +ani_long crc64Native(ani_env* env, ani_object, ani_long aniCrc, ani_arraybuffer buf) +{ + APP_LOGD("crc64Native entry"); + + if (buf == nullptr) { + APP_LOGE("buf is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + size_t bufferLength = 0; + void* buffer = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(buf, &buffer, &bufferLength); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + if (buffer == nullptr) { + APP_LOGE("native buf is nullptr"); + BusinessErrorAni::ThrowCommonError(env, ERROR_PARAM_CHECK_ERROR, PARAM_NAME_BUF, TYPE_ARRAYBUFFER); + return 0; + } + + return static_cast( + LIBZIP::ComputeCrc64(static_cast(aniCrc), reinterpret_cast(buffer), bufferLength)); +} + +ani_object getCrcTableNative(ani_env* env, ani_object) +{ + APP_LOGD("getCrcTableNative entry"); + + return ConvertCRCTable(env, get_crc_table(), TABLE_SIZE); +} + +ani_object getCrc64TableNative(ani_env* env, ani_object) +{ + APP_LOGD("getCrc64TableNative entry"); + + return ConvertCRCTable(env, LIBZIP::CRC64_TABLE, TABLE_SIZE); +} +} // namespace AniZLibChecksum +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/zlib/checksum/ani_checksum.h b/interfaces/kits/ani/zlib/checksum/ani_checksum.h new file mode 100644 index 0000000000000000000000000000000000000000..624105c4cdfc04a298ee3b5fde87feddbfd02573 --- /dev/null +++ b/interfaces/kits/ani/zlib/checksum/ani_checksum.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_CHECKSUM_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_CHECKSUM_H + +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "zlib.h" + +namespace OHOS { +namespace AppExecFwk { +namespace AniZLibChecksum { +ani_long adler32Native(ani_env* env, ani_object, ani_long aniAdler, ani_arraybuffer buf); +ani_long adler32CombineNative(ani_env* env, ani_object, ani_long aniAdler1, ani_long aniAdler2, ani_long aniLen2); +ani_long crc32Native(ani_env* env, ani_object, ani_long aniCrc, ani_arraybuffer buf); +ani_long crc32CombineNative(ani_env* env, ani_object, ani_long aniCrc1, ani_long aniCrc2, ani_long aniLen2); +ani_long crc64Native(ani_env* env, ani_object, ani_long aniCrc, ani_arraybuffer buf); +ani_object getCrcTableNative(ani_env* env, ani_object); +ani_object getCrc64TableNative(ani_env* env, ani_object); +} // namespace AniZLibChecksum +} // namespace AppExecFwk +} // namespace OHOS +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_CHECKSUM_H \ No newline at end of file diff --git a/interfaces/kits/ani/zlib/common/ani_zlib_common.h b/interfaces/kits/ani/zlib/common/ani_zlib_common.h new file mode 100644 index 0000000000000000000000000000000000000000..e68011ef58129d40cb7714aee4c9a17eabf2bcd5 --- /dev/null +++ b/interfaces/kits/ani/zlib/common/ani_zlib_common.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_COMMON_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_COMMON_H + +#include "napi_business_error.h" +#include "napi_constants.h" + +#define CHECK_PARAM_NULL(param) \ + do { \ + if ((param) == nullptr) { \ + APP_LOGE(#param " is null"); \ + return; \ + } \ + } while (0) +#define CHECK_PARAM_NULL_RETURN(param, returns) \ + do { \ + if ((param) == nullptr) { \ + APP_LOGE(#param " is null"); \ + return returns; \ + } \ + } while (0) +#define CHECK_PARAM_NULL_THROW(param, throws) \ + do { \ + if ((param) == nullptr) { \ + APP_LOGE(#param " is null"); \ + OHOS::AppExecFwk::AniZLibCommon::ThrowZLibNapiError(env, throws); \ + return; \ + } \ + } while (0) +#define CHECK_PARAM_NULL_THROW_RETURN(param, throws, returns) \ + do { \ + if ((param) == nullptr) { \ + APP_LOGE(#param " is null"); \ + OHOS::AppExecFwk::AniZLibCommon::ThrowZLibNapiError(env, throws); \ + return returns; \ + } \ + } while (0) + +namespace OHOS { +namespace AppExecFwk { +namespace AniZLibCommon { + +inline void ThrowZLibNapiError(ani_env* env, int posixError) +{ + auto errorPair = LIBZIP::errCodeTable.find(posixError) == LIBZIP::errCodeTable.end() + ? LIBZIP::errCodeTable.at(ENOSTR) + : LIBZIP::errCodeTable.at(posixError); + BusinessErrorAni::ThrowError(env, errorPair.first, errorPair.second); +} +} // namespace AniZLibCommon +} // namespace AppExecFwk +} // namespace OHOS +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_COMMON_H diff --git a/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets b/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets index 81f511465d529b6f9d0b6047825cee986d255a4b..e21d9043f14c8c12a70ed01f56ada02a6b509531 100644 --- a/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets +++ b/interfaces/kits/ani/zlib/ets/@ohos.zlib.ets @@ -24,6 +24,18 @@ export default namespace zlib { loadLibrary("ani_zlib.z"); + const MIN_ASCII: int = 0; + const MAX_ASCII: int = 255; + const ERROR_PARAM_CHECK_ERROR: int = 401; + const PARAM_CHECK_FAILED: string = 'The parameter check failed'; + function createBusinessError(code: int, message: string) { + let err = new BusinessError(); + err.code = code; + err.name = 'Error'; + err.message = message; + return err; + } + export enum CompressLevel { COMPRESS_LEVEL_NO_COMPRESSION = 0, COMPRESS_LEVEL_BEST_SPEED = 1, @@ -39,45 +51,97 @@ export default namespace zlib { COMPRESS_STRATEGY_FIXED = 4 } + export enum ParallelStrategy { + PARALLEL_STRATEGY_SEQUENTIAL = 0, + PARALLEL_STRATEGY_PARALLEL_DECOMPRESSION = 1 + } + export enum MemLevel { MEM_LEVEL_MIN = 1, MEM_LEVEL_MAX = 9, MEM_LEVEL_DEFAULT = 8 } + export enum CompressFlushMode { + NO_FLUSH = 0, + PARTIAL_FLUSH = 1, + SYNC_FLUSH = 2, + FULL_FLUSH = 3, + FINISH = 4, + BLOCK = 5, + TREES = 6 + } + + export enum ReturnStatus { + OK = 0, + STREAM_END = 1, + NEED_DICT = 2, + ERRNO = -1, + STREAM_ERROR = -2, + DATA_ERROR = -3, + MEM_ERROR = -4, + BUF_ERROR = -5 + } + + export enum CompressMethod { + DEFLATED = 8, + } + + export enum OffsetReferencePoint { + SEEK_SET = 0, + SEEK_CUR = 1, + } + export interface Options { level?: CompressLevel; memLevel?: MemLevel; strategy?: CompressStrategy; + parallel?: ParallelStrategy; } class OptionsInner implements Options { - level?: CompressLevel | undefined = CompressLevel.COMPRESS_LEVEL_DEFAULT_COMPRESSION; - memLevel?: MemLevel | undefined = MemLevel.MEM_LEVEL_DEFAULT; - strategy?: CompressStrategy | undefined = CompressStrategy.COMPRESS_STRATEGY_DEFAULT_STRATEGY; + level?: CompressLevel | undefined; + memLevel?: MemLevel | undefined; + strategy?: CompressStrategy | undefined; + parallel?: ParallelStrategy | undefined; + } + + export interface GzErrorOutputInfo { + status: ReturnStatus; + statusMsg: string; + } + + class GzErrorOutputInfoInner implements GzErrorOutputInfo { + status: ReturnStatus = ReturnStatus.OK; + statusMsg: string; + + constructor() { } + constructor(status: ReturnStatus, statusMsg: string) { + this.status = status; + this.statusMsg = statusMsg; + } } export function compressFile(inFile: string, outFile: string, options: Options, callback: AsyncCallback): void { let execFun = (): void => { - zlib.CompressFile(inFile, outFile, options); + zlib.compressFileNative(inFile, outFile, options); }; let p1 = taskpool.execute(execFun); p1.then(() => { - let r = new BusinessError(); - callback(r, undefined); + callback(null, undefined); }).catch((err: Error): void => { callback(err as BusinessError, undefined); }); } export function compressFile(inFile: string, outFile: string, options: Options): Promise { - let p: Promise = new Promise((resolve: (v:undefined) => void, reject: (error: Object) => void) : void => { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { let execFun = (): void => { - zlib.CompressFile(inFile, outFile, options); + zlib.compressFileNative(inFile, outFile, options); }; let p1 = taskpool.execute(execFun); p1.then((): void => { - resolve(undefined); + resolve(Promise.resolve()); }, (err: Error): void => { reject(err as BusinessError); }); @@ -85,16 +149,15 @@ export default namespace zlib { return p; } - export native function CompressFile(inFile: string, outFile: string, options: Options): void; + export native function compressFileNative(inFile: string, outFile: string, options: Options): void; export function decompressFile(inFile: string, outFile: string, options: Options, callback: AsyncCallback): void { let execFun = (): void => { - zlib.DecompressFile(inFile, outFile, options); + zlib.decompressFileNative(inFile, outFile, options); }; let p1 = taskpool.execute(execFun); p1.then(() => { - let r = new BusinessError(); - callback(r, undefined); + callback(null, undefined); }).catch((err: Error): void => { callback(err as BusinessError, undefined); }); @@ -102,12 +165,11 @@ export default namespace zlib { export function decompressFile(inFile: string, outFile: string, callback: AsyncCallback): void { let execFun = (): void => { - zlib.DecompressFile(inFile, outFile, new OptionsInner()); + zlib.decompressFileNative(inFile, outFile, new OptionsInner()); }; let p1 = taskpool.execute(execFun); p1.then(() => { - let r = new BusinessError(); - callback(r, undefined); + callback(null, undefined); }).catch((err: Error): void => { callback(err as BusinessError, undefined); }); @@ -115,13 +177,13 @@ export default namespace zlib { export function decompressFile(inFile: string, outFile: string, options?: Options): Promise { let optionsParam = options ?? new OptionsInner(); - let p: Promise = new Promise((resolve: (v:undefined) => void, reject: (error: Object) => void) : void => { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { let execFun = (): void => { - zlib.DecompressFile(inFile, outFile, optionsParam); + zlib.decompressFileNative(inFile, outFile, optionsParam); }; let p1 = taskpool.execute(execFun); p1.then((): void => { - resolve(undefined); + resolve(Promise.resolve()); }, (err: Error): void => { reject(err as BusinessError); }); @@ -129,5 +191,714 @@ export default namespace zlib { return p; } - export native function DecompressFile(inFile: string, outFile: string, options?: Options): void; -} \ No newline at end of file + export native function decompressFileNative(inFile: string, outFile: string, options?: Options): void; + + export interface Checksum { + adler32(adler: long, buf: ArrayBuffer): Promise; + adler32Combine(adler1: long, adler2: long, len2: long): Promise; + crc32(crc: long, buf: ArrayBuffer): Promise; + crc32Combine(crc1: long, crc2: long, len2: long): Promise; + crc64(crc: long, buf: ArrayBuffer): Promise; + getCrcTable(): Promise>; + getCrc64Table(): Promise>; + } + + export class ChecksumInternal implements Checksum { + private native adler32Native(adler: long, buf: ArrayBuffer): long; + private native adler32CombineNative(adler1: long, adler2: long, len2: long): long; + private native crc32Native(crc: long, buf: ArrayBuffer): long; + private native crc32CombineNative(crc1: long, crc2: long, len2: long): long; + private native crc64Native(crc: long, buf: ArrayBuffer): long; + private native getCrcTableNative(): Array; + private native getCrc64TableNative(): Array; + + public adler32(adler: long, buf: ArrayBuffer): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.adler32Native(adler, buf); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public adler32Combine(adler1: long, adler2: long, len2: long): Promise { + if (len2 < 0) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.adler32CombineNative(adler1, adler2, len2); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public crc32(crc: long, buf: ArrayBuffer): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.crc32Native(crc, buf); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public crc32Combine(crc1: long, crc2: long, len2: long): Promise { + if (len2 < 0) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.crc32CombineNative(crc1, crc2, len2); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public crc64(crc: long, buf: ArrayBuffer): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.crc64Native(crc, buf); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public getCrcTable(): Promise> { + let p: Promise> = new Promise>((resolve: (v:Array) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): Array => { + return this.getCrcTableNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public getCrc64Table(): Promise> { + let p: Promise> = new Promise>((resolve: (v:Array) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): Array => { + return this.getCrc64TableNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let resultArray: Array = e as Array; + resolve(resultArray); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + } + + export interface GZip { + gzdopen(fd: int, mode: string): Promise; + gzbuffer(size: long): Promise; + gzopen(path: string, mode: string): Promise; + gzeof(): Promise; + gzdirect(): Promise; + gzclose(): Promise; + gzclearerr(): Promise; + gzerror(): Promise; + gzgetc(): Promise; + gzflush(flush: CompressFlushMode): Promise; + gzfwrite(buf: ArrayBuffer, size: long, nitems: long): Promise + gzfread(buf: ArrayBuffer, size: long, nitems: long): Promise; + gzclosew(): Promise; + gzcloser(): Promise; + gzwrite(buf: ArrayBuffer, len: long): Promise; + gzungetc(c: int): Promise; + gztell(): Promise; + gzsetparams(level: CompressLevel, strategy: CompressStrategy): Promise; + gzseek(offset: long, whence: OffsetReferencePoint): Promise; + gzrewind(): Promise; + gzread(buf: ArrayBuffer): Promise; + gzputs(str: string): Promise; + gzputc(c: int): Promise; + gzprintf(format: string, ...args: Array): Promise; + gzoffset(): Promise; + gzgets(buf: ArrayBuffer): Promise; + } + + export class GZipInternal implements GZip { + @JSONStringifyIgnore + private nativeGZFile : long = 0; + + private native gzdopenNative(fd: int, mode: string): void; + private native gzbufferNative(size: long): int; + private native gzopenNative(path: string, mode: string): void; + private native gzeofNative(): int; + private native gzdirectNative(): int; + private native gzcloseNative(): ReturnStatus; + private native gzclearerrNative(): void; + private native gzerrorNative(): GzErrorOutputInfo; + private native gzgetcNative(): int; + private native gzflushNative(flush: CompressFlushMode): ReturnStatus; + private native gzfwriteNative(buf: ArrayBuffer, size: long, nitems: long): long; + private native gzfreadNative(buf: ArrayBuffer, size: long, nitems: long): long; + private native gzclosewNative(): ReturnStatus; + private native gzcloserNative(): ReturnStatus; + private native gzwriteNative(buf: ArrayBuffer, len: long): long; + private native gzungetcNative(c: int): int; + private native gztellNative(): long; + private native gzsetparamsNative(level: CompressLevel, strategy: CompressStrategy): ReturnStatus; + private native gzseekNative(offset: long, whence: OffsetReferencePoint): long; + private native gzrewindNative(): ReturnStatus; + private native gzreadNative(buf: ArrayBuffer): long; + private native gzputsNative(str: string): int; + private native gzputcNative(c: int): int; + private native gzprintfNative(format: string, ...args: Array): int; + private native gzoffsetNative(): long; + private native gzgetsNative(buf: ArrayBuffer): string; + + public gzdopen(fd: int, mode: string): Promise { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + this.gzdopenNative(fd, mode); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzbuffer(size: long): Promise { + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzbufferNative(size); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzopen(path: string, mode: string): Promise { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + this.gzopenNative(path, mode); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzeof(): Promise { + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzeofNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzdirect(): Promise { + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzdirectNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzclose(): Promise { + let p: Promise = new Promise((resolve: (v:ReturnStatus) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): ReturnStatus => { + return this.gzcloseNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: ReturnStatus = e as ReturnStatus; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzclearerr(): Promise { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + this.gzclearerrNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzerror(): Promise { + let p: Promise = new Promise((resolve: (v:GzErrorOutputInfo) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): GzErrorOutputInfo => { + return this.gzerrorNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: GzErrorOutputInfo = e as GzErrorOutputInfo; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzgetc(): Promise { + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzgetcNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzflush(flush: CompressFlushMode): Promise { + let p: Promise = new Promise((resolve: (v:ReturnStatus) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): ReturnStatus => { + return this.gzflushNative(flush); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: ReturnStatus = e as ReturnStatus; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzfwrite(buf: ArrayBuffer, size: long, nitems: long): Promise { + if (buf.byteLength == 0 || size < 0 || nitems < 0 || BigInt(buf.byteLength) < BigInt(size) * BigInt(nitems)) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gzfwriteNative(buf, size, nitems); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzfread(buf: ArrayBuffer, size: long, nitems: long): Promise { + if (buf.byteLength == 0 || size < 0 || nitems < 0 || BigInt(buf.byteLength) < BigInt(size) * BigInt(nitems)) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gzfreadNative(buf, size, nitems); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzclosew(): Promise { + let p: Promise = new Promise((resolve: (v:ReturnStatus) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): ReturnStatus => { + return this.gzclosewNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: ReturnStatus = e as ReturnStatus; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzcloser(): Promise { + let p: Promise = new Promise((resolve: (v:ReturnStatus) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): ReturnStatus => { + return this.gzcloserNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: ReturnStatus = e as ReturnStatus; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzwrite(buf: ArrayBuffer, len: long): Promise { + if (buf.byteLength == 0 || len > (buf.byteLength as long)) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gzwriteNative(buf, len); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzungetc(c: int): Promise { + if (c < MIN_ASCII || c > MAX_ASCII) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzungetcNative(c); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gztell(): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gztellNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzsetparams(level: CompressLevel, strategy: CompressStrategy): Promise { + let p: Promise = new Promise((resolve: (v:ReturnStatus) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): ReturnStatus => { + return this.gzsetparamsNative(level, strategy); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: ReturnStatus = e as ReturnStatus; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzseek(offset: long, whence: OffsetReferencePoint): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gzseekNative(offset, whence); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzrewind(): Promise { + let p: Promise = new Promise((resolve: (v:ReturnStatus) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): ReturnStatus => { + return this.gzrewindNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: ReturnStatus = e as ReturnStatus; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzread(buf: ArrayBuffer): Promise { + if (buf.byteLength == 0) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gzreadNative(buf); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzputs(str: string): Promise { + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzputsNative(str); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzputc(c: int): Promise { + if (c < MIN_ASCII || c > MAX_ASCII) { + throw createBusinessError(ERROR_PARAM_CHECK_ERROR, PARAM_CHECK_FAILED); + } + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzputcNative(c); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzprintf(format: string, ...args: Array): Promise { + let p: Promise = new Promise((resolve: (v:int) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): int => { + return this.gzprintfNative(format, ...args); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: int = e as int; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzoffset(): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return this.gzoffsetNative(); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + public gzgets(buf: ArrayBuffer): Promise { + let p: Promise = new Promise((resolve: (v:string) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): string => { + return this.gzgetsNative(buf); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: string = e as string; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + } + + export native function compressFilesNative(inFiles: Array, outFile: string, options: Options): void; + + export function compressFiles(inFiles: Array, outFile: string, options: Options): Promise { + let p: Promise = new Promise((resolve: (v:PromiseLike) => void, reject: (error: Error) => void) : void => { + let execFun = (): void => { + zlib.compressFilesNative(inFiles, outFile, options); + }; + let p1 = taskpool.execute(execFun); + p1.then((): void => { + resolve(Promise.resolve()); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + export native function getOriginalSizeNative(compressedFile: string): long; + + export function getOriginalSize(compressedFile: string): Promise { + let p: Promise = new Promise((resolve: (v:long) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): long => { + return zlib.getOriginalSizeNative(compressedFile); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: long = e as long; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + export native function createChecksumNative(isSync: boolean): Checksum; + + export function createChecksum(): Promise { + let p: Promise = new Promise((resolve: (v:Checksum) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): Checksum => { + return zlib.createChecksumNative(false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: Checksum = e as Checksum; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function createChecksumSync(): Checksum { + return zlib.createChecksumNative(true); + } + + export native function createGZipNative(isSync: boolean): GZip; + + function createGZip(): Promise { + let p: Promise = new Promise((resolve: (v:GZip) => void, reject: (error: BusinessError) => void) : void => { + let execFun = (): GZip => { + return zlib.createGZipNative(false); + }; + let p1 = taskpool.execute(execFun); + p1.then((e: NullishType) => { + let result: GZip = e as GZip; + resolve(result); + }, (err: Error): void => { + reject(err as BusinessError); + }); + }); + return p; + } + + function createGZipSync(): GZip { + return zlib.createGZipNative(true); + } +} diff --git a/interfaces/kits/ani/zlib/gzip/ani_gzip.cpp b/interfaces/kits/ani/zlib/gzip/ani_gzip.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b7f4464b62f0742739784c599b8168b2ae0c797c --- /dev/null +++ b/interfaces/kits/ani/zlib/gzip/ani_gzip.cpp @@ -0,0 +1,1006 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ani_gzip.h" +#include "ani_signature_builder.h" +#include "ani_zlib_common.h" +#include "enum_util.h" +#include "napi_business_error.h" +#include "napi_constants.h" +#include "zlib.h" + +namespace OHOS { +namespace AppExecFwk { +namespace AniZLibGZip { +namespace { +constexpr const char* CLASSNAME_GZ_ERROR_OUTPUT_INFO_INNER = "@ohos.zlib.zlib.GzErrorOutputInfoInner"; +constexpr const char* FIELD_NAME_NATIVE_GZFILE = "nativeGZFile"; +constexpr int INVALID_FD = -1; +constexpr uint8_t MIN_ASCII = 0; +constexpr uint8_t MAX_ASCII = 255; +} // namespace +using namespace arkts::ani_signature; + +static bool TryGetNativeGZFile(ani_env* env, ani_object instance, gzFile& file, int throwsOnError) +{ + ani_long longValue = 0; + ani_status status = env->Object_GetFieldByName_Long(instance, FIELD_NAME_NATIVE_GZFILE, &longValue); + if (status != ANI_OK) { + APP_LOGE("Object_GetFieldByName_Long failed %{public}d", status); + AniZLibCommon::ThrowZLibNapiError(env, throwsOnError); + return false; + } + + file = reinterpret_cast(longValue); + return true; +} + +static bool TrySetNativeGZFile(ani_env* env, ani_object instance, gzFile nativeGZFile) +{ + ani_status status = + env->Object_SetFieldByName_Long(instance, FIELD_NAME_NATIVE_GZFILE, reinterpret_cast(nativeGZFile)); + if (status != ANI_OK) { + APP_LOGE("Object_GetFieldByName_Long failed %{public}d", status); + return false; + } + return true; +} + +static bool TryGetStringArg(ani_env* env, ani_array_ref args, ani_size index, std::string& output) +{ + ani_ref ref = nullptr; + ani_status status = env->Array_Get_Ref(args, index, &ref); + if (status != ANI_OK) { + APP_LOGE("Array_Get_Ref failed %{public}d", status); + return false; + } + + ani_boolean isNull = ANI_FALSE; + status = env->Reference_IsNull(ref, &isNull); + if (status != ANI_OK) { + APP_LOGE("Reference_IsNull failed %{public}d", status); + return false; + } + if (isNull == ANI_TRUE) { + output = "null"; + return true; + } + + ani_boolean isUndefined = ANI_FALSE; + status = env->Reference_IsUndefined(ref, &isUndefined); + if (status != ANI_OK) { + APP_LOGE("Reference_IsUndefined failed %{public}d", status); + return false; + } + if (isUndefined == ANI_TRUE) { + output = "undefined"; + return true; + } + + ani_object arg = static_cast(ref); + + Type type = Builder::BuildClass(CommonFunAniNS::CLASSNAME_STRING); + ani_class cls = CommonFunAni::CreateClassByName(env, type.Descriptor().c_str()); + if (cls == nullptr) { + APP_LOGE("CreateClassByName failed "); + return false; + } + + bool result = false; + ani_boolean isString = ANI_FALSE; + status = env->Object_InstanceOf(arg, cls, &isString); + if (status == ANI_OK && isString == ANI_TRUE) { + result = CommonFunAni::ParseString(env, static_cast(arg), output); + } + + if (!result) { + APP_LOGE("get string arg failed"); + } + return result; +} + +static bool TryGetNumberArg(ani_env* env, ani_array_ref args, ani_size index, std::string& output) +{ + ani_ref ref = nullptr; + ani_status status = env->Array_Get_Ref(args, index, &ref); + if (status != ANI_OK) { + APP_LOGE("Array_Get_Ref failed %{public}d", status); + return false; + } + + ani_boolean isNull = ANI_FALSE; + status = env->Reference_IsNull(ref, &isNull); + if (status != ANI_OK) { + APP_LOGE("Reference_IsNull failed %{public}d", status); + return false; + } + if (isNull == ANI_TRUE) { + output = "null"; + return true; + } + + ani_boolean isUndefined = ANI_FALSE; + status = env->Reference_IsUndefined(ref, &isUndefined); + if (status != ANI_OK) { + APP_LOGE("Reference_IsUndefined failed %{public}d", status); + return false; + } + if (isUndefined == ANI_TRUE) { + output = "undefined"; + return true; + } + + ani_object arg = static_cast(ref); + + Type type = Builder::BuildClass(CommonFunAniNS::CLASSNAME_DOUBLE); + ani_class cls = CommonFunAni::CreateClassByName(env, type.Descriptor().c_str()); + if (cls == nullptr) { + APP_LOGE("CreateClassByName failed "); + return false; + } + + ani_boolean isDouble = ANI_FALSE; + status = env->Object_InstanceOf(arg, cls, &isDouble); + if (status == ANI_OK && isDouble == ANI_TRUE) { + ani_double numberArg = 0; + status = env->Object_CallMethodByName_Double(arg, CommonFunAniNS::PROPERTYNAME_UNBOXED, nullptr, &numberArg); + output = std::to_string(static_cast(numberArg)); + } + + if (status != ANI_OK) { + APP_LOGE("get double arg failed %{public}d", status); + return false; + } + return true; +} + +static bool GetFormattedString(ani_env* env, const std::string& format, ani_object args, std::string& formattedString) +{ + ani_size maxArgCount = 0; + ani_status status = env->Array_GetLength(reinterpret_cast(args), &maxArgCount); + if (status != ANI_OK) { + APP_LOGE("Array_GetLength failed %{public}d", status); + return false; + } + + if (maxArgCount == 0) { + formattedString = format; + return true; + } + + ani_size curArgCount = 0; + std::string arg; + for (size_t pos = 0; pos < format.size(); ++pos) { + if (curArgCount >= maxArgCount) { + break; + } + if (format[pos] != '%') { + formattedString += format[pos]; + continue; + } + if (pos + 1 >= format.size()) { + break; + } + switch (format[pos + 1]) { + case 'd': + case 'i': + if (TryGetNumberArg(env, reinterpret_cast(args), curArgCount, arg)) { + formattedString += arg; + } + ++curArgCount; + ++pos; + break; + case 's': + if (TryGetStringArg(env, reinterpret_cast(args), curArgCount, arg)) { + formattedString += arg; + } + ++curArgCount; + ++pos; + break; + case '%': + formattedString += format[pos]; + ++pos; + break; + default: + formattedString += format[pos]; + break; + } + } + + return true; +} + +void gzdopenNative(ani_env* env, ani_object instance, ani_int aniFd, ani_string aniMode) +{ + APP_LOGD("gzdopenNative entry"); + + CHECK_PARAM_NULL(env); + CHECK_PARAM_NULL_THROW(instance, EFAULT); + CHECK_PARAM_NULL_THROW(aniMode, EINVAL); + + std::string mode; + if (!CommonFunAni::ParseString(env, aniMode, mode)) { + APP_LOGE("get mode failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return; + } + if (nativeGZFile != nullptr) { + APP_LOGW("nativeGZFile is not null"); + } + + nativeGZFile = gzdopen(aniFd, mode.c_str()); + CHECK_PARAM_NULL_THROW(nativeGZFile, ENOENT); + if (!TrySetNativeGZFile(env, instance, nativeGZFile)) { + APP_LOGE("TrySetNativeGZFile failed"); + gzclose(nativeGZFile); + AniZLibCommon::ThrowZLibNapiError(env, EFAULT); + } +} + +ani_int gzbufferNative(ani_env* env, ani_object instance, ani_long aniSize) +{ + APP_LOGD("gzbufferNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return -1; + } + + int ret = gzbuffer(nativeGZFile, static_cast(aniSize)); + if (ret < 0) { + APP_LOGE("gzbuffer failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } + return ret; +} + +void gzopenNative(ani_env* env, ani_object instance, ani_string aniPath, ani_string aniMode) +{ + APP_LOGD("gzopenNative entry"); + + CHECK_PARAM_NULL(env); + CHECK_PARAM_NULL_THROW(instance, EFAULT); + CHECK_PARAM_NULL_THROW(aniPath, EINVAL); + CHECK_PARAM_NULL_THROW(aniMode, EINVAL); + + std::string path; + if (!CommonFunAni::ParseString(env, aniPath, path)) { + APP_LOGE("get path failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return; + } + std::string mode; + if (!CommonFunAni::ParseString(env, aniMode, mode)) { + APP_LOGE("get mode failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return; + } + if (nativeGZFile != nullptr) { + APP_LOGW("nativeGZFile is not null"); + } + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) && !defined(Z_LARGE64) + nativeGZFile = gzopen64(path.c_str(), mode.c_str()); +#else + nativeGZFile = gzopen(path.c_str(), mode.c_str()); +#endif + CHECK_PARAM_NULL_THROW(nativeGZFile, ENOENT); + if (!TrySetNativeGZFile(env, instance, nativeGZFile)) { + APP_LOGE("TrySetNativeGZFile failed"); + gzclose(nativeGZFile); + AniZLibCommon::ThrowZLibNapiError(env, EFAULT); + } +} + +ani_int gzeofNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzeofNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return 0; + } + + int ret = gzeof(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzeof failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + } + return ret; +} + +ani_int gzdirectNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzdirectNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return 0; + } + + int ret = gzdirect(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzdirect failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + } + return ret; +} + +ani_enum_item gzcloseNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzcloseNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return nullptr; + } + + int ret = gzclose(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzclose failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + return nullptr; + } + + return EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, ret); +} + +void gzclearerrNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzclearerrNative entry"); + + CHECK_PARAM_NULL(env); + CHECK_PARAM_NULL_THROW(instance, EFAULT); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return; + } + CHECK_PARAM_NULL_THROW(nativeGZFile, EFAULT); + + gzclearerr(nativeGZFile); +} + +ani_object gzerrorNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzerrorNative entry"); + + RETURN_NULL_IF_NULL(env); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return nullptr; + } + + int errCode = 0; + const char* errMsg = gzerror(nativeGZFile, &errCode); + CHECK_PARAM_NULL_THROW_RETURN(errMsg, LIBZIP::EZSTREAM_ERROR, nullptr); + + // statusMsg: string + ani_string statusMsg = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, errMsg, statusMsg)); + + ani_value args[] = { + { .r = EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, errCode) }, + { .r = statusMsg }, + }; + static const std::string ctorSig = + arkts::ani_signature::SignatureBuilder() + .AddClass(CommonFunAniNS::CLASSNAME_ZLIB_RETURN_STATUS) // status: ReturnStatus + .AddClass(CommonFunAniNS::CLASSNAME_STRING) // statusMsg: string + .BuildSignatureDescriptor(); + return CommonFunAni::CreateNewObjectByClassV2(env, CLASSNAME_GZ_ERROR_OUTPUT_INFO_INNER, ctorSig, args); +} + +ani_int gzgetcNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzgetcNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + + int ret = gzgetc(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzgetc failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + return -1; + } + return ret; +} + +ani_enum_item gzflushNative(ani_env* env, ani_object instance, ani_enum_item aniFlush) +{ + APP_LOGD("gzflushNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(aniFlush, EINVAL, nullptr); + int flush = 0; + if (!EnumUtils::EnumETSToNative(env, aniFlush, flush)) { + APP_LOGE("parse aniFlush failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return nullptr; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return nullptr; + } + + int ret = gzflush(nativeGZFile, flush); + if (ret < 0) { + APP_LOGE("gzflush failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + return nullptr; + } + + return EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, ret); +} + +ani_long gzfwriteNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf, ani_long aniSize, ani_long aniNItems) +{ + APP_LOGD("gzfwriteNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + CHECK_PARAM_NULL_THROW_RETURN(aniBuf, EINVAL, 0); + if (aniSize < 0 || aniNItems < 0) { + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + + size_t bufLen = 0; + void* buf = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(aniBuf, &buf, &bufLen); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + CHECK_PARAM_NULL_THROW_RETURN(buf, EINVAL, 0); + if (bufLen == 0) { + APP_LOGE("bufLen is 0"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + z_size_t total = static_cast(aniSize) * static_cast(aniNItems); //zlib will handle overflow + if (static_cast(bufLen) < total) { + APP_LOGE("bufLen is too small"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return 0; + } + + z_size_t ret = gzfwrite(buf, static_cast(aniSize), static_cast(aniNItems), nativeGZFile); + if (ret <= 0) { + APP_LOGE("gzfwrite failed %{public}zu", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + return 0; + } + + return static_cast(ret); +} + +ani_long gzfreadNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf, ani_long aniSize, ani_long aniNItems) +{ + APP_LOGD("gzfreadNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + CHECK_PARAM_NULL_THROW_RETURN(aniBuf, EINVAL, 0); + if (aniSize < 0 || aniNItems < 0) { + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + + size_t bufLen = 0; + void* buf = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(aniBuf, &buf, &bufLen); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + AniZLibCommon::ThrowZLibNapiError(env, EFAULT); + return 0; + } + CHECK_PARAM_NULL_THROW_RETURN(buf, EINVAL, 0); + if (bufLen == 0) { + APP_LOGE("bufLen is 0"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + z_size_t total = static_cast(aniSize) * static_cast(aniNItems); //zlib will handle overflow + if (static_cast(bufLen) < total) { + APP_LOGE("bufLen is too small"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return 0; + } + + z_size_t ret = gzfread(buf, static_cast(aniSize), static_cast(aniNItems), nativeGZFile); + if (ret <= 0) { + APP_LOGE("gzfread failed %{public}zu", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + return 0; + } + + return static_cast(ret); +} + +ani_enum_item gzclosewNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzclosewNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EFAULT)) { + return nullptr; + } + + int ret = gzclose_w(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzclose_w failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + return nullptr; + } + + return EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, ret); +} + +ani_enum_item gzcloserNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzcloserNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return nullptr; + } + + int ret = gzclose_r(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzclose_r failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + return nullptr; + } + + return EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, ret); +} + +ani_long gzwriteNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf, ani_long aniLen) +{ + APP_LOGD("gzwriteNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + CHECK_PARAM_NULL_THROW_RETURN(aniBuf, EINVAL, 0); + + size_t bufLen = 0; + void* buf = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(aniBuf, &buf, &bufLen); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + CHECK_PARAM_NULL_THROW_RETURN(buf, EINVAL, 0); + if (bufLen == 0) { + APP_LOGE("bufLen is 0"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + if (aniLen > static_cast(bufLen)) { + APP_LOGE("bufLen is too small"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return 0; + } + + int ret = gzwrite(nativeGZFile, buf, static_cast(aniLen)); + if (ret <= 0) { + APP_LOGE("gzwrite failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } + + return ret; +} + +ani_int gzungetcNative(ani_env* env, ani_object instance, ani_int aniC) +{ + APP_LOGD("gzungetcNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + + if (aniC < MIN_ASCII || aniC > MAX_ASCII) { + APP_LOGE("gzungetcNative invalid c: %{public}d", aniC); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return -1; + } + + int ret = gzungetc(aniC, nativeGZFile); + if (ret < 0) { + APP_LOGE("gzungetc failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } + + return ret; +} + +ani_long gztellNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gztellNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) && !defined(Z_LARGE64) + z_off64_t ret = gztell64(nativeGZFile); + if (ret < 0) { + APP_LOGE("gztell64 failed %{public}lld", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } +#else + z_off_t ret = gztell(nativeGZFile); + if (ret < 0) { + APP_LOGE("gztell failed %{public}ld", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } +#endif + return static_cast(ret); +} + +ani_enum_item gzsetparamsNative(ani_env* env, ani_object instance, ani_enum_item aniLevel, ani_enum_item aniStrategy) +{ + APP_LOGD("gzsetparamsNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(aniLevel, EINVAL, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(aniStrategy, EINVAL, nullptr); + int level = 0; + if (!EnumUtils::EnumETSToNative(env, aniLevel, level)) { + APP_LOGE("parse aniLevel failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return nullptr; + } + int strategy = 0; + if (!EnumUtils::EnumETSToNative(env, aniStrategy, strategy)) { + APP_LOGE("parse aniStrategy failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return nullptr; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return nullptr; + } + + int ret = gzsetparams(nativeGZFile, level, strategy); + if (ret < 0) { + APP_LOGE("gzsetparams failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + return nullptr; + } + + return EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, ret); +} + +ani_long gzseekNative(ani_env* env, ani_object instance, ani_long aniOffset, ani_enum_item aniWhence) +{ + APP_LOGD("gzseekNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + CHECK_PARAM_NULL_THROW_RETURN(aniWhence, EINVAL, -1); + + int whence = 0; + if (!EnumUtils::EnumETSToNative(env, aniWhence, whence)) { + APP_LOGE("parse aniWhence failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return -1; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) && !defined(Z_LARGE64) + z_off64_t ret = gzseek64(nativeGZFile, static_cast(aniOffset), whence); + if (ret < 0) { + APP_LOGE("gzseek64 failed %{public}lld", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } +#else + z_off_t ret = gzseek(nativeGZFile, static_cast(aniOffset), whence); + if (ret < 0) { + APP_LOGE("gzseek failed %{public}ld", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } +#endif + return static_cast(ret); +} + +ani_enum_item gzrewindNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzrewindNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return nullptr; + } + + int ret = gzrewind(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzrewind failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + return nullptr; + } + + return EnumUtils::EnumNativeToETS_Zlib_ReturnStatus(env, ret); +} + +ani_long gzreadNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf) +{ + APP_LOGD("gzreadNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + CHECK_PARAM_NULL_THROW_RETURN(aniBuf, EINVAL, -1); + + size_t bufLen = 0; + void* buf = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(aniBuf, &buf, &bufLen); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + AniZLibCommon::ThrowZLibNapiError(env, EFAULT); + return -1; + } + CHECK_PARAM_NULL_THROW_RETURN(buf, EINVAL, -1); + if (bufLen == 0) { + APP_LOGE("bufLen is 0"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return -1; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + + int ret = gzread(nativeGZFile, buf, static_cast(bufLen)); + if (ret < 0) { + APP_LOGE("gzread failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } + + return ret; +} + +ani_int gzputsNative(ani_env* env, ani_object instance, ani_string aniStr) +{ + APP_LOGD("gzputsNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + CHECK_PARAM_NULL_THROW_RETURN(aniStr, EINVAL, -1); + + std::string str; + bool result = CommonFunAni::ParseString(env, aniStr, str); + if (!result) { + APP_LOGE("get str failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return -1; + } + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + + int ret = gzputs(nativeGZFile, str.c_str()); + if (ret < 0) { + APP_LOGE("gzputs failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } + + return ret; +} + +ani_int gzputcNative(ani_env* env, ani_object instance, ani_int aniC) +{ + APP_LOGD("gzputcNative entry"); + + CHECK_PARAM_NULL_RETURN(env, -1); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, -1); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return -1; + } + + if (aniC < MIN_ASCII || aniC > MAX_ASCII) { + APP_LOGE("gzputcNative invalid c: %{public}d", aniC); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return -1; + } + + int ret = gzputc(nativeGZFile, aniC); + if (ret < 0) { + APP_LOGE("gzputc failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } + + return ret; +} + +ani_int gzprintfNative(ani_env* env, ani_object instance, ani_string aniFormat, ani_object args) +{ + APP_LOGD("gzprintfNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + CHECK_PARAM_NULL_THROW_RETURN(aniFormat, EINVAL, 0); + CHECK_PARAM_NULL_THROW_RETURN(args, EINVAL, 0); + + std::string format; + bool result = CommonFunAni::ParseString(env, aniFormat, format); + if (!result) { + APP_LOGE("get format failed"); + AniZLibCommon::ThrowZLibNapiError(env, EINVAL); + return 0; + } + APP_LOGD("format: %{public}s", format.c_str()); + + std::string formattedStr; + result = GetFormattedString(env, format, args, formattedStr); + if (!result) { + APP_LOGE("GetFormattedString failed"); + return 0; + } + APP_LOGD("formattedStr: %{public}s", formattedStr.c_str()); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return 0; + } + + int ret = gzprintf(nativeGZFile, "%s", formattedStr.c_str()); + if (ret < 0) { + APP_LOGE("gzprintf failed %{public}d", ret); + AniZLibCommon::ThrowZLibNapiError(env, ret); + } + return ret; +} + +ani_long gzoffsetNative(ani_env* env, ani_object instance) +{ + APP_LOGD("gzoffsetNative entry"); + + CHECK_PARAM_NULL_RETURN(env, 0); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, 0); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return 0; + } + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) && !defined(Z_LARGE64) + z_off64_t ret = gzoffset64(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzoffset64 failed %{public}lld", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } +#else + z_off_t ret = gzoffset(nativeGZFile); + if (ret < 0) { + APP_LOGE("gzoffset failed %{public}ld", ret); + AniZLibCommon::ThrowZLibNapiError(env, ENOSTR); + } +#endif + return static_cast(ret); +} + +ani_string gzgetsNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf) +{ + APP_LOGD("gzgetsNative entry"); + + CHECK_PARAM_NULL_RETURN(env, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(instance, EFAULT, nullptr); + CHECK_PARAM_NULL_THROW_RETURN(aniBuf, EINVAL, nullptr); + + gzFile nativeGZFile = nullptr; + if (!TryGetNativeGZFile(env, instance, nativeGZFile, EINVAL)) { + return nullptr; + } + + size_t bufLen = 0; + void* buf = nullptr; + ani_status status = env->ArrayBuffer_GetInfo(aniBuf, &buf, &bufLen); + if (status != ANI_OK) { + APP_LOGE("ArrayBuffer_GetInfo failed: %{public}d", status); + AniZLibCommon::ThrowZLibNapiError(env, EFAULT); + return 0; + } + CHECK_PARAM_NULL_THROW_RETURN(buf, EINVAL, nullptr); + + char* ret = gzgets(nativeGZFile, reinterpret_cast(buf), static_cast(bufLen)); + CHECK_PARAM_NULL_THROW_RETURN(ret, ENOSTR, nullptr); + + ani_string aniStr = nullptr; + RETURN_NULL_IF_FALSE(CommonFunAni::StringToAniStr(env, ret, aniStr)); + + return aniStr; +} + +} // namespace AniZLibGZip +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/ani/zlib/gzip/ani_gzip.h b/interfaces/kits/ani/zlib/gzip/ani_gzip.h new file mode 100644 index 0000000000000000000000000000000000000000..e12a2ea49ac3d26b214634e07c09602304be8a4e --- /dev/null +++ b/interfaces/kits/ani/zlib/gzip/ani_gzip.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_GZIP_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_GZIP_H + +#include "business_error_ani.h" +#include "common_fun_ani.h" +#include "common_func.h" +#include "zlib.h" + +namespace OHOS { +namespace AppExecFwk { +namespace AniZLibGZip { +void gzdopenNative(ani_env* env, ani_object instance, ani_int aniFd, ani_string aniMode); +ani_int gzbufferNative(ani_env* env, ani_object instance, ani_long aniSize); +void gzopenNative(ani_env* env, ani_object instance, ani_string aniPath, ani_string aniMode); +ani_int gzeofNative(ani_env* env, ani_object instance); +ani_int gzdirectNative(ani_env* env, ani_object instance); +ani_enum_item gzcloseNative(ani_env* env, ani_object instance); +void gzclearerrNative(ani_env* env, ani_object instance); +ani_object gzerrorNative(ani_env* env, ani_object instance); +ani_int gzgetcNative(ani_env* env, ani_object instance); +ani_enum_item gzflushNative(ani_env* env, ani_object instance, ani_enum_item aniFlush); +ani_long gzfwriteNative( + ani_env* env, ani_object instance, ani_arraybuffer aniBuf, ani_long aniSize, ani_long aniNItems); +ani_long gzfreadNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf, ani_long aniSize, ani_long aniNItems); +ani_enum_item gzclosewNative(ani_env* env, ani_object instance); +ani_enum_item gzcloserNative(ani_env* env, ani_object instance); +ani_long gzwriteNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf, ani_long aniLen); +ani_int gzungetcNative(ani_env* env, ani_object instance, ani_int aniC); +ani_long gztellNative(ani_env* env, ani_object instance); +ani_enum_item gzsetparamsNative(ani_env* env, ani_object instance, ani_enum_item aniLevel, ani_enum_item aniStrategy); +ani_long gzseekNative(ani_env* env, ani_object instance, ani_long aniOffset, ani_enum_item aniWhence); +ani_enum_item gzrewindNative(ani_env* env, ani_object instance); +ani_long gzreadNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf); +ani_int gzputsNative(ani_env* env, ani_object instance, ani_string aniStr); +ani_int gzputcNative(ani_env* env, ani_object instance, ani_int aniC); +ani_int gzprintfNative(ani_env* env, ani_object instance, ani_string aniFormat, ani_object args); +ani_long gzoffsetNative(ani_env* env, ani_object instance); +ani_string gzgetsNative(ani_env* env, ani_object instance, ani_arraybuffer aniBuf); +} // namespace AniZLibGZip +} // namespace AppExecFwk +} // namespace OHOS +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_GZIP_H \ No newline at end of file diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index ddfcab97ecf46cdce887dd6cf22ef2e192408705..f922fc2a0208b0c648f13f8e5eb5ea6e68ef8977 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -23,6 +23,7 @@ group("napi_packages") { if (support_jsapi) { deps += [ "app_control:appcontrol", + "bundle_manager:bundle_manager_common", "bundle_manager:bundlemanager", "bundle_monitor:bundlemonitor", "bundle_resource:bundle_res_common", diff --git a/interfaces/kits/js/app_control/js_app_control.cpp b/interfaces/kits/js/app_control/js_app_control.cpp index e70efb36ad62c9a077e4ec742af0019f7fbbb8a9..3a1cfc3a5957d7a77124e36553fbc7cfc3bde395 100644 --- a/interfaces/kits/js/app_control/js_app_control.cpp +++ b/interfaces/kits/js/app_control/js_app_control.cpp @@ -33,44 +33,10 @@ namespace OHOS { namespace AppExecFwk { using namespace OHOS::AAFwk; -namespace { -const char* TYPE_WANT = "want"; -const char* PERMISSION_DISPOSED_STATUS = "ohos.permission.MANAGE_DISPOSED_APP_STATUS"; -const char* SET_DISPOSED_STATUS = "SetDisposedStatus"; -const char* GET_DISPOSED_STATUS = "GetDisposedStatus"; -const char* DELETE_DISPOSED_STATUS = "DeleteDisposedStatus"; -const char* SET_DISPOSED_STATUS_SYNC = "SetDisposedStatusSync"; -const char* DELETE_DISPOSED_STATUS_SYNC = "DeleteDisposedStatusSync"; -const char* GET_DISPOSED_STATUS_SYNC = "GetDisposedStatusSync"; -const char* APP_ID = "appId"; -const char* APP_IDENTIFIER = "appIdentifier"; -const char* DISPOSED_WANT = "disposedWant"; -const char* DISPOSED_RULE = "disposedRule"; -const char* DISPOSED_RULE_TYPE = "DisposedRule"; -const char* UNINSTALL_DISPOSED_RULE = "uninstallDisposedRule"; -const char* UNINSTALL_DISPOSED_RULE_TYPE = "UninstallDisposedRule"; -const char* SET_UNINSTALL_DISPOSED_RULE = "SetUninstallDisposedRule"; -const char* DELETE_UNINSTALL_DISPOSED_RULE = "DeleteUninstallDisposedRule"; -const char* GET_UNINSTALL_DISPOSED_RULE = "GetUninstallDisposedRule"; -} -static OHOS::sptr GetAppControlProxy() -{ - auto bundleMgr = CommonFunc::GetBundleMgr(); - if (bundleMgr == nullptr) { - APP_LOGE("CommonFunc::GetBundleMgr failed"); - return nullptr; - } - auto appControlProxy = bundleMgr->GetAppControlProxy(); - if (appControlProxy == nullptr) { - APP_LOGE("GetAppControlProxy failed"); - return nullptr; - } - return appControlProxy; -} static ErrCode InnerGetDisposedStatus(napi_env, const std::string& appId, Want& disposedWant) { - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); return ERROR_SYSTEM_ABILITY_NOT_FOUND; @@ -81,7 +47,7 @@ static ErrCode InnerGetDisposedStatus(napi_env, const std::string& appId, Want& static ErrCode InnerSetDisposedStatus(napi_env, const std::string& appId, Want& disposedWant) { - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); return ERROR_SYSTEM_ABILITY_NOT_FOUND; @@ -92,7 +58,7 @@ static ErrCode InnerSetDisposedStatus(napi_env, const std::string& appId, Want& static ErrCode InnerDeleteDisposedStatus(napi_env, const std::string& appId) { - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); return ERROR_SYSTEM_ABILITY_NOT_FOUND; @@ -212,7 +178,7 @@ napi_value SetDisposedStatusSync(napi_env env, napi_callback_info info) BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_WANT, TYPE_WANT); return nRet; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, @@ -319,7 +285,7 @@ static napi_value InnerDeleteDisposedStatusSync(napi_env env, std::string &appId napi_throw(env, businessError); return nullptr; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, @@ -477,7 +443,7 @@ napi_value GetDisposedStatusSync(napi_env env, napi_callback_info info) napi_throw(env, businessError); return nullptr; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, @@ -630,21 +596,26 @@ bool ParseDisposedRuleConfiguration(napi_env env, napi_value nDisposedRuleConfig std::string appId; if (!CommonFunc::ParseString(env, prop, appId)) { APP_LOGE("appId invalid"); + BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, APP_ID, TYPE_STRING); return false; } if (appId.empty()) { napi_value businessError = BusinessError::CreateCommonError( - env, ERROR_INVALID_APPID, SET_DISPOSED_STATUS_SYNC); + env, ERROR_INVALID_APPID, SET_DISPOSED_RULES); napi_throw(env, businessError); return false; } disposedRuleConfiguration.appId = appId; napi_get_named_property(env, nDisposedRuleConfiguration, "appIndex", &prop); int32_t appIndex = Constants::MAIN_APP_INDEX; - if (!CommonFunc::ParseInt(env, prop, appIndex)|| - appIndex < Constants::MAIN_APP_INDEX || appIndex > Constants::CLONE_APP_INDEX_MAX) { + if (!CommonFunc::ParseInt(env, prop, appIndex)) { + APP_LOGE("appIndex invalid"); + BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, APP_INDEX, TYPE_NUMBER); + return false; + } + if (appIndex < Constants::MAIN_APP_INDEX || appIndex > Constants::CLONE_APP_INDEX_MAX) { napi_value businessError = BusinessError::CreateCommonError( - env, ERROR_INVALID_APPINDEX, SET_DISPOSED_STATUS_SYNC); + env, ERROR_INVALID_APPINDEX, SET_DISPOSED_RULES); napi_throw(env, businessError); return false; } @@ -654,6 +625,7 @@ bool ParseDisposedRuleConfiguration(napi_env env, napi_value nDisposedRuleConfig DisposedRule disposedRule; if (!ParseDiposedRule(env, prop, disposedRule)) { APP_LOGE("disposedRule invalid!"); + BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_RULE, DISPOSED_RULE_TYPE); return false; } disposedRuleConfiguration.disposedRule = disposedRule; @@ -672,6 +644,11 @@ bool ParseDisposedRuleConfigurationArray(napi_env env, napi_value nDisposedRuleC uint32_t arrayLength = 0; NAPI_CALL_BASE(env, napi_get_array_length(env, nDisposedRuleConfigurations, &arrayLength), false); APP_LOGD("length=%{public}ud", arrayLength); + if (arrayLength == 0 || arrayLength > MAX_VECTOR_NUM) { + APP_LOGE("disposedRuleConfigurations length invalid!"); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_LENGTH_ERROR); + return false; + } for (uint32_t j = 0; j < arrayLength; j++) { napi_value value = nullptr; NAPI_CALL_BASE(env, napi_get_element(env, nDisposedRuleConfigurations, j, &value), false); @@ -700,7 +677,7 @@ static napi_value InnerGetDisposedRule(napi_env env, std::string &appId, int32_t napi_throw(env, businessError); return nullptr; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, @@ -763,11 +740,11 @@ static napi_value InnerSetDisposedRule(napi_env env, std::string &appId, Dispose { napi_value nRet; napi_get_undefined(env, &nRet); - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null."); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, - SET_DISPOSED_STATUS_SYNC); + SET_DISPOSED_RULE); napi_throw(env, error); return nRet; } @@ -779,9 +756,9 @@ static napi_value InnerSetDisposedRule(napi_env env, std::string &appId, Dispose } ret = CommonFunc::ConvertErrCode(ret); if (ret != NO_ERROR) { - APP_LOGE("SetDisposedStatusSync err = %{public}d", ret); + APP_LOGE("SetDisposedRule err = %{public}d", ret); napi_value businessError = BusinessError::CreateCommonError( - env, ret, SET_DISPOSED_STATUS_SYNC, PERMISSION_DISPOSED_STATUS); + env, ret, SET_DISPOSED_RULE, PERMISSION_DISPOSED_STATUS); napi_throw(env, businessError); return nullptr; } @@ -806,7 +783,7 @@ napi_value SetDisposedRule(napi_env env, napi_callback_info info) } if (appId.empty()) { napi_value businessError = BusinessError::CreateCommonError( - env, ERROR_INVALID_APPID, SET_DISPOSED_STATUS_SYNC); + env, ERROR_INVALID_APPID, SET_DISPOSED_RULE); napi_throw(env, businessError); return nullptr; } @@ -844,14 +821,14 @@ napi_value SetDisposedRules(napi_env env, napi_callback_info info) std::vector disposedRuleConfigurations; if (!ParseDisposedRuleConfigurationArray(env, args[ARGS_POS_ZERO], disposedRuleConfigurations)) { APP_LOGE("disposedRuleConfigurations invalid!"); - BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, DISPOSED_RULE, DISPOSED_RULE_TYPE); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_TYPE_CHECK_ERROR); return nRet; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("AppControlProxy is null"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, - GET_DISPOSED_STATUS_SYNC); + SET_DISPOSED_RULES); napi_throw(env, error); return nullptr; } @@ -861,7 +838,7 @@ napi_value SetDisposedRules(napi_env env, napi_callback_info info) if (ret != ERR_OK) { APP_LOGE("SetDisposedRules failed"); napi_value businessError = BusinessError::CreateCommonError( - env, ret, GET_DISPOSED_STATUS_SYNC, PERMISSION_DISPOSED_STATUS); + env, ret, SET_DISPOSED_RULES, PERMISSION_DISPOSED_STATUS); napi_throw(env, businessError); return nullptr; } @@ -931,7 +908,7 @@ static napi_value InnerGetUninstallDisposedRule(napi_env env, std::string &appId napi_throw(env, businessError); return nullptr; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("null appControlProxy"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, @@ -992,7 +969,7 @@ static napi_value InnerSetUninstallDisposedRule(napi_env env, std::string &appId { napi_value nRet; napi_get_undefined(env, &nRet); - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("null appControlProxy"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, @@ -1070,7 +1047,7 @@ static napi_value InnerDeleteUninstallDisposedRule(napi_env env, std::string &ap napi_throw(env, businessError); return nullptr; } - auto appControlProxy = GetAppControlProxy(); + auto appControlProxy = CommonFunc::GetAppControlProxy(); if (appControlProxy == nullptr) { APP_LOGE("null appControlProxy"); napi_value error = BusinessError::CreateCommonError(env, ERROR_SYSTEM_ABILITY_NOT_FOUND, diff --git a/interfaces/kits/js/bundle_manager/BUILD.gn b/interfaces/kits/js/bundle_manager/BUILD.gn index 7ab246e4d2bc46debd765b6ad43657a633575062..a719a32bd3141503b63d58ad6b8ed1af71e2db91 100644 --- a/interfaces/kits/js/bundle_manager/BUILD.gn +++ b/interfaces/kits/js/bundle_manager/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,6 +14,60 @@ import("//build/ohos.gni") import("../../../../appexecfwk.gni") +ohos_shared_library("bundle_manager_common") { + branch_protector_ret = "pac_ret" + + sanitize = { + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + integer_overflow = true + ubsan = true + } + + include_dirs = [ "${kits_path}/js/common" ] + sources = [ + "bundle_manager_helper.cpp", + "clean_cache_callback.cpp", + ] + + cflags = [ + "-Os", + "-fstack-protector-strong", + ] + + cflags_cc = [ + "-Os", + "-fstack-protector-strong", + ] + + deps = [ + "${base_path}:appexecfwk_base", + "${common_path}:libappexecfwk_common", + "${core_path}:appexecfwk_core", + "../common:bundle_napi_common", + ] + + defines = [ + "APP_LOG_TAG = \"BMS\"", + "LOG_DOMAIN = 0xD001120", + ] + + external_deps = [ + "ability_base:want", + "ability_runtime:napi_common", + "ability_runtime:runtime", + "c_utils:utils", + "hilog:libhilog", + "ipc:ipc_single", + "napi:ace_napi", + ] + + subsystem_name = "bundlemanager" + part_name = "bundle_framework" +} + ohos_shared_library("bundlemanager") { branch_protector_ret = "pac_ret" @@ -34,11 +88,11 @@ ohos_shared_library("bundlemanager") { sources = [ "bundle_manager.cpp", "bundle_manager_sync.cpp", - "clean_cache_callback.cpp", "native_module.cpp", ] deps = [ + ":bundle_manager_common", "${base_path}:appexecfwk_base", "${common_path}:libappexecfwk_common", "${core_path}:appexecfwk_core", diff --git a/interfaces/kits/js/bundle_manager/bundle_manager.cpp b/interfaces/kits/js/bundle_manager/bundle_manager.cpp index 777d09e9747d27e2f790c0113f1c19c1685c0d21..a0e59c097e0dd8e40b92f077a4a73403680f4332 100644 --- a/interfaces/kits/js/bundle_manager/bundle_manager.cpp +++ b/interfaces/kits/js/bundle_manager/bundle_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,6 +20,7 @@ #include "app_log_wrapper.h" #include "app_log_tag_wrapper.h" #include "bundle_errors.h" +#include "bundle_manager_helper.h" #include "bundle_manager_sync.h" #include "bundle_mgr_client.h" #include "bundle_mgr_interface.h" @@ -41,84 +42,15 @@ namespace OHOS { namespace AppExecFwk { namespace { -constexpr const char* ABILITY_INFO = "abilityInfo"; constexpr const char* IS_ENABLE = "isEnable"; -constexpr const char* ABILITY_FLAGS = "abilityFlags"; -constexpr const char* PROFILE_TYPE = "profileType"; constexpr const char* STRING_TYPE = "napi_string"; -constexpr const char* GET_LAUNCH_WANT_FOR_BUNDLE = "GetLaunchWantForBundle"; -constexpr const char* VERIFY_ABC = "VerifyAbc"; -constexpr const char* DELETE_ABC = "DeleteAbc"; -constexpr const char* ERR_MSG_LAUNCH_WANT_INVALID = "The launch want is not found."; -constexpr const char* ADDITIONAL_INFO = "additionalInfo"; -constexpr const char* LINK = "link"; -constexpr const char* DEVELOPER_ID = "developerId"; -constexpr const char* APP_DISTRIBUTION_TYPE = "appDistributionType"; -constexpr const char* APP_DISTRIBUTION_TYPE_ENUM = "AppDistributionType"; constexpr const char* ICON_ID = "iconId"; constexpr const char* LABEL_ID = "labelId"; constexpr const char* STATE = "state"; -constexpr const char* SOURCE_PATHS = "sourcePaths"; -constexpr const char* DESTINATION_PATH = "destinationPath"; -constexpr const char* HOST_BUNDLE_NAME = "hostBundleName"; -constexpr const char* URI = "uri"; -const std::string GET_BUNDLE_ARCHIVE_INFO = "GetBundleArchiveInfo"; -const std::string GET_BUNDLE_NAME_BY_UID = "GetBundleNameByUid"; -const std::string GET_APP_CLONE_IDENTITY = "getAppCloneIdentity"; -const std::string GET_ALL_BUNDLE_CACHE_SIZE = "getAllBundleCacheSize"; -const std::string CLEAN_ALL_BUNDLE_CACHE = "cleanAllBundleCache"; -const std::string QUERY_ABILITY_INFOS = "QueryAbilityInfos"; -const std::string BATCH_QUERY_ABILITY_INFOS = "BatchQueryAbilityInfos"; -const std::string QUERY_ABILITY_INFOS_SYNC = "QueryAbilityInfosSync"; -const std::string QUERY_EXTENSION_INFOS = "QueryExtensionInfos"; -const std::string GET_BUNDLE_INFOS = "GetBundleInfos"; -const std::string GET_APPLICATION_INFOS = "GetApplicationInfos"; -const std::string GET_PERMISSION_DEF = "GetPermissionDef"; -const std::string PERMISSION_NAME = "permissionName"; -const std::string APP_CLONE_IDENTITY_PERMISSIONS = "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"; const std::string PARAM_TYPE_CHECK_ERROR_WITH_POS = "param type check error, error position : "; -const std::string GET_ALL_SHARED_BUNDLE_INFO = "GetAllSharedBundleInfo"; -const std::string GET_SHARED_BUNDLE_INFO = "GetSharedBundleInfo"; -const std::string GET_EXT_RESOURCE = "GetExtResource"; -const std::string ENABLE_DYNAMIC_ICON = "EnableDynamicIcon"; -const std::string DISABLE_DYNAMIC_ICON = "DisableDynamicIcon"; -const std::string GET_DYNAMIC_ICON = "GetDynamicIcon"; -const std::string GET_ALL_DYNAMIC_ICON = "GetAllDynamicIconInfo"; -const std::string GET_DYNAMIC_ICON_INFO = "GetDynamicIconInfo"; -const std::string INVALID_WANT_ERROR = - "implicit query condition, at least one query param(action, entities, uri, type, or linkFeature) non-empty."; -const std::string GET_APP_PROVISION_INFO = "GetAppProvisionInfo"; -const std::string RESOURCE_NAME_OF_GET_SPECIFIED_DISTRIBUTION_TYPE = "GetSpecifiedDistributionType"; -const std::string RESOURCE_NAME_OF_GET_ADDITIONAL_INFO = "GetAdditionalInfo"; -const std::string GET_JSON_PROFILE = "GetJsonProfile"; -const std::string GET_RECOVERABLE_APPLICATION_INFO = "GetRecoverableApplicationInfo"; -const std::string RESOURCE_NAME_OF_SET_ADDITIONAL_INFO = "SetAdditionalInfo"; -const std::string CAN_OPEN_LINK = "CanOpenLink"; -const std::string GET_ALL_PREINSTALLED_APP_INFOS = "GetAllPreinstalledApplicationInfos"; -const std::string GET_ALL_BUNDLE_INFO_BY_DEVELOPER_ID = "GetAllBundleInfoByDeveloperId"; -const std::string GET_DEVELOPER_IDS = "GetDeveloperIds"; -const std::string SWITCH_UNINSTALL_STATE = "SwitchUninstallState"; -const std::string GET_APP_CLONE_BUNDLE_INFO = "GetAppCloneBundleInfo"; -const std::string GET_ALL_APP_CLONE_BUNDLE_INFO = "GetAllAppCloneBundleInfo"; -const std::string GET_ALL_PLUGIN_INFO = "GetAllPluginInfo"; -const std::string MIGRATE_DATA = "MigrateData"; -const std::string CLONE_BUNDLE_PREFIX = "clone_"; -const std::string GET_ABILITY_INFOS = "GetAbilityInfos"; -const std::string GET_ABILITYINFO_PERMISSIONS = "ohos.permission.GET_ABILITY_INFO"; -constexpr int32_t ENUM_ONE = 1; -constexpr int32_t ENUM_TWO = 2; -constexpr int32_t ENUM_THREE = 3; -constexpr int32_t ENUM_FOUR = 4; -constexpr int32_t ENUM_FIVE = 5; -constexpr int32_t ENUM_SIX = 6; -constexpr int32_t ENUM_SEVEN = 7; constexpr const char* UNSPECIFIED = "UNSPECIFIED"; constexpr const char* MULTI_INSTANCE = "MULTI_INSTANCE"; constexpr const char* APP_CLONE = "APP_CLONE"; -constexpr const char* BUNDLE_GET_ALL_DYNAMIC_PERMISSIONS = - "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS"; -constexpr const char* BUNDLE_ENABLE_AND_DISABLE_ALL_DYNAMIC_PERMISSIONS = - "ohos.permission.ACCESS_DYNAMIC_ICON and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS"; } // namespace using namespace OHOS::AAFwk; static std::shared_ptr g_clearCacheListener; @@ -200,18 +132,6 @@ void RegisterClearCacheListener() (void)EventFwk::CommonEventManager::SubscribeCommonEvent(g_clearCacheListener); } -static ErrCode InnerGetBundleArchiveInfo(std::string &hapFilePath, int32_t flags, BundleInfo &bundleInfo) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetBundleArchiveInfoV9(hapFilePath, flags, bundleInfo); - APP_LOGD("GetBundleArchiveInfoV9 ErrCode : %{public}d", ret); - return CommonFunc::ConvertErrCode(ret); -} - void GetBundleArchiveInfoExec(napi_env env, void *data) { GetBundleArchiveInfoCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -219,7 +139,7 @@ void GetBundleArchiveInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetBundleArchiveInfo( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetBundleArchiveInfo( asyncCallbackInfo->hapFilePath, asyncCallbackInfo->flags, asyncCallbackInfo->bundleInfo); } @@ -289,18 +209,6 @@ napi_value GetBundleArchiveInfo(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetAppCloneIdentity(int32_t uid, std::string &bundleName, int32_t &appIndex) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetNameAndIndexForUid(uid, bundleName, appIndex); - APP_LOGD("GetNameAndIndexForUid ErrCode : %{public}d", ret); - return CommonFunc::ConvertErrCode(ret); -} - static ErrCode InnerGetApplicationInfo(const std::string &bundleName, int32_t flags, int32_t userId, ApplicationInfo &appInfo) { @@ -343,29 +251,6 @@ static void ProcessApplicationInfos( } } -void GetBundleNameAndIndexByName( - const std::string &keyName, std::string &bundleName, int32_t &appIndex) -{ - bundleName = keyName; - appIndex = 0; - // for clone bundle name - auto pos = keyName.find(CLONE_BUNDLE_PREFIX); - if ((pos == std::string::npos) || (pos == 0)) { - return; - } - std::string index = keyName.substr(0, pos); - if (!OHOS::StrToInt(index, appIndex)) { - appIndex = 0; - return; - } - bundleName = keyName.substr(pos + CLONE_BUNDLE_PREFIX.size()); -} - -std::string GetCloneBundleIdKey(const std::string &bundleName, const int32_t appIndex) -{ - return std::to_string(appIndex) + CLONE_BUNDLE_PREFIX + bundleName; -} - void GetBundleNameByUidExec(napi_env env, void *data) { GetBundleNameByUidCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -379,22 +264,21 @@ void GetBundleNameByUidExec(napi_env env, void *data) if (!g_ownBundleName.empty()) { APP_LOGD("query own bundleName, has cache, no need to query from host"); int32_t appIndex = 0; - GetBundleNameAndIndexByName(g_ownBundleName, asyncCallbackInfo->bundleName, appIndex); + CommonFunc::GetBundleNameAndIndexByName(g_ownBundleName, asyncCallbackInfo->bundleName, appIndex); asyncCallbackInfo->err = NO_ERROR; return; } } int32_t appIndex = 0; - asyncCallbackInfo->err = - InnerGetAppCloneIdentity(asyncCallbackInfo->uid, asyncCallbackInfo->bundleName, appIndex); + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAppCloneIdentity( + asyncCallbackInfo->uid, asyncCallbackInfo->bundleName, appIndex); + std::lock_guard lock(g_ownBundleNameMutex); if ((asyncCallbackInfo->err == NO_ERROR) && queryOwn && g_ownBundleName.empty()) { - std::string bundleNameCached = asyncCallbackInfo->bundleName; + g_ownBundleName = asyncCallbackInfo->bundleName; if (appIndex > 0) { - bundleNameCached = GetCloneBundleIdKey(asyncCallbackInfo->bundleName, appIndex); + g_ownBundleName = CommonFunc::GetCloneBundleIdKey(asyncCallbackInfo->bundleName, appIndex); } - APP_LOGD("put own bundleName = %{public}s to cache", bundleNameCached.c_str()); - std::lock_guard lock(g_ownBundleNameMutex); - g_ownBundleName = bundleNameCached; + APP_LOGD("put own bundleName = %{public}s to cache", g_ownBundleName.c_str()); } } @@ -430,21 +314,22 @@ void GetAppCloneIdentityExec(napi_env env, void *data) std::lock_guard lock(g_ownBundleNameMutex); if (!g_ownBundleName.empty()) { APP_LOGD("query own bundleName and appIndex, has cache, no need to query from host"); - GetBundleNameAndIndexByName(g_ownBundleName, asyncCallbackInfo->bundleName, asyncCallbackInfo->appIndex); + CommonFunc::GetBundleNameAndIndexByName( + g_ownBundleName, asyncCallbackInfo->bundleName, asyncCallbackInfo->appIndex); asyncCallbackInfo->err = NO_ERROR; return; } } - asyncCallbackInfo->err = InnerGetAppCloneIdentity( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAppCloneIdentity( asyncCallbackInfo->uid, asyncCallbackInfo->bundleName, asyncCallbackInfo->appIndex); + std::lock_guard lock(g_ownBundleNameMutex); if ((asyncCallbackInfo->err == NO_ERROR) && queryOwn && g_ownBundleName.empty()) { - std::string bundleNameCached = asyncCallbackInfo->bundleName; + g_ownBundleName = asyncCallbackInfo->bundleName; if (asyncCallbackInfo->appIndex > 0) { - bundleNameCached = GetCloneBundleIdKey(asyncCallbackInfo->bundleName, asyncCallbackInfo->appIndex); + g_ownBundleName = CommonFunc::GetCloneBundleIdKey( + asyncCallbackInfo->bundleName, asyncCallbackInfo->appIndex); } - APP_LOGD("put own bundleName = %{public}s to cache", bundleNameCached.c_str()); - std::lock_guard lock(g_ownBundleNameMutex); - g_ownBundleName = bundleNameCached; + APP_LOGD("put own bundleName = %{public}s to cache", g_ownBundleName.c_str()); } } @@ -912,35 +797,6 @@ static ErrCode InnerQueryAbilityInfos(const Want &want, return CommonFunc::ConvertErrCode(ret); } -static ErrCode InnerBatchQueryAbilityInfos(const std::vector &wants, - int32_t flags, int32_t userId, std::vector &abilityInfos) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->BatchQueryAbilityInfos(wants, flags, userId, abilityInfos); - APP_LOGD("BatchQueryAbilityInfos ErrCode : %{public}d", ret); - return CommonFunc::ConvertErrCode(ret); -} - -static ErrCode InnerSetApplicationEnabled(const std::string &bundleName, bool &isEnable, int32_t appIndex) -{ - auto bundleMgr = CommonFunc::GetBundleMgr(); - if (bundleMgr == nullptr) { - APP_LOGE("CommonFunc::GetBundleMgr failed"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = ERR_OK; - if (appIndex == 0) { - ret = bundleMgr->SetApplicationEnabled(bundleName, isEnable); - } else { - ret = bundleMgr->SetCloneApplicationEnabled(bundleName, appIndex, isEnable); - } - return CommonFunc::ConvertErrCode(ret); -} - static ErrCode InnerIsApplicationEnabled(const std::string &bundleName, bool &isEnable, int32_t appIndex) { auto bundleMgr = CommonFunc::GetBundleMgr(); @@ -957,38 +813,6 @@ static ErrCode InnerIsApplicationEnabled(const std::string &bundleName, bool &is return CommonFunc::ConvertErrCode(ret); } -static ErrCode InnerSetAbilityEnabled(const AbilityInfo &abilityInfo, bool &isEnable, int32_t appIndex) -{ - auto bundleMgr = CommonFunc::GetBundleMgr(); - if (bundleMgr == nullptr) { - APP_LOGE("CommonFunc::GetBundleMgr failed"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = ERR_OK; - if (appIndex != 0) { - ret = bundleMgr->SetCloneAbilityEnabled(abilityInfo, appIndex, isEnable); - } else { - ret = bundleMgr->SetAbilityEnabled(abilityInfo, isEnable); - } - return CommonFunc::ConvertErrCode(ret); -} - -static ErrCode InnerIsAbilityEnabled(const AbilityInfo &abilityInfo, bool &isEnable, int32_t appIndex) -{ - auto bundleMgr = CommonFunc::GetBundleMgr(); - if (bundleMgr == nullptr) { - APP_LOGE("CommonFunc::GetBundleMgr failed"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = ERR_OK; - if (appIndex != 0) { - ret = bundleMgr->IsCloneAbilityEnabled(abilityInfo, appIndex, isEnable); - } else { - ret = bundleMgr->IsAbilityEnabled(abilityInfo, isEnable); - } - return CommonFunc::ConvertErrCode(ret); -} - static ErrCode InnerGetAbilityLabel(const std::string &bundleName, const std::string &moduleName, const std::string &abilityName, std::string &abilityLabel) { @@ -1230,18 +1054,6 @@ napi_value QueryAbilityInfos(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetAllPluginInfo(std::string &hostBundleName, int32_t userId, - std::vector &pluginBundleInfos) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetAllPluginInfo(hostBundleName, userId, pluginBundleInfos); - return CommonFunc::ConvertErrCode(ret); -} - void GetAllPluginInfoExec(napi_env env, void *data) { PluginCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1249,7 +1061,7 @@ void GetAllPluginInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetAllPluginInfo(asyncCallbackInfo->hostBundleName, + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAllPluginInfo(asyncCallbackInfo->hostBundleName, asyncCallbackInfo->userId, asyncCallbackInfo->pluginBundleInfos); } @@ -1356,7 +1168,8 @@ void BatchQueryAbilityInfosExec(napi_env env, void *data) return; } } - asyncCallbackInfo->err = InnerBatchQueryAbilityInfos(asyncCallbackInfo->wants, asyncCallbackInfo->flags, + asyncCallbackInfo->err = BundleManagerHelper::InnerBatchQueryAbilityInfos( + asyncCallbackInfo->wants, asyncCallbackInfo->flags, asyncCallbackInfo->userId, asyncCallbackInfo->abilityInfos); } @@ -1939,7 +1752,7 @@ void SetApplicationEnabledExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is nullptr"); return; } - asyncCallbackInfo->err = InnerSetApplicationEnabled(asyncCallbackInfo->bundleName, + asyncCallbackInfo->err = BundleManagerHelper::InnerSetApplicationEnabled(asyncCallbackInfo->bundleName, asyncCallbackInfo->isEnable, asyncCallbackInfo->appIndex); } @@ -2078,7 +1891,7 @@ void SetAbilityEnabledExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is nullptr"); return; } - asyncCallbackInfo->err = InnerSetAbilityEnabled(asyncCallbackInfo->abilityInfo, + asyncCallbackInfo->err = BundleManagerHelper::InnerSetAbilityEnabled(asyncCallbackInfo->abilityInfo, asyncCallbackInfo->isEnable, asyncCallbackInfo->appIndex); } @@ -2206,8 +2019,12 @@ void IsApplicationEnabledComplete(napi_env env, napi_status status, void *data) NAPI_CALL_RETURN_VOID(env, napi_get_null(env, &result[0])); NAPI_CALL_RETURN_VOID(env, napi_get_boolean(env, asyncCallbackInfo->isEnable, &result[ARGS_POS_ONE])); } else { - APP_LOGE("asyncCallbackInfo is null"); - result[0] = BusinessError::CreateCommonError(env, asyncCallbackInfo->err, "", ""); + if (asyncCallbackInfo->bundleName.empty()) { + APP_LOGW("bundleName is empty"); + result[0] = BusinessError::CreateError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + } else { + result[0] = BusinessError::CreateCommonError(env, asyncCallbackInfo->err, "", ""); + } } CommonFunc::NapiReturnDeferred(env, asyncCallbackInfo, result, ARGS_SIZE_TWO); } @@ -2274,7 +2091,7 @@ void IsAbilityEnabledExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is nullptr"); return; } - asyncCallbackInfo->err = InnerIsAbilityEnabled(asyncCallbackInfo->abilityInfo, + asyncCallbackInfo->err = BundleManagerHelper::InnerIsAbilityEnabled(asyncCallbackInfo->abilityInfo, asyncCallbackInfo->isEnable, asyncCallbackInfo->appIndex); } @@ -2356,27 +2173,6 @@ napi_value IsAbilityEnabled(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerCleanBundleCacheCallback( - const std::string &bundleName, int32_t appIndex, const OHOS::sptr cleanCacheCallback) -{ - if (cleanCacheCallback == nullptr) { - APP_LOGE("callback nullptr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; - ErrCode result = iBundleMgr->CleanBundleCacheFiles(bundleName, cleanCacheCallback, userId, appIndex); - if (result != ERR_OK) { - APP_LOGE("call error, bundleName is %{public}s, userId is %{public}d, appIndex is %{public}d", - bundleName.c_str(), userId, appIndex); - } - return CommonFunc::ConvertErrCode(result); -} - void CleanBundleCacheFilesExec(napi_env env, void *data) { CleanBundleCacheCallbackInfo* asyncCallbackInfo = reinterpret_cast(data); @@ -2387,7 +2183,7 @@ void CleanBundleCacheFilesExec(napi_env env, void *data) if (asyncCallbackInfo->cleanCacheCallback == nullptr) { asyncCallbackInfo->cleanCacheCallback = new (std::nothrow) CleanCacheCallback(); } - asyncCallbackInfo->err = InnerCleanBundleCacheCallback( + asyncCallbackInfo->err = BundleManagerHelper::InnerCleanBundleCacheCallback( asyncCallbackInfo->bundleName, asyncCallbackInfo->appIndex, asyncCallbackInfo->cleanCacheCallback); if ((asyncCallbackInfo->err == NO_ERROR) && (asyncCallbackInfo->cleanCacheCallback != nullptr)) { // wait for OnCleanCacheFinished @@ -2413,7 +2209,7 @@ void CleanBundleCacheFilesComplete(napi_env env, napi_status status, void *data) NAPI_CALL_RETURN_VOID(env, napi_get_null(env, &result[0])); } else { result[0] = BusinessError::CreateCommonError(env, asyncCallbackInfo->err, - "CleanBundleCacheFiles", Constants::PERMISSION_REMOVECACHEFILE); + CLEAN_BUNDLE_CACHE_FILES, Constants::PERMISSION_REMOVECACHEFILE); } CommonFunc::NapiReturnDeferred(env, asyncCallbackInfo, result, ARGS_SIZE_ONE); } @@ -2479,21 +2275,6 @@ napi_value CleanBundleCacheFiles(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerVerify(const std::vector &abcPaths, bool flag) -{ - auto verifyManager = CommonFunc::GetVerifyManager(); - if (verifyManager == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - - ErrCode ret = verifyManager->Verify(abcPaths); - if (ret == ERR_OK && flag) { - verifyManager->RemoveFiles(abcPaths); - } - return CommonFunc::ConvertErrCode(ret); -} - void VerifyExec(napi_env env, void *data) { VerifyCallbackInfo* asyncCallbackInfo = reinterpret_cast(data); @@ -2502,7 +2283,7 @@ void VerifyExec(napi_env env, void *data) return; } - asyncCallbackInfo->err = InnerVerify(asyncCallbackInfo->abcPaths, asyncCallbackInfo->flag); + asyncCallbackInfo->err = BundleManagerHelper::InnerVerify(asyncCallbackInfo->abcPaths, asyncCallbackInfo->flag); } void VerifyComplete(napi_env env, napi_status status, void *data) @@ -2571,23 +2352,6 @@ napi_value VerifyAbc(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerGetExtResource( - const std::string &bundleName, std::vector &moduleNames) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - - ErrCode ret = extResourceManager->GetExtResource(bundleName, moduleNames); - if (ret != ERR_OK) { - APP_LOGE("GetExtResource failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void GetExtResourceExec(napi_env env, void *data) { DynamicIconCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -2595,7 +2359,7 @@ void GetExtResourceExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetExtResource( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetExtResource( asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleNames); } @@ -2669,27 +2433,6 @@ napi_value GetExtResource(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerEnableDynamicIcon( - const std::string &bundleName, const std::string &moduleName, const BundleOption &option) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = ERR_OK; - if (option.isDefault) { - ret = extResourceManager->EnableDynamicIcon(bundleName, moduleName); - } else { - ret = extResourceManager->EnableDynamicIcon(bundleName, moduleName, option.userId, option.appIndex); - } - if (ret != ERR_OK) { - APP_LOGE("EnableDynamicIcon failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void EnableDynamicIconExec(napi_env env, void *data) { DynamicIconCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -2697,8 +2440,9 @@ void EnableDynamicIconExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerEnableDynamicIcon( - asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleName, asyncCallbackInfo->option); + asyncCallbackInfo->err = BundleManagerHelper::InnerEnableDynamicIcon( + asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleName, + asyncCallbackInfo->option.appIndex, asyncCallbackInfo->option.userId, asyncCallbackInfo->option.isDefault); } void EnableDynamicIconComplete(napi_env env, napi_status status, void *data) @@ -2768,27 +2512,6 @@ napi_value EnableDynamicIcon(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerDisableDynamicIcon(const std::string &bundleName, const BundleOption &option) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - - ErrCode ret = ERR_OK; - if (option.isDefault) { - ret = extResourceManager->DisableDynamicIcon(bundleName); - } else { - ret = extResourceManager->DisableDynamicIcon(bundleName, option.userId, option.appIndex); - } - if (ret != ERR_OK) { - APP_LOGE("DisableDynamicIcon failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void DisableDynamicIconExec(napi_env env, void *data) { DynamicIconCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -2796,7 +2519,8 @@ void DisableDynamicIconExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerDisableDynamicIcon(asyncCallbackInfo->bundleName, asyncCallbackInfo->option); + asyncCallbackInfo->err = BundleManagerHelper::InnerDisableDynamicIcon(asyncCallbackInfo->bundleName, + asyncCallbackInfo->option.appIndex, asyncCallbackInfo->option.userId, asyncCallbackInfo->option.isDefault); } void DisableDynamicIconComplete(napi_env env, napi_status status, void *data) @@ -2855,21 +2579,6 @@ napi_value DisableDynamicIcon(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerGetDynamicIcon(const std::string &bundleName, std::string &moduleName) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = extResourceManager->GetDynamicIcon(bundleName, moduleName); - if (ret != ERR_OK) { - APP_LOGE_NOFUNC("GetDynamicIcon failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void GetDynamicIconExec(napi_env env, void *data) { DynamicIconCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -2877,7 +2586,7 @@ void GetDynamicIconExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetDynamicIcon( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetDynamicIcon( asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleName); } @@ -2934,22 +2643,6 @@ napi_value GetDynamicIcon(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerDeleteAbc(const std::string &path) -{ - auto verifyManager = CommonFunc::GetVerifyManager(); - if (verifyManager == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - - ErrCode ret = verifyManager->DeleteAbc(path); - if (ret != ERR_OK) { - APP_LOGE("DeleteAbc failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void DeleteAbcExec(napi_env env, void *data) { VerifyCallbackInfo* asyncCallbackInfo = reinterpret_cast(data); @@ -2958,7 +2651,7 @@ void DeleteAbcExec(napi_env env, void *data) return; } - asyncCallbackInfo->err = InnerDeleteAbc(asyncCallbackInfo->deletePath); + asyncCallbackInfo->err = BundleManagerHelper::InnerDeleteAbc(asyncCallbackInfo->deletePath); } void DeleteAbcComplete(napi_env env, napi_status status, void *data) @@ -3122,60 +2815,6 @@ napi_value GetLaunchWantForBundle(napi_env env, napi_callback_info info) return promise; } -ErrCode GetAbilityFromBundleInfo(const BundleInfo& bundleInfo, const std::string& abilityName, - const std::string& moduleName, AbilityInfo& targetAbilityInfo) -{ - bool ifExists = false; - for (const auto& hapModuleInfo : bundleInfo.hapModuleInfos) { - for (const auto& abilityInfo : hapModuleInfo.abilityInfos) { - if (abilityInfo.name == abilityName && abilityInfo.moduleName == moduleName) { - if (!abilityInfo.enabled) { - APP_LOGI("ability disabled"); - return ERR_BUNDLE_MANAGER_ABILITY_DISABLED; - } - ifExists = true; - targetAbilityInfo = abilityInfo; - break; - } - } - if (ifExists) { - break; - } - } - if (!ifExists) { - APP_LOGE("ability not exist"); - return ERR_BUNDLE_MANAGER_ABILITY_NOT_EXIST; - } - return ERR_OK; -} - -ErrCode GetExtensionFromBundleInfo(const BundleInfo& bundleInfo, const std::string& abilityName, - const std::string& moduleName, ExtensionAbilityInfo& targetExtensionInfo) -{ - bool ifExists = false; - for (const auto& hapModuleInfo : bundleInfo.hapModuleInfos) { - for (const auto& extensionInfo : hapModuleInfo.extensionInfos) { - if (extensionInfo.name == abilityName && extensionInfo.moduleName == moduleName) { - ifExists = true; - targetExtensionInfo = extensionInfo; - break; - } - if (!extensionInfo.enabled) { - APP_LOGI("extension disabled"); - return ERR_BUNDLE_MANAGER_ABILITY_DISABLED; - } - } - if (ifExists) { - break; - } - } - if (!ifExists) { - APP_LOGE("ability not exist"); - return ERR_BUNDLE_MANAGER_ABILITY_NOT_EXIST; - } - return ERR_OK; -} - static ErrCode InnerGetProfile(GetProfileCallbackInfo &info) { auto iBundleMgr = CommonFunc::GetBundleMgr(); @@ -3208,7 +2847,7 @@ static ErrCode InnerGetProfile(GetProfileCallbackInfo &info) return result; } AbilityInfo targetAbilityInfo; - result = GetAbilityFromBundleInfo( + result = BundleManagerHelper::GetAbilityFromBundleInfo( bundleInfo, info.abilityName, info.moduleName, targetAbilityInfo); if (result != ERR_OK) { return result; @@ -3230,7 +2869,7 @@ static ErrCode InnerGetProfile(GetProfileCallbackInfo &info) } ExtensionAbilityInfo targetExtensionInfo; - result = GetExtensionFromBundleInfo( + result = BundleManagerHelper::GetExtensionFromBundleInfo( bundleInfo, info.abilityName, info.moduleName, targetExtensionInfo); if (result != ERR_OK) { return result; @@ -3736,17 +3375,6 @@ void CreateAppDistributionTypeObject(napi_env env, napi_value value) NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, value, "NONE", nNone)); } -static ErrCode InnerGetPermissionDef(const std::string &permissionName, PermissionDef &permissionDef) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetPermissionDef(permissionName, permissionDef); - return CommonFunc::ConvertErrCode(ret); -} - void GetPermissionDefExec(napi_env env, void *data) { AsyncPermissionDefineCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -3755,7 +3383,7 @@ void GetPermissionDefExec(napi_env env, void *data) return; } if (asyncCallbackInfo->err == NO_ERROR) { - asyncCallbackInfo->err = InnerGetPermissionDef(asyncCallbackInfo->permissionName, + asyncCallbackInfo->err = BundleManagerHelper::InnerGetPermissionDef(asyncCallbackInfo->permissionName, asyncCallbackInfo->permissionDef); } } @@ -4429,17 +4057,6 @@ napi_value GetBundleInfoForSelf(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetAllSharedBundleInfo(std::vector &sharedBundles) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetAllSharedBundleInfo(sharedBundles); - return CommonFunc::ConvertErrCode(ret); -} - void GetAllSharedBundleInfoExec(napi_env env, void *data) { SharedBundleCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -4447,7 +4064,7 @@ void GetAllSharedBundleInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetAllSharedBundleInfo(asyncCallbackInfo->sharedBundles); + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAllSharedBundleInfo(asyncCallbackInfo->sharedBundles); } void GetAllSharedBundleInfoComplete(napi_env env, napi_status status, void *data) @@ -4512,18 +4129,6 @@ napi_value GetAllSharedBundleInfo(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetSharedBundleInfo(const std::string &bundleName, const std::string &moduleName, - std::vector &sharedBundles) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetSharedBundleInfo(bundleName, moduleName, sharedBundles); - return CommonFunc::ConvertErrCode(ret); -} - void GetSharedBundleInfoExec(napi_env env, void *data) { SharedBundleCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -4531,8 +4136,8 @@ void GetSharedBundleInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetSharedBundleInfo(asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleName, - asyncCallbackInfo->sharedBundles); + asyncCallbackInfo->err = BundleManagerHelper::InnerGetSharedBundleInfo( + asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleName, asyncCallbackInfo->sharedBundles); } void GetSharedBundleInfoComplete(napi_env env, napi_status status, void *data) @@ -4550,8 +4155,18 @@ void GetSharedBundleInfoComplete(napi_env env, napi_status status, void *data) NAPI_CALL_RETURN_VOID(env, napi_create_array(env, &result[ARGS_POS_ONE])); CommonFunc::ConvertAllSharedBundleInfo(env, result[ARGS_POS_ONE], asyncCallbackInfo->sharedBundles); } else { - result[ARGS_POS_ZERO] = BusinessError::CreateCommonError(env, asyncCallbackInfo->err, - GET_SHARED_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + if (asyncCallbackInfo->bundleName.empty()) { + APP_LOGE("bundleName is empty"); + result[ARGS_POS_ZERO] = BusinessError::CreateError(env, ERROR_PARAM_CHECK_ERROR, + PARAM_BUNDLENAME_EMPTY_ERROR); + } else if (asyncCallbackInfo->moduleName.empty()) { + APP_LOGE("moduleName is empty"); + result[ARGS_POS_ZERO] = BusinessError::CreateError(env, ERROR_PARAM_CHECK_ERROR, + PARAM_MODULENAME_EMPTY_ERROR); + } else { + result[ARGS_POS_ZERO] = BusinessError::CreateCommonError(env, asyncCallbackInfo->err, + GET_SHARED_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + } } CommonFunc::NapiReturnDeferred(env, asyncCallbackInfo, result, ARGS_SIZE_TWO); } @@ -4801,18 +4416,6 @@ void CreateProfileTypeObject(napi_env env, napi_value value) NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, value, "INTENT_PROFILE", nIntentProfile)); } -ErrCode InnerGetAppProvisionInfo( - const std::string &bundleName, int32_t userId, AppProvisionInfo &appProvisionInfo) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetAppProvisionInfo(bundleName, userId, appProvisionInfo); - return CommonFunc::ConvertErrCode(ret); -} - void GetAppProvisionInfoExec(napi_env env, void *data) { AppProvisionInfoCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -4821,7 +4424,7 @@ void GetAppProvisionInfoExec(napi_env env, void *data) return; } if (asyncCallbackInfo->err == NO_ERROR) { - asyncCallbackInfo->err = InnerGetAppProvisionInfo( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAppProvisionInfo( asyncCallbackInfo->bundleName, asyncCallbackInfo->userId, asyncCallbackInfo->appProvisionInfo); } } @@ -5127,17 +4730,6 @@ napi_value GetJsonProfile(napi_env env, napi_callback_info info) return nProfile; } -static ErrCode InnerGetRecoverableApplicationInfo(std::vector &recoverableApplications) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetRecoverableApplicationInfo(recoverableApplications); - return CommonFunc::ConvertErrCode(ret); -} - void GetRecoverableApplicationInfoExec(napi_env env, void *data) { RecoverableApplicationCallbackInfo *asyncCallbackInfo = @@ -5145,7 +4737,8 @@ void GetRecoverableApplicationInfoExec(napi_env env, void *data) if (asyncCallbackInfo == nullptr) { return; } - asyncCallbackInfo->err = InnerGetRecoverableApplicationInfo(asyncCallbackInfo->recoverableApplicationInfos); + asyncCallbackInfo->err = + BundleManagerHelper::InnerGetRecoverableApplicationInfo(asyncCallbackInfo->recoverableApplicationInfos); } void GetRecoverableApplicationInfoExecComplete(napi_env env, napi_status status, void *data) @@ -5360,18 +4953,6 @@ void GetAllPreinstalledApplicationInfosComplete(napi_env env, napi_status status env, asyncCallbackInfo, result, ARGS_SIZE_TWO); } -static ErrCode InnerGetAllPreinstalledApplicationInfos( - std::vector &preinstalledApplicationInfos) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("IBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetAllPreinstalledApplicationInfos(preinstalledApplicationInfos); - return CommonFunc::ConvertErrCode(ret); -} - void GetAllPreinstalledApplicationInfosExec(napi_env env, void *data) { PreinstalledApplicationInfosCallbackInfo *asyncCallbackInfo = @@ -5380,7 +4961,8 @@ void GetAllPreinstalledApplicationInfosExec(napi_env env, void *data) APP_LOGE("AsyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetAllPreinstalledApplicationInfos(asyncCallbackInfo->preinstalledApplicationInfos); + asyncCallbackInfo->err = + BundleManagerHelper::InnerGetAllPreinstalledApplicationInfos(asyncCallbackInfo->preinstalledApplicationInfos); } napi_value GetAllPreinstalledApplicationInfos(napi_env env, napi_callback_info info) @@ -5646,46 +5228,6 @@ napi_value GetAppCloneBundleInfo(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetAllAppCloneBundleInfo(const std::string &bundleName, int32_t bundleFlags, - int32_t userId, std::vector &bundleInfos) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - BundleInfo bundleInfoMain; - ErrCode ret = iBundleMgr->GetCloneBundleInfo(bundleName, bundleFlags, 0, bundleInfoMain, userId); - APP_LOGD("GetMainBundleInfo appIndex = 0, ret=%{public}d", ret); - if (ret == ERR_OK) { - bundleInfos.emplace_back(bundleInfoMain); - } - if (ret != ERR_OK && ret != ERR_BUNDLE_MANAGER_APPLICATION_DISABLED && - ret != ERR_BUNDLE_MANAGER_BUNDLE_DISABLED) { - return CommonFunc::ConvertErrCode(ret); - } - // handle clone apps - std::vector appIndexes; - ErrCode getCloneIndexesRet = iBundleMgr->GetCloneAppIndexes(bundleName, appIndexes, userId); - if (getCloneIndexesRet != ERR_OK) { - if (ret == ERR_OK) { - return SUCCESS; - } - return CommonFunc::ConvertErrCode(ret); - } - for (int32_t appIndex : appIndexes) { - BundleInfo bundleInfo; - ret = iBundleMgr->GetCloneBundleInfo(bundleName, bundleFlags, appIndex, bundleInfo, userId); - if (ret == ERR_OK) { - bundleInfos.emplace_back(bundleInfo); - } - } - if (bundleInfos.empty()) { - return ERROR_BUNDLE_IS_DISABLED; - } - return SUCCESS; -} - void GetAllAppCloneBundleInfoExec(napi_env env, void *data) { CloneAppBundleInfosCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -5697,9 +5239,8 @@ void GetAllAppCloneBundleInfoExec(napi_env env, void *data) asyncCallbackInfo->bundleName.c_str(), asyncCallbackInfo->bundleFlags, asyncCallbackInfo->userId); - asyncCallbackInfo->err = - InnerGetAllAppCloneBundleInfo(asyncCallbackInfo->bundleName, asyncCallbackInfo->bundleFlags, - asyncCallbackInfo->userId, asyncCallbackInfo->bundleInfos); + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAllAppCloneBundleInfo(asyncCallbackInfo->bundleName, + asyncCallbackInfo->bundleFlags, asyncCallbackInfo->userId, asyncCallbackInfo->bundleInfos); } static void CloneAppBundleInfos( @@ -5733,7 +5274,7 @@ void GetAllAppCloneBundleInfoComplete(napi_env env, napi_status status, void *da CloneAppBundleInfos(env, result[ARGS_POS_ONE], asyncCallbackInfo->bundleInfos, asyncCallbackInfo->bundleFlags); } else { result[ARGS_POS_ZERO] = BusinessError::CreateCommonError(env, asyncCallbackInfo->err, - GET_ALL_APP_CLONE_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO); + GET_ALL_APP_CLONE_BUNDLE_INFO, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); } CommonFunc::NapiReturnDeferred(env, asyncCallbackInfo, result, ARGS_SIZE_TWO); } @@ -5866,21 +5407,6 @@ napi_value MigrateData(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerGetAllDynamicIconInfo(const int32_t userId, std::vector &dynamicIconInfos) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = extResourceManager->GetAllDynamicIconInfo(userId, dynamicIconInfos); - if (ret != ERR_OK) { - APP_LOGE_NOFUNC("GetDynamicIcon failed %{public}d", ret); - } - - return CommonFunc::ConvertErrCode(ret); -} - void GetAllDynamicIconInfoExec(napi_env env, void *data) { DynamicIconInfoCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -5888,7 +5414,7 @@ void GetAllDynamicIconInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetAllDynamicIconInfo( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAllDynamicIconInfo( asyncCallbackInfo->userId, asyncCallbackInfo->dynamicIconInfos); } @@ -5948,21 +5474,6 @@ napi_value GetAllDynamicIconInfo(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerGetDynamicIconInfo(const std::string &bundleName, std::vector &dynamicIconInfos) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = extResourceManager->GetDynamicIconInfo(bundleName, dynamicIconInfos); - if (ret != ERR_OK) { - APP_LOGE_NOFUNC("-n %{public}s GetDynamicIcon failed %{public}d", bundleName.c_str(), ret); - } - - return CommonFunc::ConvertErrCode(ret); -} - void GetDynamicIconInfoExec(napi_env env, void *data) { DynamicIconInfoCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -5970,7 +5481,7 @@ void GetDynamicIconInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetDynamicIconInfo( + asyncCallbackInfo->err = BundleManagerHelper::InnerGetDynamicIconInfo( asyncCallbackInfo->bundleName, asyncCallbackInfo->dynamicIconInfos); } @@ -6026,19 +5537,6 @@ napi_value GetDynamicIconInfo(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetAbilityInfos(const std::string &uri, - uint32_t flags, std::vector &abilityInfos) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("iBundleMgr is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = iBundleMgr->GetAbilityInfos(uri, flags, abilityInfos); - APP_LOGD("GetAbilityInfos ErrCode : %{public}d", ret); - return CommonFunc::ConvertErrCode(ret); -} - void GetAbilityInfosExec(napi_env env, void *data) { GetAbilityCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -6057,8 +5555,8 @@ void GetAbilityInfosExec(napi_env env, void *data) return; } } - asyncCallbackInfo->err = InnerGetAbilityInfos(asyncCallbackInfo->uri, asyncCallbackInfo->flags, - asyncCallbackInfo->abilityInfos); + asyncCallbackInfo->err = BundleManagerHelper::InnerGetAbilityInfos( + asyncCallbackInfo->uri, asyncCallbackInfo->flags, asyncCallbackInfo->abilityInfos); } void GetAbilityInfosComplete(napi_env env, napi_status status, void *data) diff --git a/interfaces/kits/js/bundle_manager/bundle_manager_helper.cpp b/interfaces/kits/js/bundle_manager/bundle_manager_helper.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3a86ffa8969df9678d3a0f608e26be9a4e299945 --- /dev/null +++ b/interfaces/kits/js/bundle_manager/bundle_manager_helper.cpp @@ -0,0 +1,467 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bundle_manager_helper.h" + +#include "app_log_wrapper.h" +#include "bundle_mgr_client.h" +#include "bundle_mgr_interface.h" +#include "bundle_mgr_proxy.h" +#include "bundle_errors.h" +#include "business_error.h" +#include "common_func.h" +#include "ipc_skeleton.h" + +namespace OHOS { +namespace AppExecFwk { + +ErrCode BundleManagerHelper::InnerBatchQueryAbilityInfos( + const std::vector& wants, int32_t flags, int32_t userId, std::vector& abilityInfos) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->BatchQueryAbilityInfos(wants, flags, userId, abilityInfos); + APP_LOGD("BatchQueryAbilityInfos ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetDynamicIcon(const std::string& bundleName, std::string& moduleName) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = extResourceManager->GetDynamicIcon(bundleName, moduleName); + if (ret != ERR_OK) { + APP_LOGE_NOFUNC("GetDynamicIcon failed"); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerIsAbilityEnabled(const AbilityInfo& abilityInfo, bool& isEnable, int32_t appIndex) +{ + auto bundleMgr = CommonFunc::GetBundleMgr(); + if (bundleMgr == nullptr) { + APP_LOGE("CommonFunc::GetBundleMgr failed"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = ERR_OK; + if (appIndex != 0) { + ret = bundleMgr->IsCloneAbilityEnabled(abilityInfo, appIndex, isEnable); + } else { + ret = bundleMgr->IsAbilityEnabled(abilityInfo, isEnable); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerSetAbilityEnabled(const AbilityInfo& abilityInfo, bool& isEnable, int32_t appIndex) +{ + auto bundleMgr = CommonFunc::GetBundleMgr(); + if (bundleMgr == nullptr) { + APP_LOGE("CommonFunc::GetBundleMgr failed"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = ERR_OK; + if (appIndex != 0) { + ret = bundleMgr->SetCloneAbilityEnabled(abilityInfo, appIndex, isEnable); + } else { + ret = bundleMgr->SetAbilityEnabled(abilityInfo, isEnable); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerSetApplicationEnabled(const std::string& bundleName, bool& isEnable, int32_t appIndex) +{ + auto bundleMgr = CommonFunc::GetBundleMgr(); + if (bundleMgr == nullptr) { + APP_LOGE("CommonFunc::GetBundleMgr failed"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = ERR_OK; + if (appIndex == 0) { + ret = bundleMgr->SetApplicationEnabled(bundleName, isEnable); + } else { + ret = bundleMgr->SetCloneApplicationEnabled(bundleName, appIndex, isEnable); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerEnableDynamicIcon( + const std::string& bundleName, const std::string& moduleName, int32_t appIndex, int32_t userId, bool isDefault) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = ERR_OK; + if (isDefault) { + ret = extResourceManager->EnableDynamicIcon(bundleName, moduleName); + } else { + ret = extResourceManager->EnableDynamicIcon(bundleName, moduleName, userId, appIndex); + } + if (ret != ERR_OK) { + APP_LOGE("EnableDynamicIcon failed %{public}d", ret); + } + + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetAppCloneIdentity(int32_t uid, std::string& bundleName, int32_t& appIndex) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetNameAndIndexForUid(uid, bundleName, appIndex); + APP_LOGD("GetNameAndIndexForUid ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetBundleArchiveInfo(std::string& hapFilePath, int32_t flags, BundleInfo& bundleInfo) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetBundleArchiveInfoV9(hapFilePath, flags, bundleInfo); + APP_LOGD("GetBundleArchiveInfoV9 ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::GetAbilityFromBundleInfo(const BundleInfo& bundleInfo, const std::string& abilityName, + const std::string& moduleName, AbilityInfo& targetAbilityInfo) +{ + bool ifExists = false; + for (const auto& hapModuleInfo : bundleInfo.hapModuleInfos) { + for (const auto& abilityInfo : hapModuleInfo.abilityInfos) { + if (abilityInfo.name == abilityName && abilityInfo.moduleName == moduleName) { + if (!abilityInfo.enabled) { + APP_LOGI("ability disabled"); + return ERR_BUNDLE_MANAGER_ABILITY_DISABLED; + } + ifExists = true; + targetAbilityInfo = abilityInfo; + break; + } + } + if (ifExists) { + break; + } + } + if (!ifExists) { + APP_LOGE("ability not exist"); + return ERR_BUNDLE_MANAGER_ABILITY_NOT_EXIST; + } + return ERR_OK; +} + +ErrCode BundleManagerHelper::GetExtensionFromBundleInfo(const BundleInfo& bundleInfo, const std::string& abilityName, + const std::string& moduleName, ExtensionAbilityInfo& targetExtensionInfo) +{ + bool ifExists = false; + for (const auto& hapModuleInfo : bundleInfo.hapModuleInfos) { + for (const auto& extensionInfo : hapModuleInfo.extensionInfos) { + if (extensionInfo.name == abilityName && extensionInfo.moduleName == moduleName) { + ifExists = true; + targetExtensionInfo = extensionInfo; + break; + } + if (!extensionInfo.enabled) { + APP_LOGI("extension disabled"); + return ERR_BUNDLE_MANAGER_ABILITY_DISABLED; + } + } + if (ifExists) { + break; + } + } + if (!ifExists) { + APP_LOGE("ability not exist"); + return ERR_BUNDLE_MANAGER_ABILITY_NOT_EXIST; + } + return ERR_OK; +} + +ErrCode BundleManagerHelper::InnerGetPermissionDef(const std::string& permissionName, PermissionDef& permissionDef) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetPermissionDef(permissionName, permissionDef); + APP_LOGD("GetPermissionDef ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerCleanBundleCacheCallback( + const std::string &bundleName, int32_t appIndex, const OHOS::sptr cleanCacheCallback) +{ + if (cleanCacheCallback == nullptr) { + APP_LOGE("callback nullptr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + int32_t userId = IPCSkeleton::GetCallingUid() / Constants::BASE_USER_RANGE; + ErrCode result = iBundleMgr->CleanBundleCacheFiles(bundleName, cleanCacheCallback, userId, appIndex); + if (result != ERR_OK) { + APP_LOGE("call error, bundleName is %{public}s, userId is %{public}d, appIndex is %{public}d", + bundleName.c_str(), userId, appIndex); + } + return CommonFunc::ConvertErrCode(result); +} + +ErrCode BundleManagerHelper::InnerGetAppProvisionInfo( + const std::string& bundleName, int32_t userId, AppProvisionInfo& appProvisionInfo) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetAppProvisionInfo(bundleName, userId, appProvisionInfo); + APP_LOGD("GetAppProvisionInfo ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetAllPreinstalledApplicationInfos( + std::vector& preinstalledApplicationInfos) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("IBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetAllPreinstalledApplicationInfos(preinstalledApplicationInfos); + APP_LOGD("GetAllPreinstalledApplicationInfos ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetAllAppCloneBundleInfo( + const std::string& bundleName, int32_t bundleFlags, int32_t userId, std::vector& bundleInfos) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + BundleInfo bundleInfoMain; + ErrCode ret = iBundleMgr->GetCloneBundleInfo(bundleName, bundleFlags, 0, bundleInfoMain, userId); + APP_LOGD("GetMainBundleInfo appIndex = 0, ret=%{public}d", ret); + if (ret == ERR_OK) { + bundleInfos.emplace_back(bundleInfoMain); + } + if (ret != ERR_OK && ret != ERR_BUNDLE_MANAGER_APPLICATION_DISABLED && ret != ERR_BUNDLE_MANAGER_BUNDLE_DISABLED) { + return CommonFunc::ConvertErrCode(ret); + } + // handle clone apps + std::vector appIndexes; + ErrCode getCloneIndexesRet = iBundleMgr->GetCloneAppIndexes(bundleName, appIndexes, userId); + if (getCloneIndexesRet != ERR_OK) { + if (ret == ERR_OK) { + return SUCCESS; + } + return CommonFunc::ConvertErrCode(ret); + } + for (int32_t appIndex : appIndexes) { + BundleInfo bundleInfo; + ret = iBundleMgr->GetCloneBundleInfo(bundleName, bundleFlags, appIndex, bundleInfo, userId); + if (ret == ERR_OK) { + bundleInfos.emplace_back(bundleInfo); + } + } + if (bundleInfos.empty()) { + return ERROR_BUNDLE_IS_DISABLED; + } + return SUCCESS; +} + +ErrCode BundleManagerHelper::InnerGetAllSharedBundleInfo(std::vector& sharedBundles) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetAllSharedBundleInfo(sharedBundles); + APP_LOGD("GetAllSharedBundleInfo ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetSharedBundleInfo( + const std::string& bundleName, const std::string& moduleName, std::vector& sharedBundles) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetSharedBundleInfo(bundleName, moduleName, sharedBundles); + APP_LOGD("GetSharedBundleInfo ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetExtResource(const std::string& bundleName, std::vector& moduleNames) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + ErrCode ret = extResourceManager->GetExtResource(bundleName, moduleNames); + if (ret != ERR_OK) { + APP_LOGE("GetExtResource failed"); + } + APP_LOGD("GetExtResource ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerDisableDynamicIcon( + const std::string& bundleName, int32_t appIndex, int32_t userId, bool isDefault) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + ErrCode ret = ERR_OK; + if (isDefault) { + ret = extResourceManager->DisableDynamicIcon(bundleName); + } else { + ret = extResourceManager->DisableDynamicIcon(bundleName, userId, appIndex); + } + if (ret != ERR_OK) { + APP_LOGE("DisableDynamicIcon failed %{public}d", ret); + } + + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetDynamicIconInfo( + const std::string& bundleName, std::vector& dynamicIconInfos) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = extResourceManager->GetDynamicIconInfo(bundleName, dynamicIconInfos); + if (ret != ERR_OK) { + APP_LOGE_NOFUNC("-n %{public}s GetDynamicIcon failed %{public}d", bundleName.c_str(), ret); + } + + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetAllDynamicIconInfo( + const int32_t userId, std::vector& dynamicIconInfos) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = extResourceManager->GetAllDynamicIconInfo(userId, dynamicIconInfos); + if (ret != ERR_OK) { + APP_LOGE_NOFUNC("GetDynamicIcon failed %{public}d", ret); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerVerify(const std::vector& abcPaths, bool flag) +{ + auto verifyManager = CommonFunc::GetVerifyManager(); + if (verifyManager == nullptr) { + APP_LOGE("verifyManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + ErrCode ret = verifyManager->Verify(abcPaths); + if (ret == ERR_OK && flag) { + verifyManager->RemoveFiles(abcPaths); + } + APP_LOGD("VerifyAbc ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerDeleteAbc(const std::string& path) +{ + auto verifyManager = CommonFunc::GetVerifyManager(); + if (verifyManager == nullptr) { + APP_LOGE("verifyManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + ErrCode ret = verifyManager->DeleteAbc(path); + if (ret != ERR_OK) { + APP_LOGE("DeleteAbc failed"); + } + APP_LOGD("DeleteAbc ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetRecoverableApplicationInfo( + std::vector& recoverableApplications) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetRecoverableApplicationInfo(recoverableApplications); + APP_LOGD("GetRecoverableApplicationInfo ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetAllPluginInfo( + const std::string& hostBundleName, int32_t userId, std::vector& pluginBundleInfos) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetAllPluginInfo(hostBundleName, userId, pluginBundleInfos); + APP_LOGD("GetAllPluginInfo ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode BundleManagerHelper::InnerGetAbilityInfos( + const std::string& uri, uint32_t flags, std::vector& abilityInfos) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("iBundleMgr is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = iBundleMgr->GetAbilityInfos(uri, flags, abilityInfos); + APP_LOGD("GetAbilityInfos ErrCode : %{public}d", ret); + return CommonFunc::ConvertErrCode(ret); +} +} // AppExecFwk +} // OHOS \ No newline at end of file diff --git a/interfaces/kits/js/bundle_manager/bundle_manager_helper.h b/interfaces/kits/js/bundle_manager/bundle_manager_helper.h new file mode 100644 index 0000000000000000000000000000000000000000..1492fb7542aed5b868336b547c8b51071bb0482b --- /dev/null +++ b/interfaces/kits/js/bundle_manager/bundle_manager_helper.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_JS_BUNDLE_MANAGER_BUNDLE_MANAGER_HELPER_H +#define BUNDLE_FRAMEWORK_INTERFACES_KITS_JS_BUNDLE_MANAGER_BUNDLE_MANAGER_HELPER_H + +#include "bundle_errors.h" +#include "bundle_mgr_interface.h" +#include "bundle_mgr_proxy.h" +#include "clean_cache_callback.h" +#include "common_func.h" + +namespace OHOS { +namespace AppExecFwk { +class BundleManagerHelper { +public: + static ErrCode InnerBatchQueryAbilityInfos(const std::vector& wants, int32_t flags, + int32_t userId, std::vector& abilityInfos); + static ErrCode InnerGetDynamicIcon(const std::string& bundleName, std::string& moduleName); + static ErrCode InnerIsAbilityEnabled(const AbilityInfo& abilityInfo, bool& isEnable, int32_t appIndex); + static ErrCode InnerSetAbilityEnabled(const AbilityInfo& abilityInfo, bool& isEnable, int32_t appIndex); + static ErrCode InnerSetApplicationEnabled(const std::string& bundleName, bool& isEnable, int32_t appIndex); + static ErrCode InnerEnableDynamicIcon( + const std::string& bundleName, const std::string& moduleName, int32_t appIndex, int32_t userId, bool isDefault); + static ErrCode InnerGetAppCloneIdentity(int32_t uid, std::string& bundleName, int32_t& appIndex); + static ErrCode InnerGetBundleArchiveInfo(std::string& hapFilePath, int32_t flags, BundleInfo& bundleInfo); + static ErrCode GetAbilityFromBundleInfo(const BundleInfo& bundleInfo, const std::string& abilityName, + const std::string& moduleName, AbilityInfo& targetAbilityInfo); + static ErrCode GetExtensionFromBundleInfo(const BundleInfo& bundleInfo, const std::string& abilityName, + const std::string& moduleName, ExtensionAbilityInfo& targetExtensionInfo); + static ErrCode InnerGetPermissionDef(const std::string& permissionName, PermissionDef& permissionDef); + static ErrCode InnerCleanBundleCacheCallback( + const std::string &bundleName, int32_t appIndex, const OHOS::sptr cleanCacheCallback); + static ErrCode InnerGetAppProvisionInfo( + const std::string& bundleName, int32_t userId, AppProvisionInfo& appProvisionInfo); + static ErrCode InnerGetAllPreinstalledApplicationInfos( + std::vector& preinstalledApplicationInfos); + static ErrCode InnerGetAllAppCloneBundleInfo( + const std::string& bundleName, int32_t bundleFlags, int32_t userId, std::vector& bundleInfos); + static ErrCode InnerGetAllSharedBundleInfo(std::vector& sharedBundles); + static ErrCode InnerGetSharedBundleInfo( + const std::string& bundleName, const std::string& moduleName, std::vector& sharedBundles); + static ErrCode InnerGetExtResource(const std::string& bundleName, std::vector& moduleNames); + static ErrCode InnerDisableDynamicIcon( + const std::string& bundleName, int32_t appIndex, int32_t userId, bool isDefault); + static ErrCode InnerGetDynamicIconInfo( + const std::string& bundleName, std::vector& dynamicIconInfos); + static ErrCode InnerGetAllDynamicIconInfo(const int32_t userId, std::vector& dynamicIconInfos); + static ErrCode InnerVerify(const std::vector& abcPaths, bool flag); + static ErrCode InnerDeleteAbc(const std::string& path); + static ErrCode InnerGetRecoverableApplicationInfo(std::vector& recoverableApplications); + static ErrCode InnerGetAllPluginInfo( + const std::string& hostBundleName, int32_t userId, std::vector& pluginBundleInfos); + static ErrCode InnerGetAbilityInfos(const std::string& uri, uint32_t flags, std::vector& abilityInfos); +}; +} // AppExecFwk +} // OHOS +#endif // BUNDLE_FRAMEWORK_INTERFACES_KITS_JS_BUNDLE_MANAGER_BUNDLE_MANAGER_HELPER_H \ No newline at end of file diff --git a/interfaces/kits/js/bundle_manager/bundle_manager_sync.cpp b/interfaces/kits/js/bundle_manager/bundle_manager_sync.cpp index c7a1cf31044a87c062bcd8565fa7482e2b561b4a..8e408b466881b60e88103b7c8b474126d58d7249 100644 --- a/interfaces/kits/js/bundle_manager/bundle_manager_sync.cpp +++ b/interfaces/kits/js/bundle_manager/bundle_manager_sync.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -31,37 +31,8 @@ namespace OHOS { namespace AppExecFwk { -constexpr const char* ABILITY_INFO = "abilityInfo"; constexpr const char* IS_ENABLE = "isEnable"; -constexpr const char* HAP_FILE_PATH = "hapFilePath"; -constexpr const char* SANDBOX_DATA_DIR = "sandboxDataDir"; constexpr const char* EXTENSIONABILITY_TYPE = "extensionAbilityType"; -constexpr const char* FLAGS = "flags"; -constexpr const char* EXTENSION_TYPE_NAME = "extensionTypeName"; -const char* SET_APPLICATION_ENABLED_SYNC = "SetApplicationEnabledSync"; -const char* SET_ABILITY_ENABLED_SYNC = "SetAbilityEnabledSync"; -const char* IS_ABILITY_ENABLED_SYNC = "IsAbilityEnabledSync"; -const char* GET_ABILITY_LABEL_SYNC = "GetAbilityLabelSync"; -const char* GET_LAUNCH_WANT_FOR_BUNDLE_SYNC = "GetLaunchWantForBundleSync"; -const char* GET_BUNDLE_ARCHIVE_INFO_SYNC = "GetBundleArchiveInfoSync"; -const char* GET_BUNDLE_NAME_BY_UID_SYNC = "GetBundleNameByUidSync"; -const char* GET_PROFILE_BY_EXTENSION_ABILITY_SYNC = "GetProfileByExtensionAbilitySync"; -const char* GET_PROFILE_BY_ABILITY_SYNC = "GetProfileByAbilitySync"; -const char* QUERY_EXTENSION_INFOS_SYNC = "QueryExtensionInfosSync"; -const char* GET_PERMISSION_DEF_SYNC = "GetPermissionDefSync"; -const char* GET_APP_PROVISION_INFO_SYNC = "GetAppProvisionInfoSync"; -const char* GET_SIGNATURE_INFO_SYNC = "GetSignatureInfoSync"; -const char* GET_SANDBOX_DATA_DIR_SYNC = "GetSandboxDataDirSync"; -const char* GET_SIGNATURE_INFO_PERMISSIONS = "ohos.permission.GET_SIGNATURE_INFO"; -const char* PERMISSION_NAME = "permissionName"; -const char* INVALID_WANT_ERROR = - "implicit query condition, at least one query param(action entities uri type or linkFeature) non-empty."; -const char* PARAM_EXTENSION_ABILITY_TYPE_EMPTY_ERROR = - "BusinessError 401: Parameter error.Parameter extensionAbilityType is empty."; -const char* LINK_FEATURE = "linkFeature"; -const std::string ATOMIC_SERVICE_DIR_PREFIX = "+auid-"; -const std::string CLONE_APP_DIR_PREFIX = "+clone-"; -const std::string PLUS = "+"; bool ParseWantWithParameter(napi_env env, napi_value args, Want &want) { napi_valuetype valueType; @@ -242,6 +213,11 @@ napi_value IsApplicationEnabledSync(napi_env env, napi_callback_info info) BusinessError::ThrowError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION); return nullptr; } + if (bundleName.empty()) { + APP_LOGW("bundleName is empty"); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_BUNDLENAME_EMPTY_ERROR); + return nullptr; + } bool isEnable = false; ErrCode ret = CommonFunc::ConvertErrCode(iBundleMgr->IsApplicationEnabled(bundleName, isEnable)); if (ret != NO_ERROR) { @@ -995,7 +971,7 @@ napi_value GetSignatureInfoSync(napi_env env, napi_callback_info info) if (ret != NO_ERROR) { APP_LOGE("call GetSignatureInfoByUid failed, uid is %{public}d", uid); napi_value businessError = BusinessError::CreateCommonError( - env, ret, GET_SIGNATURE_INFO_SYNC, GET_SIGNATURE_INFO_PERMISSIONS); + env, ret, GET_SIGNATURE_INFO, GET_SIGNATURE_INFO_PERMISSIONS); napi_throw(env, businessError); return nullptr; } @@ -1056,46 +1032,6 @@ napi_value GetSandboxDataDirSync(napi_env env, napi_callback_info info) return nSandboxDataDir; } -void GetBundleNameAndIndexBySandboxDataDir( - const std::string &keyName, std::string &bundleName, int32_t &appIndex) -{ - bundleName = keyName; - appIndex = 0; - bool isApp = true; - // for clone bundle name - auto pos = keyName.find(CLONE_APP_DIR_PREFIX); - if (pos == std::string::npos || pos != 0) { - //for atomic service - pos = keyName.find(ATOMIC_SERVICE_DIR_PREFIX); - if (pos == std::string::npos || pos != 0) { - return; - } - isApp = false; - } - - size_t indexBegin = 0; - if (isApp) { - indexBegin = pos + CLONE_APP_DIR_PREFIX.size(); - } else { - indexBegin = pos + ATOMIC_SERVICE_DIR_PREFIX.size(); - } - - auto plus = keyName.find(PLUS, indexBegin); - if ((plus == std::string::npos) || (plus <= indexBegin)) { - return; - } - - if (isApp) { - std::string index = keyName.substr(indexBegin, plus - indexBegin); - if (!OHOS::StrToInt(index, appIndex)) { - appIndex = 0; - return; - } - } - - bundleName = keyName.substr(plus + PLUS.size()); -} - napi_value GetAppCloneIdentityBySandboxDataDirSync(napi_env env, napi_callback_info info) { APP_LOGD("NAPI GetAppCloneIdentityBySandboxDataDirSync called"); @@ -1112,7 +1048,7 @@ napi_value GetAppCloneIdentityBySandboxDataDirSync(napi_env env, napi_callback_i } std::string bundleName; int32_t appIndex; - GetBundleNameAndIndexBySandboxDataDir(sandboxDataDir, bundleName, appIndex); + CommonFunc::GetBundleNameAndIndexBySandboxDataDir(sandboxDataDir, bundleName, appIndex); napi_value nAppCloneIdentity = nullptr; NAPI_CALL(env, napi_create_object(env, &nAppCloneIdentity)); diff --git a/interfaces/kits/js/bundle_resource/BUILD.gn b/interfaces/kits/js/bundle_resource/BUILD.gn index 1f3fd450ab6bc8432b030be3f08190a297d9d65c..188f66fd25d1abdda40e3dd589f8d5e981be209a 100644 --- a/interfaces/kits/js/bundle_resource/BUILD.gn +++ b/interfaces/kits/js/bundle_resource/BUILD.gn @@ -26,6 +26,7 @@ ohos_shared_library("bundle_res_common") { ubsan = true } + include_dirs = [ "${kits_path}/js/common" ] sources = [ "resource_helper.cpp" ] cflags = [ @@ -42,6 +43,7 @@ ohos_shared_library("bundle_res_common") { "${base_path}:appexecfwk_base", "${common_path}:libappexecfwk_common", "${core_path}:appexecfwk_core", + "../common:bundle_napi_common", ] defines = [ @@ -53,6 +55,7 @@ ohos_shared_library("bundle_res_common") { "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", + "napi:ace_napi", "runtime_core:ani", "safwk:system_ability_fwk", "samgr:samgr_proxy", diff --git a/interfaces/kits/js/bundle_resource/bundle_resource.cpp b/interfaces/kits/js/bundle_resource/bundle_resource.cpp index c1738934c2b82eb6fbc23302ce26a4421a3f42b9..8082edce7d18043f985184b7ca177e5631dd1e8d 100644 --- a/interfaces/kits/js/bundle_resource/bundle_resource.cpp +++ b/interfaces/kits/js/bundle_resource/bundle_resource.cpp @@ -37,18 +37,11 @@ namespace { constexpr const char* LABEL = "label"; constexpr const char* ICON = "icon"; constexpr const char* DRAWABLE_DESCRIPTOR = "drawableDescriptor"; -constexpr const char* PERMISSION_GET_ALL_BUNDLE_RESOURCES = - "ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES"; -constexpr const char* GET_LAUNCHER_ABILITY_RESOURCE_INFO = "GetLauncherAbilityResourceInfo"; -constexpr const char* GET_EXTENSION_ABILITY_RESOURCE_INFO = "GetExtensionAbilityResourceInfo"; -constexpr const char* GET_ALL_BUNDLE_RESOURCE_INFO = "GetAllBundleResourceInfo"; -constexpr const char* GET_ALL_LAUNCHER_ABILITY_RESOURCE_INFO = "GetAllLauncherAbilityResourceInfo"; constexpr const char* GET_RESOURCE_INFO_ALL = "GET_RESOURCE_INFO_ALL"; constexpr const char* GET_RESOURCE_INFO_WITH_LABEL = "GET_RESOURCE_INFO_WITH_LABEL"; constexpr const char* GET_RESOURCE_INFO_WITH_ICON = "GET_RESOURCE_INFO_WITH_ICON"; constexpr const char* GET_RESOURCE_INFO_WITH_SORTED_BY_LABEL = "GET_RESOURCE_INFO_WITH_SORTED_BY_LABEL"; constexpr const char* GET_RESOURCE_INFO_WITH_DRAWABLE_DESCRIPTOR = "GET_RESOURCE_INFO_WITH_DRAWABLE_DESCRIPTOR"; -constexpr const char* EXTENSION_ABILITY_TYPE = "extensionAbilityType"; constexpr const char* GET_RESOURCE_INFO_ONLY_WITH_MAIN_ABILITY = "GET_RESOURCE_INFO_ONLY_WITH_MAIN_ABILITY"; static void ConvertBundleResourceInfo( @@ -170,22 +163,6 @@ static void ConvertLauncherAbilityResourceInfos( } } -static ErrCode InnerGetBundleResourceInfo( - const std::string &bundleName, uint32_t flags, int32_t appIndex, BundleResourceInfo &resourceInfo) -{ - APP_LOGD("start"); - auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); - if (bundleResourceProxy == nullptr) { - APP_LOGE("bundleResourceProxy is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = bundleResourceProxy->GetBundleResourceInfo(bundleName, flags, resourceInfo, appIndex); - if (ret != ERR_OK) { - APP_LOGE("failed, bundleName is %{public}s, errCode: %{public}d", bundleName.c_str(), ret); - } - return CommonFunc::ConvertErrCode(ret); -} - napi_value GetBundleResourceInfo(napi_env env, napi_callback_info info) { APP_LOGI("NAPI start"); @@ -217,7 +194,7 @@ napi_value GetBundleResourceInfo(napi_env env, napi_callback_info info) } } BundleResourceInfo resourceInfo; - auto ret = InnerGetBundleResourceInfo(bundleName, flags, appIndex, resourceInfo); + auto ret = ResourceHelper::InnerGetBundleResourceInfo(bundleName, flags, appIndex, resourceInfo); if (ret != ERR_OK) { napi_value businessError = BusinessError::CreateCommonError( env, ret, GET_BUNDLE_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); @@ -231,24 +208,6 @@ napi_value GetBundleResourceInfo(napi_env env, napi_callback_info info) return nBundleResourceInfo; } -static ErrCode InnerGetLauncherAbilityResourceInfo( - const std::string &bundleName, uint32_t flags, int32_t appIndex, - std::vector &launcherAbilityResourceInfo) -{ - APP_LOGD("start"); - auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); - if (bundleResourceProxy == nullptr) { - APP_LOGE("bundleResourceProxy is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = bundleResourceProxy->GetLauncherAbilityResourceInfo(bundleName, - flags, launcherAbilityResourceInfo, appIndex); - if (ret != ERR_OK) { - APP_LOGE("failed, bundleName is %{public}s, errCode: %{public}d", bundleName.c_str(), ret); - } - return CommonFunc::ConvertErrCode(ret); -} - napi_value GetLauncherAbilityResourceInfo(napi_env env, napi_callback_info info) { APP_LOGD("NAPI start"); @@ -281,7 +240,8 @@ napi_value GetLauncherAbilityResourceInfo(napi_env env, napi_callback_info info) } std::vector launcherAbilityResourceInfos; - auto ret = InnerGetLauncherAbilityResourceInfo(bundleName, flags, appIndex, launcherAbilityResourceInfos); + auto ret = ResourceHelper::InnerGetLauncherAbilityResourceInfo( + bundleName, flags, appIndex, launcherAbilityResourceInfos); if (ret != ERR_OK) { napi_value businessError = BusinessError::CreateCommonError( env, ret, GET_LAUNCHER_ABILITY_RESOURCE_INFO, PERMISSION_GET_BUNDLE_RESOURCES); @@ -295,20 +255,6 @@ napi_value GetLauncherAbilityResourceInfo(napi_env env, napi_callback_info info) return nLauncherAbilityResourceInfos; } -static ErrCode InnerGetAllBundleResourceInfo(uint32_t flags, std::vector &bundleResourceInfos) -{ - auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); - if (bundleResourceProxy == nullptr) { - APP_LOGE("bundleResourceProxy is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = bundleResourceProxy->GetAllBundleResourceInfo(flags, bundleResourceInfos); - if (ret != ERR_OK) { - APP_LOGE("failed, errCode: %{public}d", ret); - } - return CommonFunc::ConvertErrCode(ret); -} - void GetAllBundleResourceInfoExec(napi_env env, void *data) { AllBundleResourceInfoCallback *asyncCallbackInfo = reinterpret_cast(data); @@ -316,7 +262,7 @@ void GetAllBundleResourceInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetAllBundleResourceInfo(asyncCallbackInfo->flags, + asyncCallbackInfo->err = ResourceHelper::InnerGetAllBundleResourceInfo(asyncCallbackInfo->flags, asyncCallbackInfo->bundleResourceInfos); } @@ -381,21 +327,6 @@ napi_value GetAllBundleResourceInfo(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerGetAllLauncherAbilityResourceInfo(uint32_t flags, - std::vector &launcherAbilityResourceInfos) -{ - auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); - if (bundleResourceProxy == nullptr) { - APP_LOGE("bundleResourceProxy is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = bundleResourceProxy->GetAllLauncherAbilityResourceInfo(flags, launcherAbilityResourceInfos); - if (ret != ERR_OK) { - APP_LOGE("failed, errCode: %{public}d", ret); - } - return CommonFunc::ConvertErrCode(ret); -} - void GetAllLauncherAbilityResourceInfoExec(napi_env env, void *data) { AllLauncherAbilityResourceInfoCallback *asyncCallbackInfo = @@ -404,7 +335,7 @@ void GetAllLauncherAbilityResourceInfoExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerGetAllLauncherAbilityResourceInfo( + asyncCallbackInfo->err = ResourceHelper::InnerGetAllLauncherAbilityResourceInfo( asyncCallbackInfo->flags, asyncCallbackInfo->launcherAbilityResourceInfos); } @@ -508,24 +439,6 @@ void CreateBundleResourceFlagObject(napi_env env, napi_value value) GET_RESOURCE_INFO_ONLY_WITH_MAIN_ABILITY, nGetMainAbility)); } -static ErrCode InnerGetExtensionAbilityResourceInfo( - const std::string &bundleName, ExtensionAbilityType extensionAbilityType, uint32_t flags, int32_t appIndex, - std::vector &extensionAbilityResourceInfos) -{ - APP_LOGD("InnerGetExtensionAbilityResourceInfo start"); - auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); - if (bundleResourceProxy == nullptr) { - APP_LOGE("bundleResourceProxy is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode ret = bundleResourceProxy->GetExtensionAbilityResourceInfo(bundleName, extensionAbilityType, - flags, extensionAbilityResourceInfos, appIndex); - if (ret != ERR_OK) { - APP_LOGE("failed, bundleName is %{public}s, errCode: %{public}d", bundleName.c_str(), ret); - } - return CommonFunc::ConvertErrCode(ret); -} - napi_value GetExtensionAbilityResourceInfo(napi_env env, napi_callback_info info) { APP_LOGD("GetExtensionAbilityResourceInfo start"); @@ -570,7 +483,7 @@ napi_value GetExtensionAbilityResourceInfo(napi_env env, napi_callback_info info } } std::vector entensionAbilityResourceInfos; - auto ret = InnerGetExtensionAbilityResourceInfo(bundleName, + auto ret = ResourceHelper::InnerGetExtensionAbilityResourceInfo(bundleName, static_cast(extensionAbilityType), flags, appIndex, entensionAbilityResourceInfos); if (ret != ERR_OK) { napi_value businessError = BusinessError::CreateCommonError( diff --git a/interfaces/kits/js/bundle_resource/resource_helper.cpp b/interfaces/kits/js/bundle_resource/resource_helper.cpp index eaeb62ce99d44ad8520075be652ae3a96f5f36c6..69bf6246ea38a1bf3c5489a6e9f353451775cb1d 100644 --- a/interfaces/kits/js/bundle_resource/resource_helper.cpp +++ b/interfaces/kits/js/bundle_resource/resource_helper.cpp @@ -16,8 +16,10 @@ #include "app_log_wrapper.h" #include "iservice_registry.h" #include "system_ability_definition.h" +#include "bundle_errors.h" #include "bundle_mgr_interface.h" #include "bundle_mgr_proxy.h" +#include "common_func.h" namespace OHOS { namespace AppExecFwk { @@ -58,5 +60,86 @@ sptr ResourceHelper::GetBundleResourceMgr() return bundleResourceMgr_; } +ErrCode ResourceHelper::InnerGetBundleResourceInfo( + const std::string &bundleName, uint32_t flags, int32_t appIndex, BundleResourceInfo &resourceInfo) +{ + APP_LOGD("start"); + auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); + if (bundleResourceProxy == nullptr) { + APP_LOGE("bundleResourceProxy is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = bundleResourceProxy->GetBundleResourceInfo(bundleName, flags, resourceInfo, appIndex); + if (ret != ERR_OK) { + APP_LOGE("failed, bundleName is %{public}s, errCode: %{public}d", bundleName.c_str(), ret); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode ResourceHelper::InnerGetLauncherAbilityResourceInfo( + const std::string &bundleName, uint32_t flags, int32_t appIndex, + std::vector &launcherAbilityResourceInfo) +{ + APP_LOGD("start"); + auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); + if (bundleResourceProxy == nullptr) { + APP_LOGE("bundleResourceProxy is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = bundleResourceProxy->GetLauncherAbilityResourceInfo(bundleName, + flags, launcherAbilityResourceInfo, appIndex); + if (ret != ERR_OK) { + APP_LOGE("failed, bundleName is %{public}s, errCode: %{public}d", bundleName.c_str(), ret); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode ResourceHelper::InnerGetAllBundleResourceInfo(uint32_t flags, + std::vector &bundleResourceInfos) +{ + auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); + if (bundleResourceProxy == nullptr) { + APP_LOGE("bundleResourceProxy is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = bundleResourceProxy->GetAllBundleResourceInfo(flags, bundleResourceInfos); + if (ret != ERR_OK) { + APP_LOGE("failed, errCode: %{public}d", ret); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode ResourceHelper::InnerGetAllLauncherAbilityResourceInfo(uint32_t flags, + std::vector &launcherAbilityResourceInfos) +{ + auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); + if (bundleResourceProxy == nullptr) { + APP_LOGE("bundleResourceProxy is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = bundleResourceProxy->GetAllLauncherAbilityResourceInfo(flags, launcherAbilityResourceInfos); + if (ret != ERR_OK) { + APP_LOGE("failed, errCode: %{public}d", ret); + } + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode ResourceHelper::InnerGetExtensionAbilityResourceInfo(const std::string& bundleName, + ExtensionAbilityType extensionAbilityType, uint32_t flags, int32_t appIndex, + std::vector& extensionAbilityResourceInfos) +{ + APP_LOGD("InnerGetExtensionAbilityResourceInfo start"); + auto bundleResourceProxy = ResourceHelper::GetBundleResourceMgr(); + if (bundleResourceProxy == nullptr) { + APP_LOGE("bundleResourceProxy is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode ret = bundleResourceProxy->GetExtensionAbilityResourceInfo( + bundleName, extensionAbilityType, flags, extensionAbilityResourceInfos, appIndex); + if (ret != ERR_OK) { + APP_LOGE("failed, bundleName is %{public}s, errCode: %{public}d", bundleName.c_str(), ret); + } + return CommonFunc::ConvertErrCode(ret); +} } // AppExecFwk } // OHOS \ No newline at end of file diff --git a/interfaces/kits/js/bundle_resource/resource_helper.h b/interfaces/kits/js/bundle_resource/resource_helper.h index 8f30c4d8e6c50309fe0746d06b52cad28e7798e5..b18752b29c02a130c6354bca4d4ed40c02060062 100644 --- a/interfaces/kits/js/bundle_resource/resource_helper.h +++ b/interfaces/kits/js/bundle_resource/resource_helper.h @@ -25,6 +25,17 @@ namespace AppExecFwk { class ResourceHelper { public: static sptr GetBundleResourceMgr(); + static ErrCode InnerGetBundleResourceInfo( + const std::string &bundleName, uint32_t flags, int32_t appIndex, BundleResourceInfo &resourceInfo); + static ErrCode InnerGetLauncherAbilityResourceInfo( + const std::string &bundleName, uint32_t flags, int32_t appIndex, + std::vector &launcherAbilityResourceInfo); + static ErrCode InnerGetAllBundleResourceInfo(uint32_t flags, std::vector &bundleResourceInfos); + static ErrCode InnerGetAllLauncherAbilityResourceInfo(uint32_t flags, + std::vector &launcherAbilityResourceInfos); + static ErrCode InnerGetExtensionAbilityResourceInfo(const std::string& bundleName, + ExtensionAbilityType extensionAbilityType, uint32_t flags, int32_t appIndex, + std::vector& extensionAbilityResourceInfos); private: class BundleResourceMgrDeathRecipient : public IRemoteObject::DeathRecipient { diff --git a/interfaces/kits/js/bundlemgr/bundle_mgr.cpp b/interfaces/kits/js/bundlemgr/bundle_mgr.cpp index 3b4904821de101295e85dba93fa42dfef856efc2..fa55ca85bbe8ee61a71e38292cf5f76910abdf29 100644 --- a/interfaces/kits/js/bundlemgr/bundle_mgr.cpp +++ b/interfaces/kits/js/bundlemgr/bundle_mgr.cpp @@ -101,12 +101,9 @@ enum class InstallErrorCode : uint8_t { const char* IS_SET_APPLICATION_ENABLED = "IsSetApplicationEnabled"; const char* IS_ABILITY_ENABLED = "IsAbilityEnabled"; -const char* GET_LAUNCH_WANT_FOR_BUNDLE = "GetLaunchWantForBundle"; -const char* GET_BUNDLE_ARCHIVE_INFO = "GetBundleArchiveInfo"; const char* GET_ABILITY_ICON = "GetAbilityIcon"; constexpr const char* NAPI_GET_APPLICATION_INFO = "GetApplicationInfo"; const char* GET_ALL_BUNDLE_INFO = "GetAllBundleInfo"; -const char* GET_PERMISSION_DEF = "GetPermissionDef"; const char* QUERY_ABILITY_BY_WANT = "queryAbilityByWant"; const char* TYPE_MISMATCH = "type misMatch"; diff --git a/interfaces/kits/js/common/BUILD.gn b/interfaces/kits/js/common/BUILD.gn index ffc2ee375f8525ec0b7bf512d26e016657aa34a9..5b9d25aa9a89ba259a599fcc3edea31f559a333f 100644 --- a/interfaces/kits/js/common/BUILD.gn +++ b/interfaces/kits/js/common/BUILD.gn @@ -50,7 +50,9 @@ ohos_shared_library("bundle_napi_common") { sources = [ "base_cb_info.cpp", "business_error.cpp", + "business_error_map.cpp", "common_func.cpp", + "installer_helper.cpp", "napi_arg.cpp", ] diff --git a/interfaces/kits/js/common/business_error.cpp b/interfaces/kits/js/common/business_error.cpp index c747fae522ec8951a1abdb69b6417c2e7feb8b24..a4ca06c48d70a404b0d8cefe53c09261f954f457 100644 --- a/interfaces/kits/js/common/business_error.cpp +++ b/interfaces/kits/js/common/business_error.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,281 +18,10 @@ #include #include "bundle_errors.h" +#include "business_error_map.h" namespace OHOS { namespace AppExecFwk { -namespace { -constexpr const char* ERR_MSG_BUSINESS_ERROR = "BusinessError $: "; -constexpr const char* ERR_MSG_PERMISSION_DENIED_ERROR = - "Permission denied. An attempt was made to $ forbidden by permission: $."; -constexpr const char* ERR_MSG_NOT_SYSTEM_APP = - "Permission denied. Non-system APP calling system API"; -constexpr const char* ERR_MSG_PARAM_TYPE_ERROR = "Parameter error. The type of $ must be $."; -constexpr const char* ERR_MSG_ABILITY_NOT_SUPPORTED = - "Capability not supported. Function $ can not work correctly due to limited device capabilities."; -constexpr const char* ERR_MSG_BUNDLE_NOT_EXIST = "The specified bundle is not found."; -constexpr const char* ERR_MSG_MODULE_NOT_EXIST = "The specified module is not found."; -constexpr const char* ERR_MSG_ABILITY_NOT_EXIST = "The specified ability is not found."; -constexpr const char* ERR_MSG_INVALID_USER_ID = "The specified user id is not found."; -constexpr const char* ERR_MSG_APPID_NOT_EXIST = "The specified appId is an empty string."; -constexpr const char* ERR_MSG_APPIDENTIFIER_NOT_EXIST = "The specified appIdentifier is an empty string."; -constexpr const char* ERR_MSG_PERMISSION_NOT_EXIST = "The specified permission is not found."; -constexpr const char* ERR_MSG_DEVICE_ID_NOT_EXIST = "The specified deviceId is not found."; -constexpr const char* ERR_MSG_INVALID_APP_INDEX = "The specified app index is invalid."; -constexpr const char* ERR_MSG_INSTALL_PARSE_FAILED = "Failed to install the hap since the hap fails to be parsed."; -constexpr const char* ERR_MSG_INSTALL_VERIFY_SIGNATURE_FAILED = - "Failed to install the hap since the hap signature fails to be verified."; -constexpr const char* ERR_MSG_INSTALL_HAP_FILEPATH_INVALID = - "Failed to install the hap since the path of the hap is invalid or too large size."; -constexpr const char* ERR_MSG_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT = - "Failed to install haps since the configuration information of multi haps is inconsistent."; -constexpr const char* ERR_MSG_INSTALL_NO_DISK_SPACE_LEFT = - "Failed to install the hap since the system disk space is insufficient."; -constexpr const char* ERR_MSG_INSTALL_VERSION_DOWNGRADE = - "Failed to install the hap since the version of the newly installed hap is too early."; -constexpr const char* ERR_MSG_INSTALL_DEPENDENT_MODULE_NOT_EXIST = - "Failed to install the HAP or HSP because the dependent module does not exist."; -constexpr const char* ERR_MSG_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED = - "Failed to install the HSP due to the lack of required permission."; -constexpr const char* ERR_MSG_UNINSTALL_PREINSTALL_APP_FAILED = "The preinstalled app cannot be uninstalled."; -constexpr const char* ERR_MSG_BUNDLE_NOT_PREINSTALLED = - "Failed to uninstall updates because the HAP is not pre-installed."; -constexpr const char* ERR_ZLIB_SRC_FILE_INVALID_MSG = "The Input source file is invalid."; -constexpr const char* ERR_ZLIB_DEST_FILE_INVALID_MSG = "The Input destination file is invalid."; -constexpr const char* ERR_MSG_PARAM_NUMBER_ERROR = - "BusinessError 401: Parameter error. The number of parameters is incorrect."; -constexpr const char* ERR_MSG_BUNDLE_SERVICE_EXCEPTION = "Bundle manager service is excepted."; -constexpr const char* ERROR_MSG_BUNDLE_IS_DISABLED = "The specified bundle is disabled."; -constexpr const char* ERROR_MSG_ABILITY_IS_DISABLED = "The specified ability is disabled."; -constexpr const char* ERROR_MSG_PROFILE_NOT_EXIST = "The specified profile is not found in the HAP."; -constexpr const char* ERROR_INVALID_UID_MSG = "The specified uid is invalid."; -constexpr const char* ERROR_INVALID_HAP_PATH_MSG = "The input source file is invalid."; -constexpr const char* ERROR_DEFAULT_APP_NOT_EXIST_MSG = "The specified default app does not exist."; -constexpr const char* ERROR_INVALID_TYPE_MSG = "The specified type is invalid."; -constexpr const char* ERROR_MSG_DISTRIBUTED_SERVICE_NOT_RUNNING = "The distributed service is not running."; -constexpr const char* ERROR_ABILITY_AND_TYPE_MISMATCH_MSG = "The specified ability and type do not match."; -constexpr const char* ERROR_MSG_CLEAR_CACHE_FILES_UNSUPPORTED = - "The specified bundle does not support clearing cache files."; -constexpr const char* ERROR_MSG_INSTALL_HAP_OVERLAY_CHECK_FAILED = - "Failed to install the HAP because the overlay check of the HAP failed."; -constexpr const char* ERROR_MSG_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE = - "The specified bundleName is not overlay bundle."; -constexpr const char* ERROR_MSG_SPECIFIED_MODULE_NOT_OVERLAY_MODULE = - "The specified moduleName is not overlay module."; -constexpr const char* ERROR_MSG_SPECIFIED_MODULE_IS_OVERLAY_MODULE = - "The specified moduleName is overlay module."; -constexpr const char* ERROR_MSG_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE = - "The specified bundle is overlay bundle."; -constexpr const char* ERROR_MSG_SHARE_APP_LIBRARY_IS_RELIED = - "The version of the shared bundle is dependent on other applications."; -constexpr const char* ERROR_MSG_SHARE_APP_LIBRARY_IS_NOT_EXIST = - "The specified shared library is not exist"; -constexpr const char* ERR_MSG_UNINSTALL_SHARED_LIBRARY = - "The specified bundle is shared library"; -constexpr const char* ERR_MSG_DISALLOW_INSTALL = - "Failed to install the HAP because the installation is forbidden by enterprise device management."; -constexpr const char* ERR_MSG_WRONG_PROXY_DATA_URI = - "The uri in data proxy is wrong"; -constexpr const char* ERR_MSG_WRONG_PROXY_DATA_PERMISSION = - "The apl of required permission in non-system data proxy should be system_basic or system_core"; -constexpr const char* ERR_MSG_WRONG_MODE_ISOLATION = - "Failed to install the HAP because the isolationMode configured is not supported"; -constexpr const char* ERR_MSG_DISALLOW_UNINSTALL = - "Failed to uninstall the HAP because the uninstall is forbidden by enterprise device management."; -constexpr const char* ERR_MSG_ALREADY_EXIST = - "Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode"; -constexpr const char* ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED_MSG = - "The input source file is not in ZIP format or is damaged."; -constexpr const char* ERR_MSG_CODE_SIGNATURE_FAILED = - "Failed to install the HAP because the code signature verification failed."; -constexpr const char* ERR_MSG_SELF_UPDATE_NOT_MDM = - "Failed to install the HAP because the distribution type of the caller application is not enterprise_mdm."; -constexpr const char* ERR_MSG_SELF_UPDATE_BUNDLENAME_NOT_SAME = - "Failed to install the HAP because the bundleName is different from the bundleName of the caller application."; -constexpr const char* ERR_MSG_ENTERPRISE_BUNDLE_NOT_ALLOWED = - "Failed to install the HAP because an enterprise normal/MDM bundle cannot be installed on non-enterprise devices."; -constexpr const char* ERR_MSG_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED = - "It is not allowed to install the enterprise bundle."; -constexpr const char* ERR_MSG_DEBUG_BUNDLE_NOT_ALLOWED = - "Failed to install the HAP because a debug bundle can be installed only in developer mode."; -constexpr const char* ERR_MSG_ERROR_VERIFY_ABC = "Failed to verify the abc file."; -constexpr const char* ERR_MSG_ERROR_DELETE_ABC = "Failed to delete the abc file."; -constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_ADD_ERROR = "Failed to add extended resources."; -constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_REMOVE_ERROR = "Failed to remove extended resources."; -constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_GET_ERROR = "Failed to obtain extended resources."; -constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_ENABLE_ERROR = "Failed to enable the dynamic icon."; -constexpr const char* ERR_MSG_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES = - "Dynamic icons cannot take effect due to existing custom themes."; -constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_DISABLE_ERROR = "Failed to disable the dynamic icon."; -constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_GET_ERROR = "Failed to obtain the dynamic icon."; -constexpr const char* ERROR_MSG_NOT_APP_GALLERY_CALL = "The caller is not AppGallery."; -constexpr const char* ERROR_MSG_INSTALL_PERMISSION_CHECK_ERROR = - "Failed to install the HAP because the HAP requests wrong permissions."; -constexpr const char* ERR_MSG_INVALID_LINK = "The specified link is invalid."; -constexpr const char* ERR_MSG_SCHEME_NOT_IN_QUERYSCHEMES = - "The scheme of the specified link is not in the querySchemes."; -constexpr const char* ERR_MSG_INVALID_DEVELOPER_ID = - "The specified developerId is invalid."; -constexpr const char* ERR_MSG_ENUM_ERROR = - "Parameter error. The value of $ is not a valid enum $."; -constexpr const char* ERR_MSG_BUNDLE_CAN_NOT_BE_UNINSTALLED = - "The specified application cannot be uninstalled."; -constexpr const char* ERR_MSG_START_SHORTCUT = - "The ability specified by want in the ShortcutInfo struct cannot be started."; -constexpr const char* ERR_MSG_INSTALL_FAILED_CONTROLLED = - "Failed to install the HAP because the device has been controlled."; -constexpr const char* ERR_MSG_NATIVE_INSTALL_FAILED = - "Failed to install the HAP because installing the native package failed."; -constexpr const char* ERR_MSG_NATIVE_UNINSTALL_FAILED = - "Failed to uninstall the HAP because uninstalling the native package failed."; -constexpr const char* ERR_MSG_INVALID_APPINDEX = - "The appIndex is invalid."; -constexpr const char* ERROR_MSG_LOCKED_APPLICATION_UNINSTALL = - "Failed to uninstall the app because the app is locked."; -constexpr const char* ERR_MSG_APP_NOT_SUPPORTED_MULTI_TYPE = - "The app does not support the creation of an appClone instance."; -constexpr const char* ERR_MSG_SHORTCUT_ID_ILLEGAL = - "The specified shortcut id is illegal."; -constexpr const char* ERR_MSG_INSTALL_FAILED_INCONSISTENT_SIGNATURE = - "Failed to install the HAP because an application with the same bundle name " - "but different signature information exists on the device."; -constexpr const char* ERR_MSG_INVALID_UNINSTALL_RULE = - "The specified bundleName of want is not the same with caller."; -constexpr const char* ERR_MSG_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL = - "Failed to install the HAP or HSP because the app distribution type is not allowed."; -constexpr const char* ERR_MSG_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED = - "Failed to install the HAP and restore to preinstalled bundle."; -constexpr const char* ERR_MSG_PLUGIN_ID_CHECK_ERROR = - "Failed to install the plugin because the plugin id fails to be verified."; -constexpr const char* ERR_MSG_CHECK_SUPPORT_PERMISSION = - "Failed to install the plugin because the host application lacks ohos.permission.kernel.SUPPORT_PLUGIN."; -constexpr const char* ERROR_MSG_DEVICE_NOT_SUPPORT_PLUGIN = - "Failed to install the plugin because the current device does not support plugin."; -constexpr const char* ERROR_MSG_PLUGIN_ID_PARSE_ERROR = - "Failed to install the plugin because the plugin id fails to be parsed."; -constexpr const char* ERROR_MSG_PLUGIN_NOT_FOUND = - "Failed to uninstall the plugin because the specified plugin is not found."; -constexpr const char* ERROR_MSG_PLUGIN_SAME_BUNDLE_NAME = - "Failed to install the plugin because the plugin name is same as host bundle name."; -constexpr const char* ERROR_MSG_INSTALL_FILE_IS_SHARED_LIBRARY = - "Failed to install because disallow install a shared bundle by hapFilePaths."; -constexpr const char* ERROR_MSG_SOURCE_PATHS_AREINVALID = - "The source paths are invalid."; -constexpr const char* ERROR_MSG_DESTINATION_PATHS_AREINVALID = - "The destination path is invalid."; -constexpr const char* ERROR_MSG_USER_AUTHENTICATION_FAILED = - "User authentication failed."; -constexpr const char* ERROR_MSG_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT = - "Waiting for user authentication timeout."; -constexpr const char* ERROR_MSG_SOURCE_PATH_ACCESS_FAILED = - "There are inaccessible path in the source paths."; -constexpr const char* ERROR_MSG_DESTINATION_PATH_ACCESS_FAILED = - "The destination path cannot be accessed."; -constexpr const char* ERROR_MSG_DATA_MIGRATION_COPY_FAILED = - "System error occurred during copy execution."; - -static std::unordered_map ERR_MSG_MAP = { - { ERROR_PERMISSION_DENIED_ERROR, ERR_MSG_PERMISSION_DENIED_ERROR }, - { ERROR_NOT_SYSTEM_APP, ERR_MSG_NOT_SYSTEM_APP }, - { ERROR_PARAM_CHECK_ERROR, ERR_MSG_PARAM_TYPE_ERROR }, - { ERROR_SYSTEM_ABILITY_NOT_FOUND, ERR_MSG_ABILITY_NOT_SUPPORTED }, - { ERROR_BUNDLE_NOT_EXIST, ERR_MSG_BUNDLE_NOT_EXIST }, - { ERROR_MODULE_NOT_EXIST, ERR_MSG_MODULE_NOT_EXIST }, - { ERROR_ABILITY_NOT_EXIST, ERR_MSG_ABILITY_NOT_EXIST }, - { ERROR_INVALID_USER_ID, ERR_MSG_INVALID_USER_ID }, - { ERROR_INVALID_APPID, ERR_MSG_APPID_NOT_EXIST }, - { ERROR_INVALID_APPIDENTIFIER, ERR_MSG_APPIDENTIFIER_NOT_EXIST }, - { ERROR_INVALID_APPINDEX, ERR_MSG_INVALID_APP_INDEX }, - { ERROR_PERMISSION_NOT_EXIST, ERR_MSG_PERMISSION_NOT_EXIST }, - { ERROR_DEVICE_ID_NOT_EXIST, ERR_MSG_DEVICE_ID_NOT_EXIST }, - { ERROR_INSTALL_PARSE_FAILED, ERR_MSG_INSTALL_PARSE_FAILED }, - { ERROR_INSTALL_VERIFY_SIGNATURE_FAILED, ERR_MSG_INSTALL_VERIFY_SIGNATURE_FAILED }, - { ERROR_INSTALL_HAP_FILEPATH_INVALID, ERR_MSG_INSTALL_HAP_FILEPATH_INVALID }, - { ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT, ERR_MSG_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { ERROR_INSTALL_NO_DISK_SPACE_LEFT, ERR_MSG_INSTALL_NO_DISK_SPACE_LEFT }, - { ERROR_INSTALL_VERSION_DOWNGRADE, ERR_MSG_INSTALL_VERSION_DOWNGRADE }, - { ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST, ERR_MSG_INSTALL_DEPENDENT_MODULE_NOT_EXIST }, - { ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED, ERR_MSG_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED }, - { ERROR_UNINSTALL_PREINSTALL_APP_FAILED, ERR_MSG_UNINSTALL_PREINSTALL_APP_FAILED }, - { ERROR_BUNDLE_NOT_PREINSTALLED, ERR_MSG_BUNDLE_NOT_PREINSTALLED }, - { ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION }, - { ERR_ZLIB_SRC_FILE_INVALID, ERR_ZLIB_SRC_FILE_INVALID_MSG }, - { ERR_ZLIB_DEST_FILE_INVALID, ERR_ZLIB_DEST_FILE_INVALID_MSG }, - { ERROR_BUNDLE_IS_DISABLED, ERROR_MSG_BUNDLE_IS_DISABLED }, - { ERROR_ABILITY_IS_DISABLED, ERROR_MSG_ABILITY_IS_DISABLED }, - { ERROR_PROFILE_NOT_EXIST, ERROR_MSG_PROFILE_NOT_EXIST }, - { ERROR_INVALID_UID, ERROR_INVALID_UID_MSG }, - { ERROR_INVALID_HAP_PATH, ERROR_INVALID_HAP_PATH_MSG }, - { ERROR_DEFAULT_APP_NOT_EXIST, ERROR_DEFAULT_APP_NOT_EXIST_MSG }, - { ERROR_INVALID_TYPE, ERROR_INVALID_TYPE_MSG }, - { ERROR_DISTRIBUTED_SERVICE_NOT_RUNNING, ERROR_MSG_DISTRIBUTED_SERVICE_NOT_RUNNING }, - { ERROR_ABILITY_AND_TYPE_MISMATCH, ERROR_ABILITY_AND_TYPE_MISMATCH_MSG }, - { ERROR_CLEAR_CACHE_FILES_UNSUPPORTED, ERROR_MSG_CLEAR_CACHE_FILES_UNSUPPORTED }, - { ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED, ERROR_MSG_INSTALL_HAP_OVERLAY_CHECK_FAILED }, - { ERROR_SPECIFIED_MODULE_NOT_OVERLAY_MODULE, ERROR_MSG_SPECIFIED_MODULE_NOT_OVERLAY_MODULE }, - { ERROR_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE, ERROR_MSG_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE }, - { ERROR_SPECIFIED_MODULE_IS_OVERLAY_MODULE, ERROR_MSG_SPECIFIED_MODULE_IS_OVERLAY_MODULE }, - { ERROR_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE, ERROR_MSG_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE }, - { ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED, ERROR_MSG_SHARE_APP_LIBRARY_IS_RELIED }, - { ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST, ERROR_MSG_SHARE_APP_LIBRARY_IS_NOT_EXIST }, - { ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE, ERR_MSG_UNINSTALL_SHARED_LIBRARY }, - { ERROR_DISALLOW_INSTALL, ERR_MSG_DISALLOW_INSTALL }, - { ERROR_INSTALL_WRONG_DATA_PROXY_URI, ERR_MSG_WRONG_PROXY_DATA_URI }, - { ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION, ERR_MSG_WRONG_PROXY_DATA_PERMISSION }, - { ERROR_INSTALL_WRONG_MODE_ISOLATION, ERR_MSG_WRONG_MODE_ISOLATION }, - { ERROR_DISALLOW_UNINSTALL, ERR_MSG_DISALLOW_UNINSTALL }, - { ERROR_INSTALL_ALREADY_EXIST, ERR_MSG_ALREADY_EXIST }, - { ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED, ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED_MSG }, - { ERROR_INSTALL_CODE_SIGNATURE_FAILED, ERR_MSG_CODE_SIGNATURE_FAILED }, - { ERROR_INSTALL_SELF_UPDATE_NOT_MDM, ERR_MSG_SELF_UPDATE_NOT_MDM}, - { ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME, ERR_MSG_SELF_UPDATE_BUNDLENAME_NOT_SAME}, - { ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED, ERR_MSG_ENTERPRISE_BUNDLE_NOT_ALLOWED }, - { ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR, ERR_MSG_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED }, - { ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED, ERR_MSG_DEBUG_BUNDLE_NOT_ALLOWED}, - { ERROR_VERIFY_ABC, ERR_MSG_ERROR_VERIFY_ABC}, - { ERROR_NOT_APP_GALLERY_CALL, ERROR_MSG_NOT_APP_GALLERY_CALL}, - { ERROR_DELETE_ABC, ERR_MSG_ERROR_DELETE_ABC}, - { ERROR_ADD_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_ADD_ERROR}, - { ERROR_REMOVE_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_REMOVE_ERROR}, - { ERROR_GET_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_GET_ERROR}, - { ERROR_ENABLE_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_ENABLE_ERROR}, - { ERROR_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES, - ERR_MSG_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES}, - { ERROR_DISABLE_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_DISABLE_ERROR}, - { ERROR_GET_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_GET_ERROR}, - { ERROR_INSTALL_PERMISSION_CHECK_ERROR, ERROR_MSG_INSTALL_PERMISSION_CHECK_ERROR}, - { ERROR_INVALID_LINK, ERR_MSG_INVALID_LINK }, - { ERROR_SCHEME_NOT_IN_QUERYSCHEMES, ERR_MSG_SCHEME_NOT_IN_QUERYSCHEMES }, - { ERROR_INVALID_DEVELOPERID, ERR_MSG_INVALID_DEVELOPER_ID }, - { ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED, ERR_MSG_BUNDLE_CAN_NOT_BE_UNINSTALLED }, - { ERROR_START_SHORTCUT_ERROR, ERR_MSG_START_SHORTCUT }, - { ERROR_INSTALL_FAILED_CONTROLLED, ERR_MSG_INSTALL_FAILED_CONTROLLED }, - { ERROR_INSTALL_NATIVE_FAILED, ERR_MSG_NATIVE_INSTALL_FAILED }, - { ERROR_UNINSTALL_NATIVE_FAILED, ERR_MSG_NATIVE_UNINSTALL_FAILED }, - { ERROR_INVALID_APPINDEX, ERR_MSG_INVALID_APPINDEX }, - { ERROR_APPLICATION_UNINSTALL, ERROR_MSG_LOCKED_APPLICATION_UNINSTALL }, - { ERROR_APP_NOT_SUPPORTED_MULTI_TYPE, ERR_MSG_APP_NOT_SUPPORTED_MULTI_TYPE }, - { ERROR_SHORTCUT_ID_ILLEGAL_ERROR, ERR_MSG_SHORTCUT_ID_ILLEGAL }, - { ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE, ERR_MSG_INSTALL_FAILED_INCONSISTENT_SIGNATURE }, - { ERROR_INVALID_UNINSTALL_RULE, ERR_MSG_INVALID_UNINSTALL_RULE }, - { ERROR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL, ERR_MSG_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL }, - { ERROR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED, ERR_MSG_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED }, - { ERROR_PLUGIN_ID_CHECK_ERROR, ERR_MSG_PLUGIN_ID_CHECK_ERROR}, - { ERROR_CHECK_SUPPORT_PERMISSION, ERR_MSG_CHECK_SUPPORT_PERMISSION}, - { ERROR_DEVICE_NOT_SUPPORT_PLUGIN, ERROR_MSG_DEVICE_NOT_SUPPORT_PLUGIN}, - { ERROR_PLUGIN_ID_PARSE_ERROR, ERROR_MSG_PLUGIN_ID_PARSE_ERROR }, - { ERROR_PLUGIN_NOT_FOUND, ERROR_MSG_PLUGIN_NOT_FOUND }, - { ERROR_PLUGIN_SAME_BUNDLE_NAME, ERROR_MSG_PLUGIN_SAME_BUNDLE_NAME}, - { ERROR_INSTALL_FILE_IS_SHARED_LIBRARY, ERROR_MSG_INSTALL_FILE_IS_SHARED_LIBRARY}, - { ERROR_SOURCE_PATHS_AREINVALID, ERROR_MSG_SOURCE_PATHS_AREINVALID}, - { ERROR_DESTINATION_PATHS_AREINVALID, ERROR_MSG_DESTINATION_PATHS_AREINVALID}, - { ERROR_USER_AUTHENTICATION_FAILED, ERROR_MSG_USER_AUTHENTICATION_FAILED}, - { ERROR_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT, ERROR_MSG_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT}, - { ERROR_SOURCE_PATH_ACCESS_FAILED, ERROR_MSG_SOURCE_PATH_ACCESS_FAILED}, - { ERROR_DESTINATION_PATH_ACCESS_FAILED, ERROR_MSG_DESTINATION_PATH_ACCESS_FAILED}, - { ERROR_DATA_MIGRATION_COPY_FAILED, ERROR_MSG_DATA_MIGRATION_COPY_FAILED} -}; -} // namespace void BusinessError::ThrowError(napi_env env, int32_t err, const std::string &msg) { @@ -309,7 +38,7 @@ void BusinessError::ThrowParameterTypeError(napi_env env, int32_t err, void BusinessError::ThrowTooFewParametersError(napi_env env, int32_t err) { - ThrowError(env, err, ERR_MSG_PARAM_NUMBER_ERROR); + ThrowError(env, err, BusinessErrorNS::ERR_MSG_PARAM_NUMBER_ERROR); } napi_value BusinessError::CreateError(napi_env env, int32_t err, const std::string& msg) @@ -327,13 +56,15 @@ napi_value BusinessError::CreateError(napi_env env, int32_t err, const std::stri napi_value BusinessError::CreateCommonError( napi_env env, int32_t err, const std::string &functionName, const std::string &permissionName) { - std::string errMessage = ERR_MSG_BUSINESS_ERROR; + std::string errMessage = BusinessErrorNS::ERR_MSG_BUSINESS_ERROR; auto iter = errMessage.find("$"); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, std::to_string(err)); } - if (ERR_MSG_MAP.find(err) != ERR_MSG_MAP.end()) { - errMessage += ERR_MSG_MAP[err]; + std::unordered_map errMap; + BusinessErrorMap::GetErrMap(errMap); + if (errMap.find(err) != errMap.end()) { + errMessage += errMap[err]; } iter = errMessage.find("$"); if (iter != std::string::npos) { @@ -350,13 +81,15 @@ napi_value BusinessError::CreateInstallError( napi_env env, int32_t err, int32_t innerCode, const std::string &functionName, const std::string &permissionName) { - std::string errMessage = ERR_MSG_BUSINESS_ERROR; + std::string errMessage = BusinessErrorNS::ERR_MSG_BUSINESS_ERROR; auto iter = errMessage.find("$"); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, std::to_string(err)); } - if (ERR_MSG_MAP.find(err) != ERR_MSG_MAP.end()) { - errMessage += ERR_MSG_MAP[err]; + std::unordered_map errMap; + BusinessErrorMap::GetErrMap(errMap); + if (errMap.find(err) != errMap.end()) { + errMessage += errMap[err]; } errMessage += "[" + std::to_string(innerCode) + "]"; iter = errMessage.find("$"); @@ -380,12 +113,12 @@ void BusinessError::ThrowEnumError(napi_env env, napi_value BusinessError::CreateEnumError(napi_env env, const std::string ¶meter, const std::string &enumClass) { - std::string errMessage = ERR_MSG_BUSINESS_ERROR; + std::string errMessage = BusinessErrorNS::ERR_MSG_BUSINESS_ERROR; auto iter = errMessage.find("$"); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, std::to_string(ERROR_PARAM_CHECK_ERROR)); } - errMessage += ERR_MSG_ENUM_ERROR; + errMessage += BusinessErrorNS::ERR_MSG_ENUM_ERROR; iter = errMessage.find("$"); if (iter != std::string::npos) { errMessage = errMessage.replace(iter, 1, parameter); diff --git a/interfaces/kits/js/common/business_error_map.cpp b/interfaces/kits/js/common/business_error_map.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2cbb6bbc90a6423bcfa33294db58fc90d0e1ac45 --- /dev/null +++ b/interfaces/kits/js/common/business_error_map.cpp @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "business_error_map.h" + +#include + +#include "bundle_errors.h" + +namespace OHOS { +namespace AppExecFwk { +namespace { +constexpr const char* ERR_MSG_PERMISSION_DENIED_ERROR = + "Permission denied. An attempt was made to $ forbidden by permission: $."; +constexpr const char* ERR_MSG_NOT_SYSTEM_APP = + "Permission denied. Non-system APP calling system API"; +constexpr const char* ERR_MSG_PARAM_TYPE_ERROR = "Parameter error. The type of $ must be $."; +constexpr const char* ERR_MSG_ABILITY_NOT_SUPPORTED = + "Capability not supported. Function $ can not work correctly due to limited device capabilities."; +constexpr const char* ERR_MSG_BUNDLE_NOT_EXIST = "The specified bundle is not found."; +constexpr const char* ERR_MSG_MODULE_NOT_EXIST = "The specified module is not found."; +constexpr const char* ERR_MSG_ABILITY_NOT_EXIST = "The specified ability is not found."; +constexpr const char* ERR_MSG_INVALID_USER_ID = "The specified user id is not found."; +constexpr const char* ERR_MSG_APPID_NOT_EXIST = "The specified appId is an empty string."; +constexpr const char* ERR_MSG_APPIDENTIFIER_NOT_EXIST = "The specified appIdentifier is an empty string."; +constexpr const char* ERR_MSG_PERMISSION_NOT_EXIST = "The specified permission is not found."; +constexpr const char* ERR_MSG_DEVICE_ID_NOT_EXIST = "The specified deviceId is not found."; +constexpr const char* ERR_MSG_INVALID_APP_INDEX = "The specified app index is invalid."; +constexpr const char* ERR_MSG_INSTALL_PARSE_FAILED = "Failed to install the hap since the hap fails to be parsed."; +constexpr const char* ERR_MSG_INSTALL_VERIFY_SIGNATURE_FAILED = + "Failed to install the hap since the hap signature fails to be verified."; +constexpr const char* ERR_MSG_INSTALL_HAP_FILEPATH_INVALID = + "Failed to install the hap since the path of the hap is invalid or too large size."; +constexpr const char* ERR_MSG_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT = + "Failed to install haps since the configuration information of multi haps is inconsistent."; +constexpr const char* ERR_MSG_INSTALL_NO_DISK_SPACE_LEFT = + "Failed to install the hap since the system disk space is insufficient."; +constexpr const char* ERR_MSG_INSTALL_VERSION_DOWNGRADE = + "Failed to install the hap since the version of the newly installed hap is too early."; +constexpr const char* ERR_MSG_INSTALL_DEPENDENT_MODULE_NOT_EXIST = + "Failed to install the HAP or HSP because the dependent module does not exist."; +constexpr const char* ERR_MSG_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED = + "Failed to install the HSP due to the lack of required permission."; +constexpr const char* ERR_MSG_UNINSTALL_PREINSTALL_APP_FAILED = "The preinstalled app cannot be uninstalled."; +constexpr const char* ERR_MSG_BUNDLE_NOT_PREINSTALLED = + "Failed to uninstall updates because the HAP is not pre-installed."; +constexpr const char* ERR_ZLIB_SRC_FILE_INVALID_MSG = "The Input source file is invalid."; +constexpr const char* ERR_ZLIB_DEST_FILE_INVALID_MSG = "The Input destination file is invalid."; +constexpr const char* ERR_MSG_BUNDLE_SERVICE_EXCEPTION = "Bundle manager service is excepted."; +constexpr const char* ERROR_MSG_BUNDLE_IS_DISABLED = "The specified bundle is disabled."; +constexpr const char* ERROR_MSG_ABILITY_IS_DISABLED = "The specified ability is disabled."; +constexpr const char* ERROR_MSG_PROFILE_NOT_EXIST = "The specified profile is not found in the HAP."; +constexpr const char* ERROR_INVALID_UID_MSG = "The specified uid is invalid."; +constexpr const char* ERROR_INVALID_HAP_PATH_MSG = "The input source file is invalid."; +constexpr const char* ERROR_DEFAULT_APP_NOT_EXIST_MSG = "The specified default app does not exist."; +constexpr const char* ERROR_INVALID_TYPE_MSG = "The specified type is invalid."; +constexpr const char* ERROR_MSG_DISTRIBUTED_SERVICE_NOT_RUNNING = "The distributed service is not running."; +constexpr const char* ERROR_ABILITY_AND_TYPE_MISMATCH_MSG = "The specified ability and type do not match."; +constexpr const char* ERROR_MSG_CLEAR_CACHE_FILES_UNSUPPORTED = + "The specified bundle does not support clearing cache files."; +constexpr const char* ERROR_MSG_INSTALL_HAP_OVERLAY_CHECK_FAILED = + "Failed to install the HAP because the overlay check of the HAP failed."; +constexpr const char* ERROR_MSG_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE = + "The specified bundleName is not overlay bundle."; +constexpr const char* ERROR_MSG_SPECIFIED_MODULE_NOT_OVERLAY_MODULE = + "The specified moduleName is not overlay module."; +constexpr const char* ERROR_MSG_SPECIFIED_MODULE_IS_OVERLAY_MODULE = + "The specified moduleName is overlay module."; +constexpr const char* ERROR_MSG_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE = + "The specified bundle is overlay bundle."; +constexpr const char* ERROR_MSG_SHARE_APP_LIBRARY_IS_RELIED = + "The version of the shared bundle is dependent on other applications."; +constexpr const char* ERROR_MSG_SHARE_APP_LIBRARY_IS_NOT_EXIST = + "The specified shared library is not exist"; +constexpr const char* ERR_MSG_UNINSTALL_SHARED_LIBRARY = + "The specified bundle is shared library"; +constexpr const char* ERR_MSG_DISALLOW_INSTALL = + "Failed to install the HAP because the installation is forbidden by enterprise device management."; +constexpr const char* ERR_MSG_WRONG_PROXY_DATA_URI = + "The uri in data proxy is wrong"; +constexpr const char* ERR_MSG_WRONG_PROXY_DATA_PERMISSION = + "The apl of required permission in non-system data proxy should be system_basic or system_core"; +constexpr const char* ERR_MSG_WRONG_MODE_ISOLATION = + "Failed to install the HAP because the isolationMode configured is not supported"; +constexpr const char* ERR_MSG_DISALLOW_UNINSTALL = + "Failed to uninstall the HAP because the uninstall is forbidden by enterprise device management."; +constexpr const char* ERR_MSG_ALREADY_EXIST = + "Failed to install the HAP because the VersionCode to be updated is not greater than the current VersionCode"; +constexpr const char* ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED_MSG = + "The input source file is not in ZIP format or is damaged."; +constexpr const char* ERR_MSG_CODE_SIGNATURE_FAILED = + "Failed to install the HAP because the code signature verification failed."; +constexpr const char* ERR_MSG_SELF_UPDATE_NOT_MDM = + "Failed to install the HAP because the distribution type of the caller application is not enterprise_mdm."; +constexpr const char* ERR_MSG_SELF_UPDATE_BUNDLENAME_NOT_SAME = + "Failed to install the HAP because the bundleName is different from the bundleName of the caller application."; +constexpr const char* ERR_MSG_ENTERPRISE_BUNDLE_NOT_ALLOWED = + "Failed to install the HAP because an enterprise normal/MDM bundle cannot be installed on non-enterprise devices."; +constexpr const char* ERR_MSG_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED = + "It is not allowed to install the enterprise bundle."; +constexpr const char* ERR_MSG_DEBUG_BUNDLE_NOT_ALLOWED = + "Failed to install the HAP because a debug bundle can be installed only in developer mode."; +constexpr const char* ERR_MSG_ERROR_VERIFY_ABC = "Failed to verify the abc file."; +constexpr const char* ERR_MSG_ERROR_DELETE_ABC = "Failed to delete the abc file."; +constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_ADD_ERROR = "Failed to add extended resources."; +constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_REMOVE_ERROR = "Failed to remove extended resources."; +constexpr const char* ERR_MSG_ERROR_EXT_RESOURCE_GET_ERROR = "Failed to obtain extended resources."; +constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_ENABLE_ERROR = "Failed to enable the dynamic icon."; +constexpr const char* ERR_MSG_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES = + "Dynamic icons cannot take effect due to existing custom themes."; +constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_DISABLE_ERROR = "Failed to disable the dynamic icon."; +constexpr const char* ERR_MSG_ERROR_DYNAMIC_ICON_GET_ERROR = "Failed to obtain the dynamic icon."; +constexpr const char* ERROR_MSG_NOT_APP_GALLERY_CALL = "The caller is not AppGallery."; +constexpr const char* ERROR_MSG_INSTALL_PERMISSION_CHECK_ERROR = + "Failed to install the HAP because the HAP requests wrong permissions."; +constexpr const char* ERR_MSG_INVALID_LINK = "The specified link is invalid."; +constexpr const char* ERR_MSG_SCHEME_NOT_IN_QUERYSCHEMES = + "The scheme of the specified link is not in the querySchemes."; +constexpr const char* ERR_MSG_INVALID_DEVELOPER_ID = + "The specified developerId is invalid."; +constexpr const char* ERR_MSG_BUNDLE_CAN_NOT_BE_UNINSTALLED = + "The specified application cannot be uninstalled."; +constexpr const char* ERR_MSG_START_SHORTCUT = + "The ability specified by want in the ShortcutInfo struct cannot be started."; +constexpr const char* ERR_MSG_INSTALL_FAILED_CONTROLLED = + "Failed to install the HAP because the device has been controlled."; +constexpr const char* ERR_MSG_NATIVE_INSTALL_FAILED = + "Failed to install the HAP because installing the native package failed."; +constexpr const char* ERR_MSG_NATIVE_UNINSTALL_FAILED = + "Failed to uninstall the HAP because uninstalling the native package failed."; +constexpr const char* ERR_MSG_INVALID_APPINDEX = + "The appIndex is invalid."; +constexpr const char* ERROR_MSG_LOCKED_APPLICATION_UNINSTALL = + "Failed to uninstall the app because the app is locked."; +constexpr const char* ERR_MSG_APP_NOT_SUPPORTED_MULTI_TYPE = + "The app does not support the creation of an appClone instance."; +constexpr const char* ERR_MSG_SHORTCUT_ID_ILLEGAL = + "The specified shortcut id is illegal."; +constexpr const char* ERR_MSG_INSTALL_FAILED_INCONSISTENT_SIGNATURE = + "Failed to install the HAP because an application with the same bundle name " + "but different signature information exists on the device."; +constexpr const char* ERR_MSG_INVALID_UNINSTALL_RULE = + "The specified bundleName of want is not the same with caller."; +constexpr const char* ERR_MSG_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL = + "Failed to install the HAP or HSP because the app distribution type is not allowed."; +constexpr const char* ERR_MSG_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED = + "Failed to install the HAP and restore to preinstalled bundle."; +constexpr const char* ERR_MSG_PLUGIN_ID_CHECK_ERROR = + "Failed to install the plugin because the plugin id fails to be verified."; +constexpr const char* ERR_MSG_CHECK_SUPPORT_PERMISSION = + "Failed to install the plugin because the host application lacks ohos.permission.kernel.SUPPORT_PLUGIN."; +constexpr const char* ERROR_MSG_DEVICE_NOT_SUPPORT_PLUGIN = + "Failed to install the plugin because the current device does not support plugin."; +constexpr const char* ERROR_MSG_PLUGIN_ID_PARSE_ERROR = + "Failed to install the plugin because the plugin id fails to be parsed."; +constexpr const char* ERROR_MSG_PLUGIN_NOT_FOUND = + "Failed to uninstall the plugin because the specified plugin is not found."; +constexpr const char* ERROR_MSG_PLUGIN_SAME_BUNDLE_NAME = + "Failed to install the plugin because the plugin name is same as host bundle name."; +constexpr const char* ERROR_MSG_INSTALL_FILE_IS_SHARED_LIBRARY = + "Failed to install because disallow install a shared bundle by hapFilePaths."; +constexpr const char* ERROR_MSG_SOURCE_PATHS_AREINVALID = + "The source paths are invalid."; +constexpr const char* ERROR_MSG_DESTINATION_PATHS_AREINVALID = + "The destination path is invalid."; +constexpr const char* ERROR_MSG_USER_AUTHENTICATION_FAILED = + "User authentication failed."; +constexpr const char* ERROR_MSG_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT = + "Waiting for user authentication timeout."; +constexpr const char* ERROR_MSG_SOURCE_PATH_ACCESS_FAILED = + "There are inaccessible path in the source paths."; +constexpr const char* ERROR_MSG_DESTINATION_PATH_ACCESS_FAILED = + "The destination path cannot be accessed."; +constexpr const char* ERROR_MSG_DATA_MIGRATION_COPY_FAILED = + "System error occurred during copy execution."; + +static std::unordered_map ERR_MSG_MAP = { + { ERROR_PERMISSION_DENIED_ERROR, ERR_MSG_PERMISSION_DENIED_ERROR }, + { ERROR_NOT_SYSTEM_APP, ERR_MSG_NOT_SYSTEM_APP }, + { ERROR_PARAM_CHECK_ERROR, ERR_MSG_PARAM_TYPE_ERROR }, + { ERROR_SYSTEM_ABILITY_NOT_FOUND, ERR_MSG_ABILITY_NOT_SUPPORTED }, + { ERROR_BUNDLE_NOT_EXIST, ERR_MSG_BUNDLE_NOT_EXIST }, + { ERROR_MODULE_NOT_EXIST, ERR_MSG_MODULE_NOT_EXIST }, + { ERROR_ABILITY_NOT_EXIST, ERR_MSG_ABILITY_NOT_EXIST }, + { ERROR_INVALID_USER_ID, ERR_MSG_INVALID_USER_ID }, + { ERROR_INVALID_APPID, ERR_MSG_APPID_NOT_EXIST }, + { ERROR_INVALID_APPIDENTIFIER, ERR_MSG_APPIDENTIFIER_NOT_EXIST }, + { ERROR_INVALID_APPINDEX, ERR_MSG_INVALID_APP_INDEX }, + { ERROR_PERMISSION_NOT_EXIST, ERR_MSG_PERMISSION_NOT_EXIST }, + { ERROR_DEVICE_ID_NOT_EXIST, ERR_MSG_DEVICE_ID_NOT_EXIST }, + { ERROR_INSTALL_PARSE_FAILED, ERR_MSG_INSTALL_PARSE_FAILED }, + { ERROR_INSTALL_VERIFY_SIGNATURE_FAILED, ERR_MSG_INSTALL_VERIFY_SIGNATURE_FAILED }, + { ERROR_INSTALL_HAP_FILEPATH_INVALID, ERR_MSG_INSTALL_HAP_FILEPATH_INVALID }, + { ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT, ERR_MSG_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { ERROR_INSTALL_NO_DISK_SPACE_LEFT, ERR_MSG_INSTALL_NO_DISK_SPACE_LEFT }, + { ERROR_INSTALL_VERSION_DOWNGRADE, ERR_MSG_INSTALL_VERSION_DOWNGRADE }, + { ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST, ERR_MSG_INSTALL_DEPENDENT_MODULE_NOT_EXIST }, + { ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED, ERR_MSG_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED }, + { ERROR_UNINSTALL_PREINSTALL_APP_FAILED, ERR_MSG_UNINSTALL_PREINSTALL_APP_FAILED }, + { ERROR_BUNDLE_NOT_PREINSTALLED, ERR_MSG_BUNDLE_NOT_PREINSTALLED }, + { ERROR_BUNDLE_SERVICE_EXCEPTION, ERR_MSG_BUNDLE_SERVICE_EXCEPTION }, + { ERR_ZLIB_SRC_FILE_INVALID, ERR_ZLIB_SRC_FILE_INVALID_MSG }, + { ERR_ZLIB_DEST_FILE_INVALID, ERR_ZLIB_DEST_FILE_INVALID_MSG }, + { ERROR_BUNDLE_IS_DISABLED, ERROR_MSG_BUNDLE_IS_DISABLED }, + { ERROR_ABILITY_IS_DISABLED, ERROR_MSG_ABILITY_IS_DISABLED }, + { ERROR_PROFILE_NOT_EXIST, ERROR_MSG_PROFILE_NOT_EXIST }, + { ERROR_INVALID_UID, ERROR_INVALID_UID_MSG }, + { ERROR_INVALID_HAP_PATH, ERROR_INVALID_HAP_PATH_MSG }, + { ERROR_DEFAULT_APP_NOT_EXIST, ERROR_DEFAULT_APP_NOT_EXIST_MSG }, + { ERROR_INVALID_TYPE, ERROR_INVALID_TYPE_MSG }, + { ERROR_DISTRIBUTED_SERVICE_NOT_RUNNING, ERROR_MSG_DISTRIBUTED_SERVICE_NOT_RUNNING }, + { ERROR_ABILITY_AND_TYPE_MISMATCH, ERROR_ABILITY_AND_TYPE_MISMATCH_MSG }, + { ERROR_CLEAR_CACHE_FILES_UNSUPPORTED, ERROR_MSG_CLEAR_CACHE_FILES_UNSUPPORTED }, + { ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED, ERROR_MSG_INSTALL_HAP_OVERLAY_CHECK_FAILED }, + { ERROR_SPECIFIED_MODULE_NOT_OVERLAY_MODULE, ERROR_MSG_SPECIFIED_MODULE_NOT_OVERLAY_MODULE }, + { ERROR_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE, ERROR_MSG_SPECIFIED_BUNDLE_NOT_OVERLAY_BUNDLE }, + { ERROR_SPECIFIED_MODULE_IS_OVERLAY_MODULE, ERROR_MSG_SPECIFIED_MODULE_IS_OVERLAY_MODULE }, + { ERROR_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE, ERROR_MSG_SPECIFIED_BUNDLE_IS_OVERLAY_BUNDLE }, + { ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED, ERROR_MSG_SHARE_APP_LIBRARY_IS_RELIED }, + { ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST, ERROR_MSG_SHARE_APP_LIBRARY_IS_NOT_EXIST }, + { ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE, ERR_MSG_UNINSTALL_SHARED_LIBRARY }, + { ERROR_DISALLOW_INSTALL, ERR_MSG_DISALLOW_INSTALL }, + { ERROR_INSTALL_WRONG_DATA_PROXY_URI, ERR_MSG_WRONG_PROXY_DATA_URI }, + { ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION, ERR_MSG_WRONG_PROXY_DATA_PERMISSION }, + { ERROR_INSTALL_WRONG_MODE_ISOLATION, ERR_MSG_WRONG_MODE_ISOLATION }, + { ERROR_DISALLOW_UNINSTALL, ERR_MSG_DISALLOW_UNINSTALL }, + { ERROR_INSTALL_ALREADY_EXIST, ERR_MSG_ALREADY_EXIST }, + { ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED, ERR_ZLIB_SRC_FILE_FORMAT_ERROR_OR_DAMAGED_MSG }, + { ERROR_INSTALL_CODE_SIGNATURE_FAILED, ERR_MSG_CODE_SIGNATURE_FAILED }, + { ERROR_INSTALL_SELF_UPDATE_NOT_MDM, ERR_MSG_SELF_UPDATE_NOT_MDM}, + { ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME, ERR_MSG_SELF_UPDATE_BUNDLENAME_NOT_SAME}, + { ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED, ERR_MSG_ENTERPRISE_BUNDLE_NOT_ALLOWED }, + { ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR, ERR_MSG_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED }, + { ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED, ERR_MSG_DEBUG_BUNDLE_NOT_ALLOWED}, + { ERROR_VERIFY_ABC, ERR_MSG_ERROR_VERIFY_ABC}, + { ERROR_NOT_APP_GALLERY_CALL, ERROR_MSG_NOT_APP_GALLERY_CALL}, + { ERROR_DELETE_ABC, ERR_MSG_ERROR_DELETE_ABC}, + { ERROR_ADD_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_ADD_ERROR}, + { ERROR_REMOVE_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_REMOVE_ERROR}, + { ERROR_GET_EXTEND_RESOURCE, ERR_MSG_ERROR_EXT_RESOURCE_GET_ERROR}, + { ERROR_ENABLE_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_ENABLE_ERROR}, + { ERROR_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES, + ERR_MSG_ENABLE_DYNAMIC_ICON_DUE_TO_EXISTING_CUSTOM_THEMES}, + { ERROR_DISABLE_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_DISABLE_ERROR}, + { ERROR_GET_DYNAMIC_ICON, ERR_MSG_ERROR_DYNAMIC_ICON_GET_ERROR}, + { ERROR_INSTALL_PERMISSION_CHECK_ERROR, ERROR_MSG_INSTALL_PERMISSION_CHECK_ERROR}, + { ERROR_INVALID_LINK, ERR_MSG_INVALID_LINK }, + { ERROR_SCHEME_NOT_IN_QUERYSCHEMES, ERR_MSG_SCHEME_NOT_IN_QUERYSCHEMES }, + { ERROR_INVALID_DEVELOPERID, ERR_MSG_INVALID_DEVELOPER_ID }, + { ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED, ERR_MSG_BUNDLE_CAN_NOT_BE_UNINSTALLED }, + { ERROR_START_SHORTCUT_ERROR, ERR_MSG_START_SHORTCUT }, + { ERROR_INSTALL_FAILED_CONTROLLED, ERR_MSG_INSTALL_FAILED_CONTROLLED }, + { ERROR_INSTALL_NATIVE_FAILED, ERR_MSG_NATIVE_INSTALL_FAILED }, + { ERROR_UNINSTALL_NATIVE_FAILED, ERR_MSG_NATIVE_UNINSTALL_FAILED }, + { ERROR_INVALID_APPINDEX, ERR_MSG_INVALID_APPINDEX }, + { ERROR_APPLICATION_UNINSTALL, ERROR_MSG_LOCKED_APPLICATION_UNINSTALL }, + { ERROR_APP_NOT_SUPPORTED_MULTI_TYPE, ERR_MSG_APP_NOT_SUPPORTED_MULTI_TYPE }, + { ERROR_SHORTCUT_ID_ILLEGAL_ERROR, ERR_MSG_SHORTCUT_ID_ILLEGAL }, + { ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE, ERR_MSG_INSTALL_FAILED_INCONSISTENT_SIGNATURE }, + { ERROR_INVALID_UNINSTALL_RULE, ERR_MSG_INVALID_UNINSTALL_RULE }, + { ERROR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL, ERR_MSG_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL }, + { ERROR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED, ERR_MSG_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED }, + { ERROR_PLUGIN_ID_CHECK_ERROR, ERR_MSG_PLUGIN_ID_CHECK_ERROR}, + { ERROR_CHECK_SUPPORT_PERMISSION, ERR_MSG_CHECK_SUPPORT_PERMISSION}, + { ERROR_DEVICE_NOT_SUPPORT_PLUGIN, ERROR_MSG_DEVICE_NOT_SUPPORT_PLUGIN}, + { ERROR_PLUGIN_ID_PARSE_ERROR, ERROR_MSG_PLUGIN_ID_PARSE_ERROR }, + { ERROR_PLUGIN_NOT_FOUND, ERROR_MSG_PLUGIN_NOT_FOUND }, + { ERROR_PLUGIN_SAME_BUNDLE_NAME, ERROR_MSG_PLUGIN_SAME_BUNDLE_NAME}, + { ERROR_INSTALL_FILE_IS_SHARED_LIBRARY, ERROR_MSG_INSTALL_FILE_IS_SHARED_LIBRARY}, + { ERROR_SOURCE_PATHS_AREINVALID, ERROR_MSG_SOURCE_PATHS_AREINVALID}, + { ERROR_DESTINATION_PATHS_AREINVALID, ERROR_MSG_DESTINATION_PATHS_AREINVALID}, + { ERROR_USER_AUTHENTICATION_FAILED, ERROR_MSG_USER_AUTHENTICATION_FAILED}, + { ERROR_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT, ERROR_MSG_WAITING_FOR_USER_AUTHENTICATION_TIMEOUT}, + { ERROR_SOURCE_PATH_ACCESS_FAILED, ERROR_MSG_SOURCE_PATH_ACCESS_FAILED}, + { ERROR_DESTINATION_PATH_ACCESS_FAILED, ERROR_MSG_DESTINATION_PATH_ACCESS_FAILED}, + { ERROR_DATA_MIGRATION_COPY_FAILED, ERROR_MSG_DATA_MIGRATION_COPY_FAILED} +}; +} // namespace +void BusinessErrorMap::GetErrMap(std::unordered_map& errMap) +{ + errMap = ERR_MSG_MAP; +} +} +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.css b/interfaces/kits/js/common/business_error_map.h old mode 100755 new mode 100644 similarity index 42% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.css rename to interfaces/kits/js/common/business_error_map.h index 01ad739b27f208ff04f21924695104bd27c59df0..80039af08f56c440e6f638a36366771c6149a9e1 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.css +++ b/interfaces/kits/js/common/business_error_map.h @@ -1,10 +1,10 @@ /* -* Copyright (c) 2022 Huawei Device Co., Ltd. +* Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * -* http://www.apache.org/licenses/LICENSE-2.0 +* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -12,13 +12,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifndef BUSINESS_ERROR_MAP_H +#define BUSINESS_ERROR_MAP_H +#include -.container { - flex-direction: column; - justify-content: center; - align-items: center; +namespace OHOS { +namespace AppExecFwk { +namespace BusinessErrorNS { +constexpr const char* ERR_MSG_BUSINESS_ERROR = "BusinessError $: "; +constexpr const char* ERR_MSG_PARAM_NUMBER_ERROR = + "BusinessError 401: Parameter error. The number of parameters is incorrect."; +constexpr const char* ERR_MSG_ENUM_ERROR = + "Parameter error. The value of $ is not a valid enum $."; +} +class BusinessErrorMap { +public: + static void GetErrMap(std::unordered_map& errMap); +}; } - -.title { - font-size: 100px; } +#endif diff --git a/interfaces/kits/js/common/common_func.cpp b/interfaces/kits/js/common/common_func.cpp index 78b4d61cc317a973c4e3ff026f4f16adc05cf99e..20cc660f958d40e785364b9d25b714089dd3e1f0 100644 --- a/interfaces/kits/js/common/common_func.cpp +++ b/interfaces/kits/js/common/common_func.cpp @@ -74,6 +74,9 @@ constexpr const char* CODE_PATH = "codePath"; const std::string PATH_PREFIX = "/data/app/el1/bundle/public"; const std::string CODE_PATH_PREFIX = "/data/storage/el1/bundle/"; const std::string CONTEXT_DATA_STORAGE_BUNDLE("/data/storage/el1/bundle/"); +const std::string ATOMIC_SERVICE_DIR_PREFIX = "+auid-"; +const std::string CLONE_APP_DIR_PREFIX = "+clone-"; +const std::string PLUS = "+"; constexpr const char* SYSTEM_APP = "systemApp"; constexpr const char* BUNDLE_TYPE = "bundleType"; constexpr const char* CODE_PATHS = "codePaths"; @@ -84,6 +87,7 @@ constexpr const char* MULTI_APP_MODE_TYPE = "multiAppModeType"; constexpr const char* MULTI_APP_MODE = "multiAppMode"; constexpr const char* ORIENTATION_ID = "orientationId"; constexpr const char* USER_ID = "userId"; +constexpr const char* CLONE_BUNDLE_PREFIX = "clone_"; static std::unordered_map ERR_MAP = { { ERR_OK, SUCCESS }, @@ -2757,5 +2761,111 @@ void CommonFunc::ConvertAppCloneIdentity( NAPI_CALL_RETURN_VOID(env, napi_create_int32(env, appIndex, &nAppIndex)); NAPI_CALL_RETURN_VOID(env, napi_set_named_property(env, nAppCloneIdentity, APP_INDEX, nAppIndex)); } + +void CommonFunc::GetBundleNameAndIndexByName(const std::string& keyName, std::string& bundleName, int32_t& appIndex) +{ + bundleName = keyName; + appIndex = 0; + auto pos = keyName.find(CLONE_BUNDLE_PREFIX); + if ((pos == std::string::npos) || (pos == 0)) { + return; + } + std::string index = keyName.substr(0, pos); + if (!OHOS::StrToInt(index, appIndex)) { + appIndex = 0; + return; + } + bundleName = keyName.substr(pos + strlen(CLONE_BUNDLE_PREFIX)); +} + +std::string CommonFunc::GetCloneBundleIdKey(const std::string& bundleName, const int32_t appIndex) +{ + return std::to_string(appIndex) + CLONE_BUNDLE_PREFIX + bundleName; +} + +void CommonFunc::GetBundleNameAndIndexBySandboxDataDir( + const std::string& keyName, std::string& bundleName, int32_t& appIndex) +{ + bundleName = keyName; + appIndex = 0; + bool isApp = true; + // for clone bundle name + auto pos = keyName.find(CLONE_APP_DIR_PREFIX); + if (pos == std::string::npos || pos != 0) { + // for atomic service + pos = keyName.find(ATOMIC_SERVICE_DIR_PREFIX); + if (pos == std::string::npos || pos != 0) { + return; + } + isApp = false; + } + + size_t indexBegin = 0; + if (isApp) { + indexBegin = pos + CLONE_APP_DIR_PREFIX.size(); + } else { + indexBegin = pos + ATOMIC_SERVICE_DIR_PREFIX.size(); + } + + auto plus = keyName.find(PLUS, indexBegin); + if ((plus == std::string::npos) || (plus <= indexBegin)) { + return; + } + + if (isApp) { + std::string index = keyName.substr(indexBegin, plus - indexBegin); + if (!OHOS::StrToInt(index, appIndex)) { + appIndex = 0; + return; + } + } + + bundleName = keyName.substr(plus + PLUS.size()); +} + +OHOS::sptr CommonFunc::GetOverlayMgrProxy() +{ + auto bundleMgr = GetBundleMgr(); + if (bundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + return nullptr; + } + auto overlayMgrProxy = bundleMgr->GetOverlayManagerProxy(); + if (overlayMgrProxy == nullptr) { + APP_LOGE("GetOverlayManagerProxy failed"); + return nullptr; + } + return overlayMgrProxy; +} + +OHOS::sptr CommonFunc::GetAppControlProxy() +{ + auto bundleMgr = GetBundleMgr(); + if (bundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + return nullptr; + } + auto appControlProxy = bundleMgr->GetAppControlProxy(); + if (appControlProxy == nullptr) { + APP_LOGE("GetAppControlProxy failed"); + return nullptr; + } + return appControlProxy; +} + +OHOS::sptr CommonFunc::GetDefaultAppProxy() +{ + auto bundleMgr = GetBundleMgr(); + if (bundleMgr == nullptr) { + APP_LOGE("GetBundleMgr failed"); + return nullptr; + } + auto defaultAppProxy = bundleMgr->GetDefaultAppProxy(); + if (defaultAppProxy == nullptr) { + APP_LOGE("GetDefaultAppProxy failed"); + return nullptr; + } + return defaultAppProxy; +} } // AppExecFwk } // OHOS diff --git a/interfaces/kits/js/common/common_func.h b/interfaces/kits/js/common/common_func.h index 0c3920960c189d5107993d3dc659efd45d152063..e348bac8d61034a6f9f72c7bac6104d719dc9786 100644 --- a/interfaces/kits/js/common/common_func.h +++ b/interfaces/kits/js/common/common_func.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -202,6 +202,19 @@ static void ConvertDynamicIconInfo(napi_env env, const DynamicIconInfo &dynamicI static void ConvertDynamicIconInfos(napi_env env, const std::vector &dynamicIconInfos, napi_value value); +static void GetBundleNameAndIndexByName(const std::string& keyName, std::string& bundleName, int32_t& appIndex); + +static std::string GetCloneBundleIdKey(const std::string& bundleName, const int32_t appIndex); + +static void GetBundleNameAndIndexBySandboxDataDir( + const std::string& keyName, std::string& bundleName, int32_t& appIndex); + +static OHOS::sptr GetOverlayMgrProxy(); + +static OHOS::sptr GetAppControlProxy(); + +static OHOS::sptr GetDefaultAppProxy(); + class BundleMgrCommonDeathRecipient : public IRemoteObject::DeathRecipient { void OnRemoteDied([[maybe_unused]] const wptr& remote) override; }; diff --git a/interfaces/kits/js/common/installer_helper.cpp b/interfaces/kits/js/common/installer_helper.cpp new file mode 100755 index 0000000000000000000000000000000000000000..b3fb1d701cf68b2e5eb1e0497aeef162622ac0f9 --- /dev/null +++ b/interfaces/kits/js/common/installer_helper.cpp @@ -0,0 +1,382 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include "app_log_wrapper.h" +#include "appexecfwk_errors.h" +#include "bundle_errors.h" +#include "bundle_mgr_interface.h" +#include "bundle_mgr_proxy.h" +#include "business_error.h" +#include "common_func.h" +#include "installer_helper.h" +#include "status_receiver_interface.h" + +namespace OHOS { +namespace AppExecFwk { + +void InstallerHelper::CreateErrCodeMap(std::unordered_map& errCodeMap) +{ + errCodeMap = { + { IStatusReceiver::SUCCESS, SUCCESS}, + { IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALL_HOST_INSTALLER_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_PARAM_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_GET_PROXY_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALL_INSTALLD_SERVICE_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_FAILED_SERVICE_DIED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_FAILED_GET_INSTALLER_PROXY, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_USER_CREATE_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_USER_REMOVE_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_UNINSTALL_KILLING_APP_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALL_GENERATE_UID_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALL_STATE_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_RECOVER_NOT_ALLOWED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_RECOVER_GET_BUNDLEPATH_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE, ERROR_BUNDLE_NOT_PREINSTALLED }, + { IStatusReceiver::ERR_UNINSTALL_SYSTEM_APP_ERROR, ERROR_UNINSTALL_PREINSTALL_APP_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_FAILED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_UNEXPECTED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_MISSING_BUNDLE, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_NO_PROFILE, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_BAD_PROFILE, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_MISSING_PROP, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_PERMISSION_ERROR, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_RPCID_FAILED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_NATIVE_SO_FAILED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_AN_FAILED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_MISSING_ABILITY, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_VERIFICATION_FAILED, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_BAD_DIGEST, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE, + ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_BAD_PUBLICKEY, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE, + ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_DEVICE_UNAUTHORIZED, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_SINGLETON_INCOMPATIBLE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE, ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE }, + { IStatusReceiver::ERR_INSTALL_PARAM_ERROR, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_UNINSTALL_PARAM_ERROR, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_RECOVER_INVALID_BUNDLE_NAME, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_UNINSTALL_INVALID_NAME, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_INSTALL_INVALID_BUNDLE_FILE, ERROR_INSTALL_HAP_FILEPATH_INVALID }, + { IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_EMPTY, ERROR_MODULE_NOT_EXIST }, + { IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_MODULE, ERROR_MODULE_NOT_EXIST }, + { IStatusReceiver::ERR_USER_NOT_INSTALL_HAP, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, ERROR_INSTALL_HAP_FILEPATH_INVALID }, + { IStatusReceiver::ERR_INSTALL_PERMISSION_DENIED, ERROR_PERMISSION_DENIED_ERROR }, + { IStatusReceiver::ERR_UNINSTALL_PERMISSION_DENIED, ERROR_PERMISSION_DENIED_ERROR }, + { IStatusReceiver::ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED, ERROR_INSTALL_PERMISSION_CHECK_ERROR }, + { IStatusReceiver::ERR_INSTALL_UPDATE_HAP_TOKEN_FAILED, ERROR_INSTALL_PERMISSION_CHECK_ERROR }, + { IStatusReceiver::ERR_INSTALLD_CREATE_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_CHOWN_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_CREATE_DIR_EXIST, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_REMOVE_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_EXTRACT_FILES_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_RNAME_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALLD_CLEAN_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_INSTALL_ENTRY_ALREADY_EXIST, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_ALREADY_EXIST, ERROR_INSTALL_ALREADY_EXIST }, + { IStatusReceiver::ERR_INSTALL_BUNDLENAME_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_VERSIONCODE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_VERSIONNAME_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_MINCOMPATIBLE_VERSIONCODE_NOT_SAME, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_VENDOR_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_RELEASETYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_RELEASETYPE_TARGET_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_RELEASETYPE_COMPATIBLE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_SINGLETON_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON, ERROR_INSTALL_FAILED_CONTROLLED }, + { IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_APPTYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_URI_DUPLICATE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_VERSION_NOT_COMPATIBLE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_APP_DISTRIBUTION_TYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_SO_INCOMPATIBLE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_AN_INCOMPATIBLE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_TYPE_ERROR, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_TYPE_ERROR, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_INCONSISTENT_MODULE_NAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_ASAN_ENABLED_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_ASAN_ENABLED_NOT_SUPPORT, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT}, + { IStatusReceiver::ERR_INSTALL_BUNDLE_TYPE_NOT_SAME, ERROR_INSTALL_PARSE_FAILED}, + { IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT, ERROR_INSTALL_NO_DISK_SPACE_LEFT }, + { IStatusReceiver::ERR_USER_NOT_EXIST, ERROR_INVALID_USER_ID }, + { IStatusReceiver::ERR_INSTALL_VERSION_DOWNGRADE, ERROR_INSTALL_VERSION_DOWNGRADE }, + { IStatusReceiver::ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED_AND_DEVICE_TYPE_NOT_SUPPORTED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST, ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST }, + { IStatusReceiver::ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED, ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED }, + { IStatusReceiver::ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_FILE_IS_SHARED_LIBRARY, ERROR_INSTALL_FILE_IS_SHARED_LIBRARY }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME, ERROR_BUNDLE_NOT_EXIST }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME, ERROR_MODULE_NOT_EXIST}, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE, ERROR_INVALID_TYPE }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE, ERROR_INVALID_TYPE }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT}, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY, + ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE, + ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE, + ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED }, + {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE, + ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME, + ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR, ERROR_BUNDLE_SERVICE_EXCEPTION }, + { IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST, + ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST}, + { IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED, + ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED}, + { IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_BUNDLE_IS_SHARED_LIBRARY, + ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE}, + { IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_URI_FAILED, + ERROR_INSTALL_WRONG_DATA_PROXY_URI}, + { IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_PERMISSION_FAILED, + ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION}, + { IStatusReceiver::ERR_INSTALL_FAILED_DEBUG_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, + { IStatusReceiver::ERR_INSTALL_DISALLOWED, ERROR_DISALLOW_INSTALL}, + { IStatusReceiver::ERR_INSTALL_ISOLATION_MODE_FAILED, ERROR_INSTALL_WRONG_MODE_ISOLATION }, + { IStatusReceiver::ERR_UNINSTALL_DISALLOWED, ERROR_DISALLOW_UNINSTALL }, + { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID, ERROR_INSTALL_CODE_SIGNATURE_FAILED}, + { IStatusReceiver::ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED, ERROR_BUNDLE_NOT_EXIST}, + { IStatusReceiver::ERR_INSTALL_SELF_UPDATE_NOT_MDM, ERROR_INSTALL_SELF_UPDATE_NOT_MDM}, + { IStatusReceiver::ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED, ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED}, + { IStatusReceiver::ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED, + ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR}, + { IStatusReceiver::ERR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME, ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME}, + { IStatusReceiver::ERR_INSTALL_GWP_ASAN_ENABLED_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT}, + { IStatusReceiver::ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED, ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED}, + { IStatusReceiver::ERR_INSTALL_CHECK_ENCRYPTION_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED }, + { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED}, + { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_REMOVE_FILE_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED}, + { IStatusReceiver::ERR_INSTALL_CODE_APP_CONTROLLED_FAILED, ERROR_INSTALL_FAILED_CONTROLLED}, + { IStatusReceiver::ERR_APPEXECFWK_INSTALL_FORCE_UNINSTALLED_BUNDLE_NOT_ALLOW_RECOVER, + ERROR_INSTALL_FAILED_CONTROLLED}, + { IStatusReceiver::ERR_APPEXECFWK_INSTALL_PREINSTALL_BUNDLE_ONLY_ALLOW_FORCE_UNINSTALLED_BY_EDC, + ERROR_INSTALL_FAILED_CONTROLLED}, + { IStatusReceiver::ERR_INSTALL_NATIVE_FAILED, ERROR_INSTALL_NATIVE_FAILED}, + { IStatusReceiver::ERR_UNINSTALL_NATIVE_FAILED, ERROR_UNINSTALL_NATIVE_FAILED}, + { IStatusReceiver::ERR_UNINSTALL_DISPOSED_RULE_DENIED, ERROR_APPLICATION_UNINSTALL}, + { IStatusReceiver::ERR_NATIVE_HNP_EXTRACT_FAILED, ERROR_INSTALL_NATIVE_FAILED}, + { IStatusReceiver::ERR_UNINSTALL_CONTROLLED, ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED }, + { IStatusReceiver::ERR_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED, ERROR_INSTALL_PARSE_FAILED }, + { IStatusReceiver::ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL_ISR, + ERROR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL}, + { IStatusReceiver::ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED, + ERROR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED }, + { IStatusReceiver::ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON, + ERROR_INSTALL_FAILED_CONTROLLED }, + { IStatusReceiver::ERR_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS, + ERROR_INSTALL_FAILED_CONTROLLED }, + { IStatusReceiver::ERR_INSTALL_U1_ENABLE_NOT_SUPPORT_APP_SERVICE_AND_SHARED_BUNDLE, + ERROR_INSTALL_FAILED_CONTROLLED}, + }; +} + +void InstallerHelper::ConvertInstallResult(InstallResult& installResult) +{ + APP_LOGD("ConvertInstallResult msg %{public}s, errCode is %{public}d", installResult.resultMsg.c_str(), + installResult.resultCode); + std::unordered_map errCodeMap; + CreateErrCodeMap(errCodeMap); + auto iter = errCodeMap.find(installResult.resultCode); + if (iter != errCodeMap.end()) { + installResult.resultCode = iter->second; + return; + } + installResult.resultCode = ERROR_BUNDLE_SERVICE_EXCEPTION; +} + +void InstallerHelper::CreateProxyErrCode(std::unordered_map& errCodeMap) +{ + errCodeMap = { + { ERR_APPEXECFWK_INSTALL_PARAM_ERROR, IStatusReceiver::ERR_INSTALL_PARAM_ERROR }, + { ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR }, + { ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID, IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID }, + { ERR_APPEXECFWK_INSTALL_DISK_MEM_INSUFFICIENT, IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT }, + { ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID, + IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID} + }; +} + +ErrCode InstallerHelper::InnerCreateAppClone(std::string& bundleName, int32_t userId, int32_t& appIndex) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); + if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { + APP_LOGE("can not get iBundleInstaller"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode result = iBundleInstaller->InstallCloneApp(bundleName, userId, appIndex); + APP_LOGD("InstallCloneApp result is %{public}d", result); + return result; +} + +ErrCode InstallerHelper::InnerDestroyAppClone( + std::string& bundleName, int32_t userId, int32_t appIndex, DestroyAppCloneParam& destroyAppCloneParam) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); + if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { + APP_LOGE("can not get iBundleInstaller"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode result = iBundleInstaller->UninstallCloneApp(bundleName, userId, appIndex, destroyAppCloneParam); + APP_LOGD("UninstallCloneApp result is %{public}d", result); + return result; +} + +ErrCode InstallerHelper::InnerAddExtResource(const std::string& bundleName, const std::vector& filePaths) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + std::vector destFiles; + ErrCode ret = extResourceManager->CopyFiles(filePaths, destFiles); + if (ret != ERR_OK) { + APP_LOGE("CopyFiles failed"); + return CommonFunc::ConvertErrCode(ret); + } + + ret = extResourceManager->AddExtResource(bundleName, destFiles); + if (ret != ERR_OK) { + APP_LOGE("AddExtResource failed"); + } + + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode InstallerHelper::InnerRemoveExtResource( + const std::string& bundleName, const std::vector& moduleNames) +{ + auto extResourceManager = CommonFunc::GetExtendResourceManager(); + if (extResourceManager == nullptr) { + APP_LOGE("extResourceManager is null"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + + ErrCode ret = extResourceManager->RemoveExtResource(bundleName, moduleNames); + if (ret != ERR_OK) { + APP_LOGE("RemoveExtResource failed"); + } + + return CommonFunc::ConvertErrCode(ret); +} + +ErrCode InstallerHelper::InnerInstallPreexistingApp(std::string& bundleName, int32_t userId) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); + if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { + APP_LOGE("can not get iBundleInstaller"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode result = iBundleInstaller->InstallExisted(bundleName, userId); + APP_LOGD("result is %{public}d", result); + return result; +} + +ErrCode InstallerHelper::InnerInstallPlugin(const std::string& hostBundleName, + const std::vector& pluginFilePaths, const InstallPluginParam& installPluginParam) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); + if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { + APP_LOGE("can not get iBundleInstaller"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode result = iBundleInstaller->InstallPlugin(hostBundleName, pluginFilePaths, installPluginParam); + APP_LOGD("InstallPlugin result is %{public}d", result); + return result; +} + +ErrCode InstallerHelper::InnerUninstallPlugin(const std::string& hostBundleName, const std::string& pluginBundleName, + const InstallPluginParam& installPluginParam) +{ + auto iBundleMgr = CommonFunc::GetBundleMgr(); + if (iBundleMgr == nullptr) { + APP_LOGE("can not get iBundleMgr"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); + if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { + APP_LOGE("can not get iBundleInstaller"); + return ERROR_BUNDLE_SERVICE_EXCEPTION; + } + ErrCode result = iBundleInstaller->UninstallPlugin(hostBundleName, pluginBundleName, installPluginParam); + APP_LOGD("UninstallPlugin result is %{public}d", result); + return result; +} +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/js/common/installer_helper.h b/interfaces/kits/js/common/installer_helper.h new file mode 100755 index 0000000000000000000000000000000000000000..6bcd9236d535143907c2af16d321068a5b677285 --- /dev/null +++ b/interfaces/kits/js/common/installer_helper.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_HELPER_H +#define FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_HELPER_H + +#include "base_cb_info.h" +#include "bundle_errors.h" +#include "clone_param.h" +#include "install_param.h" +#include "napi/native_api.h" +#include "napi/native_common.h" +#include "napi/native_node_api.h" +#include "plugin/install_plugin_param.h" + +namespace OHOS { +namespace AppExecFwk { +struct InstallResult { + int32_t resultCode = 0; + std::string resultMsg; + int32_t innerCode = 0; +}; + +enum class InstallOption { + INSTALL = 0, + RECOVER = 1, + UNINSTALL = 2, + UPDATE_BUNDLE_FOR_SELF = 3, + UNKNOWN = 4, + UNINSTALL_AND_RECOVER = 5, +}; + +class InstallerHelper { +public: + static void CreateErrCodeMap(std::unordered_map& errCodeMap); + static void ConvertInstallResult(InstallResult& installResult); + static void CreateProxyErrCode(std::unordered_map& errCodeMap); + static ErrCode InnerCreateAppClone(std::string& bundleName, int32_t userId, int32_t& appIndex); + static ErrCode InnerDestroyAppClone( + std::string& bundleName, int32_t userId, int32_t appIndex, DestroyAppCloneParam& destroyAppCloneParam); + static ErrCode InnerAddExtResource(const std::string& bundleName, const std::vector& filePaths); + static ErrCode InnerRemoveExtResource(const std::string& bundleName, const std::vector& moduleNames); + static ErrCode InnerInstallPreexistingApp(std::string& bundleName, int32_t userId); + static ErrCode InnerInstallPlugin(const std::string& hostBundleName, + const std::vector& pluginFilePaths, const InstallPluginParam& installPluginParam); + static ErrCode InnerUninstallPlugin(const std::string& hostBundleName, const std::string& pluginBundleName, + const InstallPluginParam& installPluginParam); +}; +} // namespace AppExecFwk +} // namespace OHOS +#endif // FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_HELPER_H \ No newline at end of file diff --git a/interfaces/kits/js/common/napi_constants.h b/interfaces/kits/js/common/napi_constants.h index 87ec27297619a7e08eef0af702ddde942005844e..098635a3730a2064a3235fa952d2e4751fef9f1d 100644 --- a/interfaces/kits/js/common/napi_constants.h +++ b/interfaces/kits/js/common/napi_constants.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -34,12 +34,26 @@ constexpr size_t ARGS_POS_FOUR = 4; constexpr size_t NAPI_RETURN_ONE = 1; constexpr size_t CALLBACK_PARAM_SIZE = 2; +constexpr int32_t SPECIFIED_DISTRIBUTION_TYPE_MAX_SIZE = 128; +constexpr int32_t ADDITIONAL_INFO_MAX_SIZE = 3000; +constexpr int32_t EMPTY_USER_ID = -500; +constexpr uint32_t EXPLICIT_QUERY_RESULT_LEN = 1; + +constexpr int32_t ENUM_ONE = 1; +constexpr int32_t ENUM_TWO = 2; +constexpr int32_t ENUM_THREE = 3; +constexpr int32_t ENUM_FOUR = 4; +constexpr int32_t ENUM_FIVE = 5; +constexpr int32_t ENUM_SIX = 6; +constexpr int32_t ENUM_SEVEN = 7; + constexpr const char* TYPE_NUMBER = "number"; constexpr const char* TYPE_STRING = "string"; constexpr const char* TYPE_OBJECT = "object"; constexpr const char* TYPE_BOOLEAN = "boolean"; constexpr const char* TYPE_FUNCTION = "function"; constexpr const char* TYPE_ARRAY = "array"; +constexpr const char* TYPE_ARRAYBUFFER = "ArrayBuffer"; constexpr const char* UID = "uid"; constexpr const char* USER_ID = "userId"; @@ -49,6 +63,7 @@ constexpr const char* ABILITY_NAME = "abilityName"; constexpr const char* APP_INDEX = "appIndex"; constexpr const char* PARAM_TYPE_CHECK_ERROR = "param type check error"; +// bundle_manager constexpr const char* BUNDLE_FLAGS = "bundleFlags"; constexpr const char* APP_FLAGS = "appFlags"; constexpr const char* ERR_MSG_BUNDLE_SERVICE_EXCEPTION = "Bundle manager service is excepted."; @@ -60,20 +75,235 @@ constexpr const char* BUNDLE_PERMISSIONS = "ohos.permission.GET_BUNDLE_INFO or ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"; constexpr const char* GET_BUNDLE_INFO = "GetBundleInfo"; constexpr const char* GET_APPLICATION_INFO = "GetApplicationInfo"; +constexpr const char* FLAGS = "flags"; +constexpr const char* ABILITY_FLAGS = "abilityFlags"; +constexpr const char* ABILITY_INFO = "abilityInfo"; +constexpr const char* LINK_FEATURE = "linkFeature"; +constexpr const char* EXTENSION_TYPE_NAME = "extensionTypeName"; +constexpr const char* EXTENSION_ABILITY_TYPE = "extensionAbilityType"; +constexpr const char* PARAM_EXTENSION_ABILITY_TYPE_EMPTY_ERROR = + "BusinessError 401: Parameter error.Parameter extensionAbilityType is empty."; +constexpr const char* INVALID_WANT_ERROR = + "implicit query condition, at least one query param(action, entities, uri, type, or linkFeature) non-empty."; +constexpr const char* APP_CLONE_IDENTITY_PERMISSIONS = "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"; +constexpr const char* GET_BUNDLE_INFOS = "GetBundleInfos"; +constexpr const char* GET_APPLICATION_INFOS = "GetApplicationInfos"; +constexpr const char* IS_APPLICATION_ENABLED = "IsApplicationEnabled"; +constexpr const char* QUERY_ABILITY_INFOS_SYNC = "QueryAbilityInfosSync"; +constexpr const char* GET_APP_CLONE_IDENTITY = "getAppCloneIdentity"; +constexpr const char* GET_ABILITY_LABEL = "GetAbilityLabel"; +constexpr const char* QUERY_EXTENSION_INFOS_SYNC = "QueryExtensionInfosSync"; +constexpr const char* GET_LAUNCH_WANT_FOR_BUNDLE_SYNC = "GetLaunchWantForBundleSync"; +constexpr const char* IS_ABILITY_ENABLED_SYNC = "IsAbilityEnabledSync"; +constexpr const char* SET_ABILITY_ENABLED_SYNC = "SetAbilityEnabledSync"; +constexpr const char* SET_APPLICATION_ENABLED_SYNC = "SetApplicationEnabledSync"; +constexpr const char* GET_APP_CLONE_BUNDLE_INFO = "GetAppCloneBundleInfo"; +constexpr const char* GET_DYNAMIC_ICON = "GetDynamicIcon"; +constexpr const char* RESOURCE_NAME_OF_GET_SPECIFIED_DISTRIBUTION_TYPE = "GetSpecifiedDistributionType"; +constexpr const char* BATCH_QUERY_ABILITY_INFOS = "BatchQueryAbilityInfos"; +constexpr const char* GET_BUNDLE_NAME_BY_UID = "GetBundleNameByUid"; +constexpr const char* ENABLE_DYNAMIC_ICON = "EnableDynamicIcon"; +constexpr const char* QUERY_ABILITY_INFOS = "QueryAbilityInfos"; +constexpr const char* GET_ABILITY_LABEL_SYNC = "GetAbilityLabelSync"; +constexpr const char* GET_LAUNCH_WANT_FOR_BUNDLE = "GetLaunchWantForBundle"; +constexpr const char* GET_BUNDLE_NAME_BY_UID_SYNC = "GetBundleNameByUidSync"; +constexpr const char* QUERY_EXTENSION_INFOS = "QueryExtensionInfos"; +constexpr const char* SET_ABILITY_ENABLED = "SetAbilityEnabled"; +constexpr const char* SET_APPLICATION_ENABLED = "SetApplicationEnabled"; +constexpr const char* HAP_FILE_PATH = "hapFilePath"; +constexpr const char* PERMISSION_NAME = "permissionName"; +constexpr const char* PROFILE_TYPE = "profileType"; +constexpr const char* ADDITIONAL_INFO = "additionalInfo"; +constexpr const char* DEVELOPER_ID = "developerId"; +constexpr const char* APP_DISTRIBUTION_TYPE = "appDistributionType"; +constexpr const char* APP_DISTRIBUTION_TYPE_ENUM = "AppDistributionType"; +constexpr const char* HOST_BUNDLE_NAME = "hostBundleName"; +constexpr const char* SOURCE_PATHS = "sourcePaths"; +constexpr const char* DESTINATION_PATH = "destinationPath"; +constexpr const char* LINK = "link"; +constexpr const char* URI = "uri"; +constexpr const char* SANDBOX_DATA_DIR = "sandboxDataDir"; +constexpr const char* ERR_MSG_LAUNCH_WANT_INVALID = "The launch want is not found."; +constexpr const char* PARAM_BUNDLENAME_EMPTY_ERROR = + "BusinessError 401: Parameter error. parameter bundleName is empty"; +constexpr const char* PARAM_MODULENAME_EMPTY_ERROR = + "BusinessError 401: Parameter error. parameter moduleName is empty"; +constexpr const char* GET_SIGNATURE_INFO_PERMISSIONS = "ohos.permission.GET_SIGNATURE_INFO"; +constexpr const char* PARAM_DEVELOPER_ID_EMPTY_ERROR = + "BusinessError 401: Parameter error. parameter developerId is empty"; +constexpr const char* BUNDLE_ENABLE_AND_DISABLE_ALL_DYNAMIC_PERMISSIONS = + "ohos.permission.ACCESS_DYNAMIC_ICON and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS"; +constexpr const char* BUNDLE_GET_ALL_DYNAMIC_PERMISSIONS = + "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS"; +constexpr const char* GET_ABILITYINFO_PERMISSIONS = "ohos.permission.GET_ABILITY_INFO"; +constexpr const char* GET_BUNDLE_ARCHIVE_INFO = "GetBundleArchiveInfo"; +constexpr const char* GET_PERMISSION_DEF = "GetPermissionDef"; +constexpr const char* CLEAN_BUNDLE_CACHE_FILES = "cleanBundleCacheFiles"; +constexpr const char* GET_ALL_BUNDLE_CACHE_SIZE = "getAllBundleCacheSize"; +constexpr const char* CLEAN_ALL_BUNDLE_CACHE = "cleanAllBundleCache"; +constexpr const char* GET_APP_PROVISION_INFO = "GetAppProvisionInfo"; +constexpr const char* CAN_OPEN_LINK = "CanOpenLink"; +constexpr const char* GET_ALL_PREINSTALLED_APP_INFOS = "GetAllPreinstalledApplicationInfos"; +constexpr const char* GET_ALL_BUNDLE_INFO_BY_DEVELOPER_ID = "GetAllBundleInfoByDeveloperId"; +constexpr const char* SWITCH_UNINSTALL_STATE = "SwitchUninstallState"; +constexpr const char* GET_SIGNATURE_INFO = "GetSignatureInfo"; +constexpr const char* GET_ALL_APP_CLONE_BUNDLE_INFO = "GetAllAppCloneBundleInfo"; +constexpr const char* GET_BUNDLE_ARCHIVE_INFO_SYNC = "GetBundleArchiveInfoSync"; +constexpr const char* GET_PROFILE_BY_EXTENSION_ABILITY_SYNC = "GetProfileByExtensionAbilitySync"; +constexpr const char* GET_PROFILE_BY_ABILITY_SYNC = "GetProfileByAbilitySync"; +constexpr const char* GET_PERMISSION_DEF_SYNC = "GetPermissionDefSync"; +constexpr const char* GET_APP_PROVISION_INFO_SYNC = "GetAppProvisionInfoSync"; +constexpr const char* GET_ALL_SHARED_BUNDLE_INFO = "GetAllSharedBundleInfo"; +constexpr const char* GET_SHARED_BUNDLE_INFO = "GetSharedBundleInfo"; +constexpr const char* GET_JSON_PROFILE = "GetJsonProfile"; +constexpr const char* RESOURCE_NAME_OF_GET_ADDITIONAL_INFO = "GetAdditionalInfo"; +constexpr const char* GET_EXT_RESOURCE = "GetExtResource"; +constexpr const char* DISABLE_DYNAMIC_ICON = "DisableDynamicIcon"; +constexpr const char* VERIFY_ABC = "VerifyAbc"; +constexpr const char* DELETE_ABC = "DeleteAbc"; +constexpr const char* GET_RECOVERABLE_APPLICATION_INFO = "GetRecoverableApplicationInfo"; +constexpr const char* RESOURCE_NAME_OF_SET_ADDITIONAL_INFO = "SetAdditionalInfo"; +constexpr const char* GET_DEVELOPER_IDS = "GetDeveloperIds"; +constexpr const char* GET_ALL_PLUGIN_INFO = "GetAllPluginInfo"; +constexpr const char* MIGRATE_DATA = "MigrateData"; +constexpr const char* GET_ALL_DYNAMIC_ICON = "GetAllDynamicIconInfo"; +constexpr const char* GET_SANDBOX_DATA_DIR_SYNC = "GetSandboxDataDirSync"; +constexpr const char* GET_ABILITY_INFOS = "GetAbilityInfos"; +constexpr const char* GET_DYNAMIC_ICON_INFO = "GetDynamicIconInfo"; +// launcher_bundle_manager constexpr const char* GET_SHORTCUT_INFO = "GetShortcutInfo"; constexpr const char* GET_SHORTCUT_INFO_SYNC = "GetShortcutInfoSync"; +constexpr const char* GET_SHORTCUT_INFO_BY_APPINDEX = "GetShortcutInfoByAppIndex"; constexpr const char* ERROR_EMPTY_WANT = "want in ShortcutInfo cannot be empty"; -constexpr const char* PARSE_START_OPTIONS = "parse StartOptions failed"; +constexpr const char* PARSE_SHORTCUT_INFO_FAILED = "parse ShortcutInfo failed"; +constexpr const char* PARSE_START_OPTIONS_FAILED = "parse StartOptions failed"; constexpr const char* START_SHORTCUT = "StartShortcut"; +constexpr const char* GET_LAUNCHER_ABILITY_INFO = "GetLauncherAbilityInfo"; +constexpr const char* GET_LAUNCHER_ABILITY_INFO_SYNC = "GetLauncherAbilityInfoSync"; +constexpr const char* GET_ALL_LAUNCHER_ABILITY_INFO = "GetAllLauncherAbilityInfo"; +constexpr const char* PARSE_REASON_MESSAGE = "parse ReasonMessage failed"; +constexpr const char* START_SHORTCUT_WITH_REASON = "StartShortcutWithReason"; +// resource_manager constexpr const char* PERMISSION_GET_BUNDLE_RESOURCES = "ohos.permission.GET_BUNDLE_RESOURCES"; constexpr const char* GET_BUNDLE_RESOURCE_INFO = "GetBundleResourceInfo"; constexpr const char* RESOURCE_FLAGS = "resourceFlags"; +constexpr const char* PERMISSION_GET_ALL_BUNDLE_RESOURCES = + "ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES"; +constexpr const char* GET_LAUNCHER_ABILITY_RESOURCE_INFO = "GetLauncherAbilityResourceInfo"; +constexpr const char* GET_ALL_BUNDLE_RESOURCE_INFO = "GetAllBundleResourceInfo"; +constexpr const char* GET_ALL_LAUNCHER_ABILITY_RESOURCE_INFO = "GetAllLauncherAbilityResourceInfo"; +constexpr const char* GET_EXTENSION_ABILITY_RESOURCE_INFO = "GetExtensionAbilityResourceInfo"; +// shortcut_manager constexpr const char* ADD_DESKTOP_SHORTCUT_INFO = "AddDesktopShortcutInfo"; constexpr const char* DELETE_DESKTOP_SHORTCUT_INFO = "DeleteDesktopShortcutInfo"; constexpr const char* GET_ALL_DESKTOP_SHORTCUT_INFO = "GetAllDesktopShortcutInfo"; +constexpr const char* SET_SHORTCUT_VISIBLE = "SetShortcutVisibleForSelf"; +constexpr const char* GET_ALL_SHORTCUT_INFO_FOR_SELF = "GetAllShortcutInfoForSelf"; +constexpr const char* SHORTCUT_ID = "shortcutId"; +constexpr const char* INVALID_SHORTCUT_INFO_ERROR = + "invalid ShortcutInfo: parameter type error, or appIndex is less than 0"; + +// free_install +constexpr const char* RESOURCE_NAME_OF_IS_HAP_MODULE_REMOVABLE = "isHapModuleRemovable"; +constexpr const char* RESOURCE_NAME_OF_SET_HAP_MODULE_UPGRADE_FLAG = "setHapModuleUpgradeFlag"; +constexpr const char* RESOURCE_NAME_OF_GET_BUNDLE_PACK_INFO = "getBundlePackInfo"; +constexpr const char* RESOURCE_NAME_OF_GET_DISPATCH_INFO = "getDispatchInfo"; +constexpr const char* DISPATCH_INFO_VERSION = "1"; +constexpr const char* DISPATCH_INFO_DISPATCH_API = "1.0"; +constexpr const char* UPGRADE_FLAG = "upgradeFlag"; +constexpr const char* BUNDLE_PACK_FLAG = "bundlePackFlag"; + +// overlay +constexpr const char* TARGET_MODULE_NAME = "targetModuleName"; +constexpr const char* TARGET_BUNDLE_NAME = "targetBundleName"; +constexpr const char* IS_ENABLED = "isEnabled"; +constexpr const char* SET_OVERLAY_ENABLED = "SetOverlayEnabled"; +constexpr const char* SET_OVERLAY_ENABLED_BY_BUNDLE_NAME = "SetOverlayEnabledByBundleName"; +constexpr const char* GET_OVERLAY_MODULE_INFO = "GetOverlayModuleInfo"; +constexpr const char* GET_TARGET_OVERLAY_MODULE_INFOS = "GetTargetOverlayModuleInfos"; +constexpr const char* GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME = "GetOverlayModuleInfoByBundleName"; +constexpr const char* GET_TARGET_OVERLAY_MODULE_INFOS_BY_BUNDLE_NAME = "GetTargetOverlayModuleInfosByBundleName"; + +// installer +constexpr const char* RESOURCE_NAME_OF_GET_BUNDLE_INSTALLER = "GetBundleInstaller"; +constexpr const char* RESOURCE_NAME_OF_GET_BUNDLE_INSTALLER_SYNC = "GetBundleInstallerSync"; +constexpr const char* RESOURCE_NAME_OF_INSTALL = "Install"; +constexpr const char* RESOURCE_NAME_OF_UNINSTALL = "Uninstall"; +constexpr const char* RESOURCE_NAME_OF_RECOVER = "Recover"; +constexpr const char* RESOURCE_NAME_OF_UPDATE_BUNDLE_FOR_SELF = "UpdateBundleForSelf"; +constexpr const char* RESOURCE_NAME_OF_UNINSTALL_AND_RECOVER = "UninstallUpdates"; +constexpr const char* INSTALL_PERMISSION = + "ohos.permission.INSTALL_BUNDLE or " + "ohos.permission.INSTALL_ENTERPRISE_BUNDLE or " + "ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or " + "ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE or " + "ohos.permission.INSTALL_INTERNALTESTING_BUNDLE"; +constexpr const char* UNINSTALL_PERMISSION = "ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE"; +constexpr const char* RECOVER_PERMISSION = "ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE"; +constexpr const char* INSTALL_SELF_PERMISSION = "ohos.permission.INSTALL_SELF_BUNDLE"; +constexpr const char* PARAMETERS = "parameters"; +constexpr const char* CORRESPONDING_TYPE = "corresponding type"; +constexpr const char* FILE_PATH = "filePath"; +constexpr const char* ADD_EXT_RESOURCE = "AddExtResource"; +constexpr const char* REMOVE_EXT_RESOURCE = "RemoveExtResource"; +constexpr const char* PARAM_HAPS_FILE_EMPTY_ERROR = + "BusinessError 401: Parameter error. parameter hapFiles is needed for code signature"; +constexpr const char* CREATE_APP_CLONE = "CreateAppClone"; +constexpr const char* DESTROY_APP_CLONE = "destroyAppClone"; +constexpr const char* INSTALL_PREEXISTING_APP = "installPreexistingApp"; +constexpr const char* INSTALL_PLUGIN = "InstallPlugin"; +constexpr const char* UNINSTALL_PLUGIN = "UninstallPlugin"; +constexpr const char* PLUGIN_BUNDLE_NAME = "pluginBundleName"; + +// app_control +constexpr const char* TYPE_WANT = "want"; +constexpr const char* PERMISSION_DISPOSED_STATUS = "ohos.permission.MANAGE_DISPOSED_APP_STATUS"; +constexpr const char* SET_DISPOSED_STATUS = "SetDisposedStatus"; +constexpr const char* GET_DISPOSED_STATUS = "GetDisposedStatus"; +constexpr const char* DELETE_DISPOSED_STATUS = "DeleteDisposedStatus"; +constexpr const char* SET_DISPOSED_STATUS_SYNC = "SetDisposedStatusSync"; +constexpr const char* DELETE_DISPOSED_STATUS_SYNC = "DeleteDisposedStatusSync"; +constexpr const char* GET_DISPOSED_STATUS_SYNC = "GetDisposedStatusSync"; +constexpr const char* APP_ID = "appId"; +constexpr const char* APP_IDENTIFIER = "appIdentifier"; +constexpr const char* DISPOSED_WANT = "disposedWant"; +constexpr const char* DISPOSED_RULE = "disposedRule"; +constexpr const char* DISPOSED_RULE_TYPE = "DisposedRule"; +constexpr const char* UNINSTALL_DISPOSED_RULE = "uninstallDisposedRule"; +constexpr const char* UNINSTALL_DISPOSED_RULE_TYPE = "UninstallDisposedRule"; +constexpr const char* SET_UNINSTALL_DISPOSED_RULE = "SetUninstallDisposedRule"; +constexpr const char* DELETE_UNINSTALL_DISPOSED_RULE = "DeleteUninstallDisposedRule"; +constexpr const char* GET_UNINSTALL_DISPOSED_RULE = "GetUninstallDisposedRule"; +constexpr const char* SET_DISPOSED_RULE = "SetDisposedRule"; +constexpr const char* SET_DISPOSED_RULES = "SetDisposedRules"; +constexpr const char* PARAM_LENGTH_ERROR = "parameter length invalid"; +constexpr uint32_t MAX_VECTOR_NUM = 1000; + +// default_app_manager +const std::unordered_map TYPE_MAPPING = { + {"Web Browser", "BROWSER"}, + {"Image Gallery", "IMAGE"}, + {"Audio Player", "AUDIO"}, + {"Video Player", "VIDEO"}, + {"PDF Viewer", "PDF"}, + {"Word Viewer", "WORD"}, + {"Excel Viewer", "EXCEL"}, + {"PPT Viewer", "PPT"}, + {"Email", "EMAIL"} +}; +constexpr const char* IS_DEFAULT_APPLICATION = "IsDefaultApplication"; +constexpr const char* IS_DEFAULT_APPLICATION_SYNC = "IsDefaultApplicationSync"; +constexpr const char* GET_DEFAULT_APPLICATION = "GetDefaultApplication"; +constexpr const char* GET_DEFAULT_APPLICATION_SYNC = "GetDefaultApplicationSync"; +constexpr const char* SET_DEFAULT_APPLICATION = "SetDefaultApplication"; +constexpr const char* SET_DEFAULT_APPLICATION_SYNC = "SetDefaultApplicationSync"; +constexpr const char* RESET_DEFAULT_APPLICATION = "ResetDefaultApplication"; +constexpr const char* RESET_DEFAULT_APPLICATION_SYNC = "ResetDefaultApplicationSync"; +constexpr const char* TYPE_CHECK = "type"; +constexpr const char* WANT_CHECK = "want"; } } } diff --git a/interfaces/kits/js/default_app/js_default_app.cpp b/interfaces/kits/js/default_app/js_default_app.cpp index 6b3bad90f2954a7f94109377f09fae596ce072d1..2f4f50667fb63dcaf64ec831b332424260ab1029 100644 --- a/interfaces/kits/js/default_app/js_default_app.cpp +++ b/interfaces/kits/js/default_app/js_default_app.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -36,31 +36,9 @@ using namespace OHOS::AAFwk; namespace { constexpr int32_t NAPI_RETURN_ZERO = 0; -const char* IS_DEFAULT_APPLICATION = "IsDefaultApplication"; -const char* IS_DEFAULT_APPLICATION_SYNC = "IsDefaultApplicationSync"; -const char* GET_DEFAULT_APPLICATION = "GetDefaultApplication"; -const char* GET_DEFAULT_APPLICATION_SYNC = "GetDefaultApplicationSync"; -const char* SET_DEFAULT_APPLICATION = "SetDefaultApplication"; -const char* SET_DEFAULT_APPLICATION_SYNC = "SetDefaultApplicationSync"; -const char* RESET_DEFAULT_APPLICATION = "ResetDefaultApplication"; -const char* RESET_DEFAULT_APPLICATION_SYNC = "ResetDefaultApplicationSync"; const char* PARAM_TYPE_CHECK_ERROR_WITH_POS = "param type check error, error position : "; -const char* TYPE_CHECK = "type"; -const char* WANT_CHECK = "want"; } -static const std::unordered_map TYPE_MAPPING = { - {"Web Browser", "BROWSER"}, - {"Image Gallery", "IMAGE"}, - {"Audio Player", "AUDIO"}, - {"Video Player", "VIDEO"}, - {"PDF Viewer", "PDF"}, - {"Word Viewer", "WORD"}, - {"Excel Viewer", "EXCEL"}, - {"PPT Viewer", "PPT"}, - {"Email", "EMAIL"} -}; - static bool ParseType(napi_env env, napi_value value, std::string& result) { napi_valuetype valueType = napi_undefined; @@ -86,31 +64,6 @@ static bool ParseType(napi_env env, napi_value value, std::string& result) return true; } -static OHOS::sptr GetDefaultAppProxy() -{ - auto systemAbilityManager = OHOS::SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); - if (systemAbilityManager == nullptr) { - APP_LOGE("systemAbilityManager is null"); - return nullptr; - } - auto bundleMgrSa = systemAbilityManager->GetSystemAbility(OHOS::BUNDLE_MGR_SERVICE_SYS_ABILITY_ID); - if (bundleMgrSa == nullptr) { - APP_LOGE("bundleMgrSa is null"); - return nullptr; - } - auto bundleMgr = OHOS::iface_cast(bundleMgrSa); - if (bundleMgr == nullptr) { - APP_LOGE("iface_cast failed"); - return nullptr; - } - auto defaultAppProxy = bundleMgr->GetDefaultAppProxy(); - if (defaultAppProxy == nullptr) { - APP_LOGE("GetDefaultAppProxy failed"); - return nullptr; - } - return defaultAppProxy; -} - static void ConvertAbilityInfo(napi_env env, napi_value objAbilityInfo, const AbilityInfo &abilityInfo) { APP_LOGD("begin to ConvertAbilityInfo"); @@ -233,7 +186,7 @@ static ErrCode InnerIsDefaultApplication(DefaultAppCallbackInfo *info) APP_LOGE("info is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { APP_LOGE("defaultAppProxy is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; @@ -352,7 +305,7 @@ napi_value IsDefaultApplicationSync(napi_env env, napi_callback_info info) return nRet; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { napi_value error = BusinessError::CreateCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, IS_DEFAULT_APPLICATION_SYNC); @@ -380,7 +333,7 @@ static ErrCode InnerGetDefaultApplication(DefaultAppCallbackInfo *info) APP_LOGE("info is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { APP_LOGE("defaultAppProxy is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; @@ -511,7 +464,7 @@ napi_value GetDefaultApplicationSync(napi_env env, napi_callback_info info) return nullptr; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { napi_value error = BusinessError::CreateCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, GET_DEFAULT_APPLICATION_SYNC); @@ -543,7 +496,7 @@ static ErrCode InnerSetDefaultApplication(const DefaultAppCallbackInfo *info) APP_LOGE("info is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { APP_LOGE("defaultAppProxy is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; @@ -687,7 +640,7 @@ napi_value SetDefaultApplicationSync(napi_env env, napi_callback_info info) if (ParamsProcessSetDefaultApplicationSync(env, info, type, want, userId) != ERR_OK) { return nRet; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { napi_value error = BusinessError::CreateCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, SET_DEFAULT_APPLICATION_SYNC); @@ -716,7 +669,7 @@ static ErrCode InnerResetDefaultApplication(const DefaultAppCallbackInfo *info) APP_LOGE("info is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { APP_LOGE("defaultAppProxy is null"); return ERROR_BUNDLE_SERVICE_EXCEPTION; @@ -847,7 +800,7 @@ napi_value ResetDefaultApplicationSync(napi_env env, napi_callback_info info) return nRet; } - auto defaultAppProxy = GetDefaultAppProxy(); + auto defaultAppProxy = CommonFunc::GetDefaultAppProxy(); if (defaultAppProxy == nullptr) { napi_value error = BusinessError::CreateCommonError(env, ERROR_BUNDLE_SERVICE_EXCEPTION, RESET_DEFAULT_APPLICATION_SYNC); diff --git a/interfaces/kits/js/free_install/free_install.cpp b/interfaces/kits/js/free_install/free_install.cpp index adee555b56889c62075c7ebb2db5069ea1750b93..48e53fb900c637ca2d36e3df3f34e0924ea213d8 100644 --- a/interfaces/kits/js/free_install/free_install.cpp +++ b/interfaces/kits/js/free_install/free_install.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -39,14 +39,6 @@ const std::vector BUNDLE_PACK_FLAGS = { BundlePackFlag::GET_BUNDLE_SUMMARY, BundlePackFlag::GET_MODULE_SUMMARY, }; -const char* RESOURCE_NAME_OF_IS_HAP_MODULE_REMOVABLE = "isHapModuleRemovable"; -const char* RESOURCE_NAME_OF_SET_HAP_MODULE_UPGRADE_FLAG = "setHapModuleUpgradeFlag"; -const char* RESOURCE_NAME_OF_GET_BUNDLE_PACK_INFO = "getBundlePackInfo"; -const char* RESOURCE_NAME_OF_GET_DISPATCH_INFO = "getDispatchInfo"; -const char* DISPATCH_INFO_VERSION = "1"; -const char* DISPATCH_INFO_DISPATCH_API = "1.0"; -const char* UPGRADE_FLAG = "upgradeFlag"; -const char* BUNDLE_PACK_FLAG = "bundlePackFlag"; } static ErrCode InnerIsHapModuleRemovable(const std::string &bundleName, diff --git a/interfaces/kits/js/installer/installer.cpp b/interfaces/kits/js/installer/installer.cpp index 4e27886d7ffc6f704bcc0dac19b5a0828c71586e..31acd1be0e4f18fe5dfb8b30851c5d3421e1a1cf 100644 --- a/interfaces/kits/js/installer/installer.cpp +++ b/interfaces/kits/js/installer/installer.cpp @@ -27,6 +27,7 @@ #include "common_func.h" #include "if_system_ability_manager.h" #include "installer_callback.h" +#include "installer_helper.h" #include "napi_arg.h" #include "napi_constants.h" #include "system_ability_definition.h" @@ -36,26 +37,8 @@ namespace OHOS { namespace AppExecFwk { namespace { // resource name -const char* RESOURCE_NAME_OF_GET_BUNDLE_INSTALLER = "GetBundleInstaller"; -const char* RESOURCE_NAME_OF_GET_BUNDLE_INSTALLER_SYNC = "GetBundleInstallerSync"; -const char* RESOURCE_NAME_OF_INSTALL = "Install"; -const char* RESOURCE_NAME_OF_UNINSTALL = "Uninstall"; -const char* RESOURCE_NAME_OF_RECOVER = "Recover"; -const char* RESOURCE_NAME_OF_UPDATE_BUNDLE_FOR_SELF = "UpdateBundleForSelf"; -const char* RESOURCE_NAME_OF_UNINSTALL_AND_RECOVER = "UninstallAndRecover"; const char* EMPTY_STRING = ""; // install message -constexpr const char* INSTALL_PERMISSION = - "ohos.permission.INSTALL_BUNDLE or " - "ohos.permission.INSTALL_ENTERPRISE_BUNDLE or " - "ohos.permission.INSTALL_ENTERPRISE_MDM_BUNDLE or " - "ohos.permission.INSTALL_ENTERPRISE_NORMAL_BUNDLE or " - "ohos.permission.INSTALL_INTERNALTESTING_BUNDLE"; -constexpr const char* UNINSTALL_PERMISSION = "ohos.permission.INSTALL_BUNDLE or ohos.permission.UNINSTALL_BUNDLE"; -constexpr const char* RECOVER_PERMISSION = "ohos.permission.INSTALL_BUNDLE or ohos.permission.RECOVER_BUNDLE"; -constexpr const char* INSTALL_SELF_PERMISSION = "ohos.permission.INSTALL_SELF_BUNDLE"; -constexpr const char* PARAMETERS = "parameters"; -constexpr const char* CORRESPONDING_TYPE = "corresponding type"; constexpr const char* FUNCTION_TYPE = "napi_function"; constexpr const char* CALLBACK = "callback"; // property name @@ -64,32 +47,18 @@ const char* IS_KEEP_DATA = "isKeepData"; const char* CROWD_TEST_DEADLINE = "crowdtestDeadline"; const char* HASH_VALUE = "hashValue"; const char* HASH_PARAMS = "hashParams"; -const char* FILE_PATH = "filePath"; -const char* ADD_EXT_RESOURCE = "AddExtResource"; -const char* REMOVE_EXT_RESOURCE = "RemoveExtResource"; const char* VERSION_CODE = "versionCode"; const char* SHARED_BUNDLE_DIR_PATHS = "sharedBundleDirPaths"; const char* SPECIFIED_DISTRIBUTION_TYPE = "specifiedDistributionType"; -const char* ADDITIONAL_INFO = "additionalInfo"; const char* VERIFY_CODE_PARAM = "verifyCodeParams"; const char* SIGNATURE_FILE_PATH = "signatureFilePath"; const char* PGO_PARAM = "pgoParams"; const char* PGO_FILE_PATH = "pgoFilePath"; const char* KEY = "key"; const char* VALUE = "value"; -const char* HAPS_FILE_NEEDED = - "BusinessError 401: Parameter error. parameter hapFiles is needed for code signature"; -const char* CREATE_APP_CLONE = "CreateAppClone"; -const char* DESTROY_APP_CLONE = "destroyAppClone"; -const char* INSTALL_PREEXISTING_APP = "installPreexistingApp"; -const char* INSTALL_PLUGIN = "InstallPlugin"; -const char* UNINSTALL_PLUGIN = "UninstallPlugin"; -const char* PLUGIN_BUNDLE_NAME = "pluginBundleName"; constexpr int32_t FIRST_PARAM = 0; constexpr int32_t SECOND_PARAM = 1; -constexpr int32_t SPECIFIED_DISTRIBUTION_TYPE_MAX_SIZE = 128; -constexpr int32_t ADDITIONAL_INFO_MAX_SIZE = 3000; constexpr int32_t ILLEGAL_APP_INDEX = -1; } // namespace napi_ref thread_local g_classBundleInstaller; @@ -238,218 +207,6 @@ napi_value GetBundleInstallerSync(napi_env env, napi_callback_info info) APP_LOGI("call GetBundleInstallerSync done"); } -static void CreateErrCodeMap(std::unordered_map &errCodeMap) -{ - errCodeMap = { - { IStatusReceiver::SUCCESS, SUCCESS}, - { IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALL_HOST_INSTALLER_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_PARAM_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_GET_PROXY_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALL_INSTALLD_SERVICE_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_UNINSTALL_BUNDLE_MGR_SERVICE_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_FAILED_SERVICE_DIED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_FAILED_GET_INSTALLER_PROXY, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_USER_CREATE_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_USER_REMOVE_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_UNINSTALL_KILLING_APP_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALL_GENERATE_UID_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALL_STATE_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_RECOVER_NOT_ALLOWED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_RECOVER_GET_BUNDLEPATH_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_UNINSTALL_AND_RECOVER_NOT_PREINSTALLED_BUNDLE, ERROR_BUNDLE_NOT_PREINSTALLED }, - { IStatusReceiver::ERR_UNINSTALL_SYSTEM_APP_ERROR, ERROR_UNINSTALL_PREINSTALL_APP_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_FAILED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_UNEXPECTED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_MISSING_BUNDLE, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_NO_PROFILE, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_BAD_PROFILE, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_TYPE_ERROR, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_MISSING_PROP, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_PERMISSION_ERROR, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_CHECK_ERROR, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_RPCID_FAILED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_NATIVE_SO_FAILED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_AN_FAILED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_MISSING_ABILITY, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_PROFILE_PARSE_FAIL, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_VERIFICATION_FAILED, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_INCOMPATIBLE_SIGNATURE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_INVALID_SIGNATURE_FILE_PATH, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE_FILE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_NO_BUNDLE_SIGNATURE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_APP_PKCS7_FAIL, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_APP_SOURCE_NOT_TRUESTED, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_BAD_DIGEST, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_INTEGRITY_VERIFICATION_FAILURE, - ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_BAD_PUBLICKEY, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_BAD_BUNDLE_SIGNATURE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_NO_PROFILE_BLOCK_FAIL, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_BUNDLE_SIGNATURE_VERIFICATION_FAILURE, - ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_VERIFY_SOURCE_INIT_FAIL, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_DEVICE_UNAUTHORIZED, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_SINGLETON_INCOMPATIBLE, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_U1_ENABLE_NOT_SAME_IN_ALL_BUNDLE_INFOS, ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_FAILED_INCONSISTENT_SIGNATURE, ERROR_INSTALL_FAILED_INCONSISTENT_SIGNATURE }, - { IStatusReceiver::ERR_INSTALL_PARAM_ERROR, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_UNINSTALL_PARAM_ERROR, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_RECOVER_INVALID_BUNDLE_NAME, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_UNINSTALL_INVALID_NAME, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_INSTALL_INVALID_BUNDLE_FILE, ERROR_INSTALL_HAP_FILEPATH_INVALID }, - { IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_EMPTY, ERROR_MODULE_NOT_EXIST }, - { IStatusReceiver::ERR_INSTALL_FAILED_MODULE_NAME_DUPLICATE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_FAILED_CHECK_HAP_HASH_PARAM, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_BUNDLE, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_UNINSTALL_MISSING_INSTALLED_MODULE, ERROR_MODULE_NOT_EXIST }, - { IStatusReceiver::ERR_USER_NOT_INSTALL_HAP, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID, ERROR_INSTALL_HAP_FILEPATH_INVALID }, - { IStatusReceiver::ERR_INSTALL_PERMISSION_DENIED, ERROR_PERMISSION_DENIED_ERROR }, - { IStatusReceiver::ERR_UNINSTALL_PERMISSION_DENIED, ERROR_PERMISSION_DENIED_ERROR }, - { IStatusReceiver::ERR_INSTALL_GRANT_REQUEST_PERMISSIONS_FAILED, ERROR_INSTALL_PERMISSION_CHECK_ERROR }, - { IStatusReceiver::ERR_INSTALL_UPDATE_HAP_TOKEN_FAILED, ERROR_INSTALL_PERMISSION_CHECK_ERROR }, - { IStatusReceiver::ERR_INSTALLD_CREATE_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_CHOWN_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_CREATE_DIR_EXIST, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_REMOVE_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_EXTRACT_FILES_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_RNAME_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALLD_CLEAN_DIR_FAILED, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_INSTALL_ENTRY_ALREADY_EXIST, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_ALREADY_EXIST, ERROR_INSTALL_ALREADY_EXIST }, - { IStatusReceiver::ERR_INSTALL_BUNDLENAME_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_VERSIONCODE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_VERSIONNAME_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_MINCOMPATIBLE_VERSIONCODE_NOT_SAME, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_VENDOR_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_RELEASETYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_RELEASETYPE_TARGET_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_RELEASETYPE_COMPATIBLE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_SINGLETON_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_ZERO_USER_WITH_NO_SINGLETON, ERROR_INSTALL_FAILED_CONTROLLED }, - { IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_APPTYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_URI_DUPLICATE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_VERSION_NOT_COMPATIBLE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_APP_DISTRIBUTION_TYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_APP_PROVISION_TYPE_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_SO_INCOMPATIBLE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_AN_INCOMPATIBLE, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_TYPE_ERROR, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_TYPE_ERROR, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_NOT_UNIQUE_DISTRO_MODULE_NAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_INCONSISTENT_MODULE_NAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_INVALID_NUMBER_OF_ENTRY_HAP, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_ASAN_ENABLED_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_ASAN_ENABLED_NOT_SUPPORT, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT}, - { IStatusReceiver::ERR_INSTALL_BUNDLE_TYPE_NOT_SAME, ERROR_INSTALL_PARSE_FAILED}, - { IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT, ERROR_INSTALL_NO_DISK_SPACE_LEFT }, - { IStatusReceiver::ERR_USER_NOT_EXIST, ERROR_INVALID_USER_ID }, - { IStatusReceiver::ERR_INSTALL_VERSION_DOWNGRADE, ERROR_INSTALL_VERSION_DOWNGRADE }, - { IStatusReceiver::ERR_INSTALL_DEVICE_TYPE_NOT_SUPPORTED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_CHECK_SYSCAP_FAILED_AND_DEVICE_TYPE_NOT_SUPPORTED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_PARSE_PROFILE_PROP_SIZE_CHECK_ERROR, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_INSTALL_DEPENDENT_MODULE_NOT_EXIST, ERROR_INSTALL_DEPENDENT_MODULE_NOT_EXIST }, - { IStatusReceiver::ERR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED, ERROR_INSTALL_SHARE_APP_LIBRARY_NOT_ALLOWED }, - { IStatusReceiver::ERR_INSTALL_COMPATIBLE_POLICY_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_FILE_IS_SHARED_LIBRARY, ERROR_INSTALL_FILE_IS_SHARED_LIBRARY }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_NAME, ERROR_BUNDLE_NOT_EXIST }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_MODULE_NAME, ERROR_MODULE_NOT_EXIST}, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_HAP_TYPE, ERROR_INVALID_TYPE }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_ERROR_BUNDLE_TYPE, ERROR_INVALID_TYPE }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_MISSED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_NAME_MISSED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_NAME_NOT_SAME, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INTERNAL_EXTERNAL_OVERLAY_EXISTED_SIMULTANEOUSLY, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_PRIORITY_NOT_SAME, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_PRIORITY, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INCONSISTENT_VERSION_CODE, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_SERVICE_EXCEPTION, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_BUNDLE_NAME_SAME_WITH_TARGET_BUNDLE_NAME, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT}, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_NO_SYSTEM_APPLICATION_FOR_EXTERNAL_OVERLAY, - ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_DIFFERENT_SIGNATURE_CERTIFICATE, - ERROR_INSTALL_VERIFY_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_BUNDLE_IS_OVERLAY_BUNDLE, - ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED }, - {IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_TARGET_MODULE_IS_OVERLAY_MODULE, - ERROR_INSTALL_HAP_OVERLAY_CHECK_FAILED }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_OVERLAY_TYPE_NOT_SAME, - ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_OVERLAY_INSTALLATION_FAILED_INVALID_BUNDLE_DIR, ERROR_BUNDLE_SERVICE_EXCEPTION }, - { IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST, - ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_NOT_EXIST}, - { IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED, - ERROR_UNINSTALL_SHARE_APP_LIBRARY_IS_RELIED}, - { IStatusReceiver::ERR_APPEXECFWK_UNINSTALL_BUNDLE_IS_SHARED_LIBRARY, - ERROR_UNINSTALL_BUNDLE_IS_SHARED_BUNDLE}, - { IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_URI_FAILED, - ERROR_INSTALL_WRONG_DATA_PROXY_URI}, - { IStatusReceiver::ERR_INSATLL_CHECK_PROXY_DATA_PERMISSION_FAILED, - ERROR_INSTALL_WRONG_DATA_PROXY_PERMISSION}, - { IStatusReceiver::ERR_INSTALL_FAILED_DEBUG_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT }, - { IStatusReceiver::ERR_INSTALL_DISALLOWED, ERROR_DISALLOW_INSTALL}, - { IStatusReceiver::ERR_INSTALL_ISOLATION_MODE_FAILED, ERROR_INSTALL_WRONG_MODE_ISOLATION }, - { IStatusReceiver::ERR_UNINSTALL_DISALLOWED, ERROR_DISALLOW_UNINSTALL }, - { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID, ERROR_INSTALL_CODE_SIGNATURE_FAILED}, - { IStatusReceiver::ERR_UNINSTALL_FROM_BMS_EXTENSION_FAILED, ERROR_BUNDLE_NOT_EXIST}, - { IStatusReceiver::ERR_INSTALL_SELF_UPDATE_NOT_MDM, ERROR_INSTALL_SELF_UPDATE_NOT_MDM}, - { IStatusReceiver::ERR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED, ERROR_INSTALL_ENTERPRISE_BUNDLE_NOT_ALLOWED}, - { IStatusReceiver::ERR_INSTALL_EXISTED_ENTERPRISE_BUNDLE_NOT_ALLOWED, - ERROR_INSTALL_EXISTED_ENTERPRISE_NOT_ALLOWED_ERROR}, - { IStatusReceiver::ERR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME, ERROR_INSTALL_SELF_UPDATE_BUNDLENAME_NOT_SAME}, - { IStatusReceiver::ERR_INSTALL_GWP_ASAN_ENABLED_NOT_SAME, ERROR_INSTALL_MULTIPLE_HAP_INFO_INCONSISTENT}, - { IStatusReceiver::ERR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED, ERROR_INSTALL_DEBUG_BUNDLE_NOT_ALLOWED}, - { IStatusReceiver::ERR_INSTALL_CHECK_ENCRYPTION_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED }, - { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_DELIVERY_FILE_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED}, - { IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_REMOVE_FILE_FAILED, ERROR_INSTALL_CODE_SIGNATURE_FAILED}, - { IStatusReceiver::ERR_INSTALL_CODE_APP_CONTROLLED_FAILED, ERROR_INSTALL_FAILED_CONTROLLED}, - { IStatusReceiver::ERR_APPEXECFWK_INSTALL_FORCE_UNINSTALLED_BUNDLE_NOT_ALLOW_RECOVER, - ERROR_INSTALL_FAILED_CONTROLLED}, - { IStatusReceiver::ERR_APPEXECFWK_INSTALL_PREINSTALL_BUNDLE_ONLY_ALLOW_FORCE_UNINSTALLED_BY_EDC, - ERROR_INSTALL_FAILED_CONTROLLED}, - { IStatusReceiver::ERR_INSTALL_NATIVE_FAILED, ERROR_INSTALL_NATIVE_FAILED}, - { IStatusReceiver::ERR_UNINSTALL_NATIVE_FAILED, ERROR_UNINSTALL_NATIVE_FAILED}, - { IStatusReceiver::ERR_UNINSTALL_DISPOSED_RULE_DENIED, ERROR_APPLICATION_UNINSTALL}, - { IStatusReceiver::ERR_NATIVE_HNP_EXTRACT_FAILED, ERROR_INSTALL_NATIVE_FAILED}, - { IStatusReceiver::ERR_UNINSTALL_CONTROLLED, ERROR_BUNDLE_CAN_NOT_BE_UNINSTALLED }, - { IStatusReceiver::ERR_INSTALL_DEBUG_ENCRYPTED_BUNDLE_FAILED, ERROR_INSTALL_PARSE_FAILED }, - { IStatusReceiver::ERR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL_ISR, - ERROR_APP_DISTRIBUTION_TYPE_NOT_ALLOW_INSTALL}, - { IStatusReceiver::ERR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED, - ERROR_INSTALL_FAILED_AND_RESTORE_TO_PREINSTALLED }, - { IStatusReceiver::ERR_INSTALL_U1ENABLE_CAN_ONLY_INSTALL_IN_U1_WITH_NOT_SINGLETON, - ERROR_INSTALL_FAILED_CONTROLLED }, - { IStatusReceiver::ERR_INSTALL_BUNDLE_CAN_NOT_BOTH_EXISTED_IN_U1_AND_OTHER_USERS, - ERROR_INSTALL_FAILED_CONTROLLED }, - { IStatusReceiver::ERR_INSTALL_U1_ENABLE_NOT_SUPPORT_APP_SERVICE_AND_SHARED_BUNDLE, - ERROR_INSTALL_FAILED_CONTROLLED}, - }; -} - -static void ConvertInstallResult(InstallResult &installResult) -{ - APP_LOGD("ConvertInstallResult msg %{public}s, errCode is %{public}d", installResult.resultMsg.c_str(), - installResult.resultCode); - std::unordered_map errCodeMap; - CreateErrCodeMap(errCodeMap); - auto iter = errCodeMap.find(installResult.resultCode); - if (iter != errCodeMap.end()) { - installResult.resultCode = iter->second; - return; - } - installResult.resultCode = ERROR_BUNDLE_SERVICE_EXCEPTION; -} - static bool ParseHashParam(napi_env env, napi_value args, std::string &key, std::string &value) { APP_LOGD("start to parse moduleName"); @@ -962,18 +719,6 @@ static bool ParseUninstallParam(napi_env env, napi_value args, UninstallParam &u return true; } -static void CreateProxyErrCode(std::unordered_map &errCodeMap) -{ - errCodeMap = { - { ERR_APPEXECFWK_INSTALL_PARAM_ERROR, IStatusReceiver::ERR_INSTALL_PARAM_ERROR }, - { ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR, IStatusReceiver::ERR_INSTALL_INTERNAL_ERROR }, - { ERR_APPEXECFWK_INSTALL_FILE_PATH_INVALID, IStatusReceiver::ERR_INSTALL_FILE_PATH_INVALID }, - { ERR_APPEXECFWK_INSTALL_DISK_MEM_INSUFFICIENT, IStatusReceiver::ERR_INSTALL_DISK_MEM_INSUFFICIENT }, - { ERR_BUNDLEMANAGER_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID, - IStatusReceiver::ERR_INSTALL_CODE_SIGNATURE_FILE_IS_INVALID} - }; -} - void InstallExecuter(napi_env env, void *data) { AsyncInstallCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1016,7 +761,7 @@ void InstallExecuter(napi_env env, void *data) } APP_LOGE("install failed due to %{public}d", res); std::unordered_map proxyErrCodeMap; - CreateProxyErrCode(proxyErrCodeMap); + InstallerHelper::CreateProxyErrCode(proxyErrCodeMap); if (proxyErrCodeMap.find(res) != proxyErrCodeMap.end()) { installResult.resultCode = proxyErrCodeMap.at(res); // append inner error code to TS interface result message @@ -1047,7 +792,7 @@ void OperationCompleted(napi_env env, napi_status status, void *data) AsyncInstallCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); std::unique_ptr callbackPtr {asyncCallbackInfo}; napi_value result[CALLBACK_PARAM_SIZE] = {0}; - ConvertInstallResult(callbackPtr->installResult); + InstallerHelper::ConvertInstallResult(callbackPtr->installResult); if (callbackPtr->installResult.resultCode != SUCCESS) { switch (callbackPtr->option) { case InstallOption::INSTALL: @@ -1137,7 +882,7 @@ napi_value Install(napi_env env, napi_callback_info info) return nullptr; } if (callbackPtr->hapFiles.empty() && !callbackPtr->installParam.verifyCodeParams.empty()) { - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, HAPS_FILE_NEEDED); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_HAPS_FILE_EMPTY_ERROR); return nullptr; } auto promise = CommonFunc::AsyncCallNativeMethod(env, callbackPtr.get(), RESOURCE_NAME_OF_INSTALL, InstallExecuter, @@ -1396,7 +1141,7 @@ napi_value UpdateBundleForSelf(napi_env env, napi_callback_info info) return nullptr; } if (callbackPtr->hapFiles.empty() && !callbackPtr->installParam.verifyCodeParams.empty()) { - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, HAPS_FILE_NEEDED); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARAM_HAPS_FILE_EMPTY_ERROR); return nullptr; } callbackPtr->installParam.isSelfUpdate = true; @@ -1476,30 +1221,6 @@ napi_value UninstallAndRecover(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerAddExtResource( - const std::string &bundleName, const std::vector &filePaths) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - - std::vector destFiles; - ErrCode ret = extResourceManager->CopyFiles(filePaths, destFiles); - if (ret != ERR_OK) { - APP_LOGE("CopyFiles failed"); - return CommonFunc::ConvertErrCode(ret); - } - - ret = extResourceManager->AddExtResource(bundleName, destFiles); - if (ret != ERR_OK) { - APP_LOGE("AddExtResource failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void AddExtResourceExec(napi_env env, void *data) { ExtResourceCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1507,7 +1228,7 @@ void AddExtResourceExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerAddExtResource( + asyncCallbackInfo->err = InstallerHelper::InnerAddExtResource( asyncCallbackInfo->bundleName, asyncCallbackInfo->filePaths); } @@ -1573,23 +1294,6 @@ napi_value AddExtResource(napi_env env, napi_callback_info info) return promise; } -ErrCode InnerRemoveExtResource( - const std::string &bundleName, const std::vector &moduleNames) -{ - auto extResourceManager = CommonFunc::GetExtendResourceManager(); - if (extResourceManager == nullptr) { - APP_LOGE("extResourceManager is null"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - - ErrCode ret = extResourceManager->RemoveExtResource(bundleName, moduleNames); - if (ret != ERR_OK) { - APP_LOGE("RemoveExtResource failed"); - } - - return CommonFunc::ConvertErrCode(ret); -} - void RemoveExtResourceExec(napi_env env, void *data) { ExtResourceCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1597,7 +1301,7 @@ void RemoveExtResourceExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerRemoveExtResource( + asyncCallbackInfo->err = InstallerHelper::InnerRemoveExtResource( asyncCallbackInfo->bundleName, asyncCallbackInfo->moduleNames); } @@ -1615,7 +1319,7 @@ void RemoveExtResourceComplete(napi_env env, napi_status status, void *data) NAPI_CALL_RETURN_VOID(env, napi_get_null(env, &result[0])); } else { result[0] = BusinessError::CreateCommonError( - env, asyncCallbackInfo->err, REMOVE_EXT_RESOURCE, Constants::PERMISSION_INSTALL_BUNDLE); + env, asyncCallbackInfo->err, REMOVE_EXT_RESOURCE, UNINSTALL_PERMISSION); } CommonFunc::NapiReturnDeferred( @@ -1663,23 +1367,6 @@ napi_value RemoveExtResource(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerCreateAppClone(std::string &bundleName, int32_t userId, int32_t &appIndex) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); - if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { - APP_LOGE("can not get iBundleInstaller"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode result = iBundleInstaller->InstallCloneApp(bundleName, userId, appIndex); - APP_LOGD("InstallCloneApp result is %{public}d", result); - return result; -} - void CreateAppCloneExec(napi_env env, void *data) { CreateAppCloneCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1691,8 +1378,8 @@ void CreateAppCloneExec(napi_env env, void *data) asyncCallbackInfo->bundleName.c_str(), asyncCallbackInfo->userId, asyncCallbackInfo->appIndex); - asyncCallbackInfo->err = - InnerCreateAppClone(asyncCallbackInfo->bundleName, asyncCallbackInfo->userId, asyncCallbackInfo->appIndex); + asyncCallbackInfo->err = InstallerHelper::InnerCreateAppClone(asyncCallbackInfo->bundleName, + asyncCallbackInfo->userId, asyncCallbackInfo->appIndex); } void CreateAppCloneComplete(napi_env env, napi_status status, void *data) @@ -1773,24 +1460,6 @@ napi_value CreateAppClone(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerDestroyAppClone(std::string &bundleName, int32_t userId, int32_t appIndex, - DestroyAppCloneParam &destroyAppCloneParam) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); - if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { - APP_LOGE("can not get iBundleInstaller"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode result = iBundleInstaller->UninstallCloneApp(bundleName, userId, appIndex, destroyAppCloneParam); - APP_LOGD("UninstallCloneApp result is %{public}d", result); - return result; -} - void DestroyAppCloneExec(napi_env env, void *data) { CreateAppCloneCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1802,9 +1471,8 @@ void DestroyAppCloneExec(napi_env env, void *data) asyncCallbackInfo->bundleName.c_str(), asyncCallbackInfo->userId, asyncCallbackInfo->appIndex); - asyncCallbackInfo->err = - InnerDestroyAppClone(asyncCallbackInfo->bundleName, asyncCallbackInfo->userId, - asyncCallbackInfo->appIndex, asyncCallbackInfo->destroyAppCloneParam); + asyncCallbackInfo->err = InstallerHelper::InnerDestroyAppClone(asyncCallbackInfo->bundleName, + asyncCallbackInfo->userId, asyncCallbackInfo->appIndex, asyncCallbackInfo->destroyAppCloneParam); } void DestroyAppCloneComplete(napi_env env, napi_status status, void *data) @@ -1898,23 +1566,6 @@ napi_value DestroyAppClone(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerInstallPreexistingApp(std::string &bundleName, int32_t userId) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); - if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { - APP_LOGE("can not get iBundleInstaller"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode result = iBundleInstaller->InstallExisted(bundleName, userId); - APP_LOGD("result is %{public}d", result); - return result; -} - void InstallPreexistingAppExec(napi_env env, void *data) { InstallPreexistingAppCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -1926,7 +1577,7 @@ void InstallPreexistingAppExec(napi_env env, void *data) asyncCallbackInfo->bundleName.c_str(), asyncCallbackInfo->userId); asyncCallbackInfo->err = - InnerInstallPreexistingApp(asyncCallbackInfo->bundleName, asyncCallbackInfo->userId); + InstallerHelper::InnerInstallPreexistingApp(asyncCallbackInfo->bundleName, asyncCallbackInfo->userId); } void InstallPreexistingAppComplete(napi_env env, napi_status status, void *data) @@ -2005,24 +1656,6 @@ void ParseInstallPluginParam(napi_env env, napi_value args, InstallPluginParam & } } -static ErrCode InnerInstallPlugin(const std::string &hostBundleName, - const std::vector &pluginFilePaths, const InstallPluginParam &installPluginParam) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); - if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { - APP_LOGE("can not get iBundleInstaller"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode result = iBundleInstaller->InstallPlugin(hostBundleName, pluginFilePaths, installPluginParam); - APP_LOGD("InstallPlugin result is %{public}d", result); - return result; -} - void InstallPluginExec(napi_env env, void *data) { PluginCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -2030,7 +1663,7 @@ void InstallPluginExec(napi_env env, void *data) APP_LOGE("asyncCallbackInfo is null"); return; } - asyncCallbackInfo->err = InnerInstallPlugin(asyncCallbackInfo->hostBundleName, + asyncCallbackInfo->err = InstallerHelper::InnerInstallPlugin(asyncCallbackInfo->hostBundleName, asyncCallbackInfo->pluginFilePaths, asyncCallbackInfo->installPluginParam); } @@ -2101,24 +1734,6 @@ napi_value InstallPlugin(napi_env env, napi_callback_info info) return promise; } -static ErrCode InnerUninstallPlugin(const std::string &hostBundleName, - const std::string &pluginBundleName, const InstallPluginParam &installPluginParam) -{ - auto iBundleMgr = CommonFunc::GetBundleMgr(); - if (iBundleMgr == nullptr) { - APP_LOGE("can not get iBundleMgr"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - auto iBundleInstaller = iBundleMgr->GetBundleInstaller(); - if ((iBundleInstaller == nullptr) || (iBundleInstaller->AsObject() == nullptr)) { - APP_LOGE("can not get iBundleInstaller"); - return ERROR_BUNDLE_SERVICE_EXCEPTION; - } - ErrCode result = iBundleInstaller->UninstallPlugin(hostBundleName, pluginBundleName, installPluginParam); - APP_LOGD("UninstallPlugin result is %{public}d", result); - return result; -} - void UninstallPluginExec(napi_env env, void *data) { PluginCallbackInfo *asyncCallbackInfo = reinterpret_cast(data); @@ -2130,7 +1745,7 @@ void UninstallPluginExec(napi_env env, void *data) asyncCallbackInfo->hostBundleName.c_str(), asyncCallbackInfo->pluginBundleName.c_str(), asyncCallbackInfo->installPluginParam.userId); - asyncCallbackInfo->err = InnerUninstallPlugin(asyncCallbackInfo->hostBundleName, + asyncCallbackInfo->err = InstallerHelper::InnerUninstallPlugin(asyncCallbackInfo->hostBundleName, asyncCallbackInfo->pluginBundleName, asyncCallbackInfo->installPluginParam); } diff --git a/interfaces/kits/js/installer/installer.h b/interfaces/kits/js/installer/installer.h index fbbdeb1380e3096bad0352a53d5fa8233f449dd4..5a4fe08c3261aed08617a3c56a57e57c1e8fdaf4 100755 --- a/interfaces/kits/js/installer/installer.h +++ b/interfaces/kits/js/installer/installer.h @@ -1,120 +1,105 @@ -/* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_H -#define FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_H - -#include "base_cb_info.h" -#include "clone_param.h" -#include "install_param.h" -#include "plugin/install_plugin_param.h" -#include "napi/native_api.h" -#include "napi/native_common.h" -#include "napi/native_node_api.h" - -namespace OHOS { -namespace AppExecFwk { -extern thread_local napi_ref g_classBundleInstaller; - -struct InstallResult { - int32_t resultCode = 0; - std::string resultMsg; - int32_t innerCode = 0; -}; - -enum class InstallOption { - INSTALL = 0, - RECOVER = 1, - UNINSTALL = 2, - UPDATE_BUNDLE_FOR_SELF = 3, - UNKNOWN = 4, - UNINSTALL_AND_RECOVER = 5, -}; - -struct AsyncInstallCallbackInfo { - explicit AsyncInstallCallbackInfo(napi_env napiEnv) : env(napiEnv) {} - ~AsyncInstallCallbackInfo(); - - int32_t err = 0; - InstallOption option = InstallOption::UNKNOWN; - std::string bundleName; - std::string param; - napi_env env; - napi_async_work asyncWork = nullptr; - napi_deferred deferred = nullptr; - napi_ref callback = nullptr; - std::vector hapFiles; - OHOS::AppExecFwk::InstallParam installParam; - OHOS::AppExecFwk::UninstallParam uninstallParam; - InstallResult installResult; -}; - -struct AsyncGetBundleInstallerCallbackInfo { - explicit AsyncGetBundleInstallerCallbackInfo(napi_env napiEnv) : env(napiEnv) {} - ~AsyncGetBundleInstallerCallbackInfo(); - - napi_env env; - napi_async_work asyncWork = nullptr; - napi_deferred deferred = nullptr; - napi_ref callback = nullptr; -}; - -struct ExtResourceCallbackInfo : public BaseCallbackInfo { - explicit ExtResourceCallbackInfo(napi_env env) : BaseCallbackInfo(env) {} - std::string bundleName; - std::vector moduleNames; - std::vector filePaths; -}; - -struct CreateAppCloneCallbackInfo : public BaseCallbackInfo { - explicit CreateAppCloneCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} - int32_t userId = Constants::UNSPECIFIED_USERID; - int32_t appIndex = Constants::INITIAL_APP_INDEX; - std::string bundleName; - OHOS::AppExecFwk::DestroyAppCloneParam destroyAppCloneParam; -}; - -struct InstallPreexistingAppCallbackInfo : public BaseCallbackInfo { - explicit InstallPreexistingAppCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} - int32_t userId = Constants::UNSPECIFIED_USERID; - std::string bundleName; -}; - -struct PluginCallbackInfo : public BaseCallbackInfo { - explicit PluginCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} - std::string hostBundleName; - std::vector pluginFilePaths; - std::string pluginBundleName; - OHOS::AppExecFwk::InstallPluginParam installPluginParam; -}; - -napi_value GetBundleInstaller(napi_env env, napi_callback_info info); -napi_value GetBundleInstallerSync(napi_env env, napi_callback_info info); -napi_value Install(napi_env env, napi_callback_info info); -napi_value Recover(napi_env env, napi_callback_info info); -napi_value Uninstall(napi_env env, napi_callback_info info); -napi_value BundleInstallerConstructor(napi_env env, napi_callback_info info); -napi_value UpdateBundleForSelf(napi_env env, napi_callback_info info); -napi_value UninstallAndRecover(napi_env env, napi_callback_info info); -napi_value AddExtResource(napi_env env, napi_callback_info info); -napi_value RemoveExtResource(napi_env env, napi_callback_info info); -napi_value CreateAppClone(napi_env env, napi_callback_info info); -napi_value DestroyAppClone(napi_env env, napi_callback_info info); -napi_value InstallPreexistingApp(napi_env env, napi_callback_info info); -napi_value InstallPlugin(napi_env env, napi_callback_info info); -napi_value UninstallPlugin(napi_env env, napi_callback_info info); -} // AppExecFwk -} // OHOS +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_H +#define FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_H + +#include "base_cb_info.h" +#include "clone_param.h" +#include "install_param.h" +#include "installer_helper.h" +#include "napi/native_api.h" +#include "napi/native_common.h" +#include "napi/native_node_api.h" + +namespace OHOS { +namespace AppExecFwk { +extern thread_local napi_ref g_classBundleInstaller; + +struct AsyncInstallCallbackInfo { + explicit AsyncInstallCallbackInfo(napi_env napiEnv) : env(napiEnv) {} + ~AsyncInstallCallbackInfo(); + + int32_t err = 0; + InstallOption option = InstallOption::UNKNOWN; + std::string bundleName; + std::string param; + napi_env env; + napi_async_work asyncWork = nullptr; + napi_deferred deferred = nullptr; + napi_ref callback = nullptr; + std::vector hapFiles; + OHOS::AppExecFwk::InstallParam installParam; + OHOS::AppExecFwk::UninstallParam uninstallParam; + InstallResult installResult; +}; + +struct AsyncGetBundleInstallerCallbackInfo { + explicit AsyncGetBundleInstallerCallbackInfo(napi_env napiEnv) : env(napiEnv) {} + ~AsyncGetBundleInstallerCallbackInfo(); + + napi_env env; + napi_async_work asyncWork = nullptr; + napi_deferred deferred = nullptr; + napi_ref callback = nullptr; +}; + +struct ExtResourceCallbackInfo : public BaseCallbackInfo { + explicit ExtResourceCallbackInfo(napi_env env) : BaseCallbackInfo(env) {} + std::string bundleName; + std::vector moduleNames; + std::vector filePaths; +}; + +struct CreateAppCloneCallbackInfo : public BaseCallbackInfo { + explicit CreateAppCloneCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} + int32_t userId = Constants::UNSPECIFIED_USERID; + int32_t appIndex = Constants::INITIAL_APP_INDEX; + std::string bundleName; + OHOS::AppExecFwk::DestroyAppCloneParam destroyAppCloneParam; +}; + +struct InstallPreexistingAppCallbackInfo : public BaseCallbackInfo { + explicit InstallPreexistingAppCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} + int32_t userId = Constants::UNSPECIFIED_USERID; + std::string bundleName; +}; + +struct PluginCallbackInfo : public BaseCallbackInfo { + explicit PluginCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} + std::string hostBundleName; + std::vector pluginFilePaths; + std::string pluginBundleName; + OHOS::AppExecFwk::InstallPluginParam installPluginParam; +}; + +napi_value GetBundleInstaller(napi_env env, napi_callback_info info); +napi_value GetBundleInstallerSync(napi_env env, napi_callback_info info); +napi_value Install(napi_env env, napi_callback_info info); +napi_value Recover(napi_env env, napi_callback_info info); +napi_value Uninstall(napi_env env, napi_callback_info info); +napi_value BundleInstallerConstructor(napi_env env, napi_callback_info info); +napi_value UpdateBundleForSelf(napi_env env, napi_callback_info info); +napi_value UninstallAndRecover(napi_env env, napi_callback_info info); +napi_value AddExtResource(napi_env env, napi_callback_info info); +napi_value RemoveExtResource(napi_env env, napi_callback_info info); +napi_value CreateAppClone(napi_env env, napi_callback_info info); +napi_value DestroyAppClone(napi_env env, napi_callback_info info); +napi_value InstallPreexistingApp(napi_env env, napi_callback_info info); +napi_value InstallPlugin(napi_env env, napi_callback_info info); +napi_value UninstallPlugin(napi_env env, napi_callback_info info); +} // AppExecFwk +} // OHOS #endif // FOUNDATION_BUNDLEMGR_SERVICES_KITS_INCLUDE_INSTALLER_H \ No newline at end of file diff --git a/interfaces/kits/js/launcher_bundle_manager/launcher_bundle_manager.cpp b/interfaces/kits/js/launcher_bundle_manager/launcher_bundle_manager.cpp index 02ff9df48eca4f29809c6099378ad18693c66535..c7920bb19fafb72534a6a4668ac062b6f3731333 100644 --- a/interfaces/kits/js/launcher_bundle_manager/launcher_bundle_manager.cpp +++ b/interfaces/kits/js/launcher_bundle_manager/launcher_bundle_manager.cpp @@ -32,12 +32,6 @@ namespace OHOS { namespace AppExecFwk { namespace { -constexpr const char* GET_LAUNCHER_ABILITY_INFO = "GetLauncherAbilityInfo"; -constexpr const char* GET_LAUNCHER_ABILITY_INFO_SYNC = "GetLauncherAbilityInfoSync"; -constexpr const char* GET_ALL_LAUNCHER_ABILITY_INFO = "GetAllLauncherAbilityInfo"; -constexpr const char* PARSE_SHORTCUT_INFO = "parse ShortcutInfo failed"; -constexpr const char* PARSE_REASON_MESSAGE = "parse ReasonMessage failed"; -constexpr const char* START_SHORTCUT_WITH_REASON = "StartShortcutWithReason"; const std::map START_SHORTCUT_RES_MAP = { {ERR_OK, ERR_OK}, @@ -396,7 +390,7 @@ bool ParseGetShortcutInfoAppIndex(napi_env env, napi_value args, int32_t &appInd { if (!CommonFunc::ParseInt(env, args, appIndex)) { APP_LOGE("parse appIndex failed"); - BusinessError::ThrowParameterTypeError(env, ERROR_INVALID_APPINDEX, APP_INDEX, TYPE_NUMBER); + BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, APP_INDEX, TYPE_NUMBER); return false; } if (appIndex < Constants::MAIN_APP_INDEX || appIndex > Constants::CLONE_APP_INDEX_MAX) { @@ -418,7 +412,7 @@ napi_value GetShortcutInfoByAppIndex(napi_env env, napi_callback_info info) } std::string bundleName; if (!CommonFunc::ParseString(env, args[ARGS_POS_ZERO], bundleName)) { - BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, USER_ID, TYPE_NUMBER); + BusinessError::ThrowParameterTypeError(env, ERROR_PARAM_CHECK_ERROR, BUNDLE_NAME, TYPE_STRING); return nullptr; } @@ -430,7 +424,7 @@ napi_value GetShortcutInfoByAppIndex(napi_env env, napi_callback_info info) auto launcherService = GetLauncherService(); if (launcherService == nullptr) { napi_value businessError = BusinessError::CreateCommonError( - env, ERROR_BUNDLE_SERVICE_EXCEPTION, GET_SHORTCUT_INFO_SYNC, + env, ERROR_BUNDLE_SERVICE_EXCEPTION, GET_SHORTCUT_INFO_BY_APPINDEX, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); napi_throw(env, businessError); return nullptr; @@ -441,14 +435,14 @@ napi_value GetShortcutInfoByAppIndex(napi_env env, napi_callback_info info) if (ret != SUCCESS) { APP_LOGE("failed, ret %{public}d", ret); napi_value businessError = BusinessError::CreateCommonError( - env, ret, GET_SHORTCUT_INFO_SYNC, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); + env, ret, GET_SHORTCUT_INFO_BY_APPINDEX, Constants::PERMISSION_GET_BUNDLE_INFO_PRIVILEGED); napi_throw(env, businessError); return nullptr; } napi_value nShortcutInfos = nullptr; NAPI_CALL(env, napi_create_array(env, &nShortcutInfos)); CommonFunc::ConvertShortCutInfos(env, shortcutInfos, nShortcutInfos); - APP_LOGI_NOFUNC("call GetShortcutInfoSync done"); + APP_LOGI_NOFUNC("call GetShortcutInfoByAppIndex done"); return nShortcutInfos; } @@ -528,7 +522,7 @@ napi_value StartShortcut(napi_env env, napi_callback_info info) NAPI_CALL(env, napi_typeof(env, args[i], &valueType)); if (i == ARGS_POS_ZERO) { if (!CommonFunc::ParseShortCutInfo(env, args[ARGS_POS_ZERO], asyncCallbackInfo->shortcutInfo)) { - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO_FAILED); return nullptr; } if (asyncCallbackInfo->shortcutInfo.intents.empty()) { @@ -538,7 +532,7 @@ napi_value StartShortcut(napi_env env, napi_callback_info info) } else if (i == ARGS_POS_ONE) { if ((valueType == napi_object) && (!AppExecFwk::UnwrapStartOptions(env, args[ARGS_POS_ONE], asyncCallbackInfo->startOptions))) { - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS_FAILED); return nullptr; } } else { @@ -636,7 +630,7 @@ napi_value StartShortcutWithReason(napi_env env, napi_callback_info info) NAPI_CALL(env, napi_typeof(env, args[i], &valueType)); if (i == ARGS_POS_ZERO) { if (!CommonFunc::ParseShortCutInfo(env, args[ARGS_POS_ZERO], asyncCallbackInfo->shortcutInfo)) { - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO_FAILED); return nullptr; } } else if (i == ARGS_POS_ONE) { @@ -647,7 +641,7 @@ napi_value StartShortcutWithReason(napi_env env, napi_callback_info info) } else if (i == ARGS_POS_TWO) { if ((valueType == napi_object) && (!AppExecFwk::UnwrapStartOptions(env, args[ARGS_POS_TWO], asyncCallbackInfo->startOptions))) { - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_START_OPTIONS_FAILED); return nullptr; } } else { diff --git a/interfaces/kits/js/overlay/js_app_overlay.cpp b/interfaces/kits/js/overlay/js_app_overlay.cpp index b2dbf36abbe46118504f2b691b5323ce4f75fe5d..f66ce7c62193ba9a41b43c1fc78d051f2c9e4972 100644 --- a/interfaces/kits/js/overlay/js_app_overlay.cpp +++ b/interfaces/kits/js/overlay/js_app_overlay.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2023-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -30,37 +30,10 @@ namespace OHOS { namespace AppExecFwk { using namespace OHOS::AAFwk; -namespace { -const std::string TARGET_MODULE_NAME = "targetModuleName"; -const std::string TARGET_BUNDLE_NAME = "targetBundleName"; -const std::string IS_ENABLED = "isEnabled"; -const std::string SET_OVERLAY_ENABLED = "SetOverlayEnabled"; -const std::string SET_OVERLAY_ENABLED_BY_BUNDLE_NAME = "SetOverlayEnabledByBundleName"; -const std::string GET_OVERLAY_MODULE_INFO = "GetOverlayModuleInfo"; -const std::string GET_TARGET_OVERLAY_MODULE_INFOS = "GetTargetOverlayModuleInfos"; -const std::string GET_OVERLAY_MODULE_INFO_BY_BUNDLE_NAME = "GetOverlayModuleInfoByBundleName"; -const std::string GET_TARGET_OVERLAY_MODULE_INFOS_BY_BUNDLE_NAME = "GetTargetOverlayModuleInfosByBundleName"; -} // namespace - -static OHOS::sptr GetOverlayMgrProxy() -{ - auto bundleMgr = CommonFunc::GetBundleMgr(); - if (bundleMgr == nullptr) { - APP_LOGE("CommonFunc::GetBundleMgr failed"); - return nullptr; - } - auto overlayMgrProxy = bundleMgr->GetOverlayManagerProxy(); - if (overlayMgrProxy == nullptr) { - APP_LOGE("GetOverlayManagerProxy failed"); - return nullptr; - } - return overlayMgrProxy; -} - static ErrCode InnerSetOverlayEnabledExec(napi_env, OverlayCallbackInfo *callback) { - auto overlayMgrProxy = GetOverlayMgrProxy(); + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); if (overlayMgrProxy == nullptr) { APP_LOGE("overlayMgrProxy is null"); return ERROR_SYSTEM_ABILITY_NOT_FOUND; @@ -224,7 +197,7 @@ static ErrCode InnerGetOverlayModuleInfoExec(napi_env, OverlayCallbackInfo *over return ERROR_BUNDLE_SERVICE_EXCEPTION; } - auto overlayMgrProxy = GetOverlayMgrProxy(); + auto overlayMgrProxy = CommonFunc::GetOverlayMgrProxy(); if (overlayMgrProxy == nullptr) { APP_LOGE("overlayMgrProxy is null"); return ERROR_SYSTEM_ABILITY_NOT_FOUND; diff --git a/interfaces/kits/js/shortcut_manager/shortcut_manager.cpp b/interfaces/kits/js/shortcut_manager/shortcut_manager.cpp index fba6be026974e96742ee74bbef2a4b06e89ce172..1a74eabdb80796752147fa550bbe9b744bb0659a 100644 --- a/interfaces/kits/js/shortcut_manager/shortcut_manager.cpp +++ b/interfaces/kits/js/shortcut_manager/shortcut_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,11 +29,6 @@ namespace OHOS { namespace AppExecFwk { -namespace { -constexpr const char* PARSE_SHORTCUT_INFO = "ParseShortCutInfo"; -constexpr const char* SET_SHORTCUT_VISIBLE = "SetShortcutVisibleForSelf"; -constexpr const char* GET_ALL_SHORTCUT_INFO_FOR_SELF = "GetAllShortcutInfoForSelf"; -} static ErrCode InnerAddDesktopShortcutInfo(const OHOS::AppExecFwk::ShortcutInfo &shortcutInfo, int32_t userId) { auto iBundleMgr = CommonFunc::GetBundleMgr(); @@ -94,7 +89,7 @@ napi_value AddDesktopShortcutInfo(napi_env env, napi_callback_info info) if (!CommonFunc::ParseShortCutInfo(env, args[ARGS_POS_ZERO], asyncCallbackInfo->shortcutInfo) || !CommonFunc::CheckShortcutInfo(asyncCallbackInfo->shortcutInfo)) { APP_LOGE("ParseShortCutInfo is error"); - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_SHORTCUT_INFO_ERROR); return nullptr; } if (!CommonFunc::ParseInt(env, args[ARGS_POS_ONE], asyncCallbackInfo->userId)) { @@ -176,7 +171,7 @@ napi_value DeleteDesktopShortcutInfo(napi_env env, napi_callback_info info) if (!CommonFunc::ParseShortCutInfo(env, args[ARGS_POS_ZERO], asyncCallbackInfo->shortcutInfo) || !CommonFunc::CheckShortcutInfo(asyncCallbackInfo->shortcutInfo)) { APP_LOGE("ParseShortCutInfo is error"); - BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, PARSE_SHORTCUT_INFO); + BusinessError::ThrowError(env, ERROR_PARAM_CHECK_ERROR, INVALID_SHORTCUT_INFO_ERROR); return nullptr; } if (!CommonFunc::ParseInt(env, args[ARGS_POS_ONE], asyncCallbackInfo->userId)) { diff --git a/interfaces/kits/js/zip/BUILD.gn b/interfaces/kits/js/zip/BUILD.gn index 8d717c8598655dd3eb0edb1558f2fd097df4a368..83eca9dffb08b42a8b5a6744a6c62e01a182abb1 100644 --- a/interfaces/kits/js/zip/BUILD.gn +++ b/interfaces/kits/js/zip/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -46,6 +46,7 @@ ohos_shared_library("zlib") { public_configs = [ ":zip_config" ] sources = [ + "napi/class_checksum/checksum_common_func.cpp", "napi/class_checksum/checksum_n_exporter.cpp", "napi/class_gzip/gzip_n_exporter.cpp", "napi/class_zip/zip_n_exporter.cpp", diff --git a/interfaces/kits/js/zip/include/zip.h b/interfaces/kits/js/zip/include/zip.h index e12123fd07a8dd14295bc3006754485fee34d014..3398e707e357f55c56603710197d955de6af5dc8 100755 --- a/interfaces/kits/js/zip/include/zip.h +++ b/interfaces/kits/js/zip/include/zip.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -15,14 +15,16 @@ #ifndef FOUNDATION_APPEXECFWK_STANDARD_TOOLS_ZIP_H #define FOUNDATION_APPEXECFWK_STANDARD_TOOLS_ZIP_H -#include +#include #include #include #include +#include #include +#include #include "file_path.h" #include "zip_utils.h" -#include "zlib_callback_info.h" +#include "zlib_callback_info_base.h" namespace OHOS { namespace AppExecFwk { namespace LIBZIP { @@ -148,7 +150,7 @@ private: // destFile = /ziptest/hapresult/singlefile.zip // options is default value. bool Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS &options, - bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo); + bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo); // Convenience method for callers who don't need to set up the filter callback. // If |includeHiddenFiles| is true, files starting with "." are included. @@ -158,7 +160,7 @@ bool Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS // destFile = /ziptest/hapresult/hapfourfile.zip // options is default value. bool Zips(const std::vector &srcFiles, const std::string &destPath, const OPTIONS &options, - bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo); + bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo); // Unzip the contents of zipFile into destDir. // example No1 @@ -169,7 +171,7 @@ bool Zips(const std::vector &srcFiles, const std::string &destPath, // destFile = /ziptest/hapunzipdir/single // options is default value. bool Unzip(const std::string &srcFile, const std::string &destFile, const OPTIONS options, - std::shared_ptr zlibCallbackInfo); + std::shared_ptr zlibCallbackInfo); ErrCode GetOriginalSize(const std::string &srcFile, int64_t &originalSize); } // namespace LIBZIP diff --git a/interfaces/kits/ani/zlib/ani_zip.h b/interfaces/kits/js/zip/include/zlib_callback_info_base.h similarity index 50% rename from interfaces/kits/ani/zlib/ani_zip.h rename to interfaces/kits/js/zip/include/zlib_callback_info_base.h index 3e2286fb3af6d308628181e504120a10021b0326..296d7663250a170e4c9446cd24ed756bc6d33fef 100644 --- a/interfaces/kits/ani/zlib/ani_zip.h +++ b/interfaces/kits/js/zip/include/zlib_callback_info_base.h @@ -12,27 +12,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifndef OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_BASE_H +#define OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_BASE_H -#ifndef BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_H -#define BUNDLE_FRAMEWORK_INTERFACES_KITS_ANI_ZLIB_H - -#include "app_log_wrapper.h" #include "bundle_errors.h" -#include "business_error_ani.h" -#include "common_fun_ani.h" -#include "common_func.h" -#include "enum_util.h" -#include "file_path.h" -#include "zip_utils.h" +#include "event_handler.h" namespace OHOS { namespace AppExecFwk { namespace LIBZIP { -bool ANIParseOptions(ani_env* env, ani_object object, LIBZIP::OPTIONS& options); -ErrCode ANICompressFileImpl(const std::string& inFile, const std::string& outFile, const LIBZIP::OPTIONS& options); -ErrCode ANIDecompressFileImpl(const std::string& inFile, const std::string& outFile, const LIBZIP::OPTIONS& options); -} // namespace LIBZIP -} // namespace AppExecFwk -} // namespace OHOS - -#endif \ No newline at end of file +class ZlibCallbackInfoBase { +public: + ZlibCallbackInfoBase() = default; + virtual ~ZlibCallbackInfoBase() = default; + virtual void OnZipUnZipFinish(ErrCode result) = 0; + virtual void DoTask(const OHOS::AppExecFwk::InnerEvent::Callback& task) = 0; +}; +} // namespace LIBZIP +} // namespace AppExecFwk +} // namespace OHOS +#endif // OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_H \ No newline at end of file diff --git a/interfaces/kits/js/zip/napi/class_checksum/checksum_common_func.cpp b/interfaces/kits/js/zip/napi/class_checksum/checksum_common_func.cpp new file mode 100644 index 0000000000000000000000000000000000000000..921144518a83b528c8017416dae3f861ec0a31fe --- /dev/null +++ b/interfaces/kits/js/zip/napi/class_checksum/checksum_common_func.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "checksum_common_func.h" + +namespace OHOS { +namespace AppExecFwk { +namespace LIBZIP { + +uint64_t ComputeCrc64(uint64_t initCrc, const char *data, size_t length) +{ + uint64_t crc = initCrc; + + /* computation of the CRC */ + for (size_t i = 0; i < length; ++i) { + crc = CRC64_TABLE[(crc ^ data[i]) & 0xFF] ^ (crc >> SHIFT_AMOUNT); + } + + return crc; +} +} // namespace LIBZIP +} // namespace AppExecFwk +} // namespace OHOS \ No newline at end of file diff --git a/interfaces/kits/js/zip/napi/class_checksum/checksum_common_func.h b/interfaces/kits/js/zip/napi/class_checksum/checksum_common_func.h new file mode 100644 index 0000000000000000000000000000000000000000..c819cbc5da8ebf63fdf178ffeb21797133461687 --- /dev/null +++ b/interfaces/kits/js/zip/napi/class_checksum/checksum_common_func.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INTERFACES_KITS_JS_ZIP_NAPI_CLASS_CHECKSUM_CHECKSUM_COMMON_FUNC_H +#define INTERFACES_KITS_JS_ZIP_NAPI_CLASS_CHECKSUM_CHECKSUM_COMMON_FUNC_H + +#include +#include + +namespace OHOS { +namespace AppExecFwk { +namespace LIBZIP { + +constexpr int32_t SHIFT_AMOUNT = 8; +constexpr uint64_t CRC64_TABLE[] = { + 0x0000000000000000, 0x3c3b78e888d80fe1, 0x7876f1d111b01fc2, 0x444d893999681023, + 0x750c207570b452a3, 0x4937589df86c5d42, 0x0d7ad1a461044d61, 0x3141a94ce9dc4280, + 0x6ff9833db2bcc861, 0x53c2fbd53a64c780, 0x178f72eca30cd7a3, 0x2bb40a042bd4d842, + 0x1af5a348c2089ac2, 0x26cedba04ad09523, 0x62835299d3b88500, 0x5eb82a715b608ae1, + 0x5a12c5ac36adfde5, 0x6629bd44be75f204, 0x2264347d271de227, 0x1e5f4c95afc5edc6, + 0x2f1ee5d94619af46, 0x13259d31cec1a0a7, 0x5768140857a9b084, 0x6b536ce0df71bf65, + 0x35eb469184113584, 0x09d03e790cc93a65, 0x4d9db74095a12a46, 0x71a6cfa81d7925a7, + 0x40e766e4f4a56727, 0x7cdc1e0c7c7d68c6, 0x38919735e51578e5, 0x04aaefdd6dcd7704, + 0x31c4488f3e8f96ed, 0x0dff3067b657990c, 0x49b2b95e2f3f892f, 0x7589c1b6a7e786ce, + 0x44c868fa4e3bc44e, 0x78f31012c6e3cbaf, 0x3cbe992b5f8bdb8c, 0x0085e1c3d753d46d, + 0x5e3dcbb28c335e8c, 0x6206b35a04eb516d, 0x264b3a639d83414e, 0x1a70428b155b4eaf, + 0x2b31ebc7fc870c2f, 0x170a932f745f03ce, 0x53471a16ed3713ed, 0x6f7c62fe65ef1c0c, + 0x6bd68d2308226b08, 0x57edf5cb80fa64e9, 0x13a07cf2199274ca, 0x2f9b041a914a7b2b, + 0x1edaad56789639ab, 0x22e1d5bef04e364a, 0x66ac5c8769262669, 0x5a97246fe1fe2988, + 0x042f0e1eba9ea369, 0x381476f63246ac88, 0x7c59ffcfab2ebcab, 0x4062872723f6b34a, + 0x71232e6bca2af1ca, 0x4d18568342f2fe2b, 0x0955dfbadb9aee08, 0x356ea7525342e1e9, + 0x6388911e7d1f2dda, 0x5fb3e9f6f5c7223b, 0x1bfe60cf6caf3218, 0x27c51827e4773df9, + 0x1684b16b0dab7f79, 0x2abfc98385737098, 0x6ef240ba1c1b60bb, 0x52c9385294c36f5a, + 0x0c711223cfa3e5bb, 0x304a6acb477bea5a, 0x7407e3f2de13fa79, 0x483c9b1a56cbf598, + 0x797d3256bf17b718, 0x45464abe37cfb8f9, 0x010bc387aea7a8da, 0x3d30bb6f267fa73b, + 0x399a54b24bb2d03f, 0x05a12c5ac36adfde, 0x41eca5635a02cffd, 0x7dd7dd8bd2dac01c, + 0x4c9674c73b06829c, 0x70ad0c2fb3de8d7d, 0x34e085162ab69d5e, 0x08dbfdfea26e92bf, + 0x5663d78ff90e185e, 0x6a58af6771d617bf, 0x2e15265ee8be079c, 0x122e5eb66066087d, + 0x236ff7fa89ba4afd, 0x1f548f120162451c, 0x5b19062b980a553f, 0x67227ec310d25ade, + 0x524cd9914390bb37, 0x6e77a179cb48b4d6, 0x2a3a28405220a4f5, 0x160150a8daf8ab14, + 0x2740f9e43324e994, 0x1b7b810cbbfce675, 0x5f3608352294f656, 0x630d70ddaa4cf9b7, + 0x3db55aacf12c7356, 0x018e224479f47cb7, 0x45c3ab7de09c6c94, 0x79f8d39568446375, + 0x48b97ad9819821f5, 0x7482023109402e14, 0x30cf8b0890283e37, 0x0cf4f3e018f031d6, + 0x085e1c3d753d46d2, 0x346564d5fde54933, 0x7028edec648d5910, 0x4c139504ec5556f1, + 0x7d523c4805891471, 0x416944a08d511b90, 0x0524cd9914390bb3, 0x391fb5719ce10452, + 0x67a79f00c7818eb3, 0x5b9ce7e84f598152, 0x1fd16ed1d6319171, 0x23ea16395ee99e90, + 0x12abbf75b735dc10, 0x2e90c79d3fedd3f1, 0x6add4ea4a685c3d2, 0x56e6364c2e5dcc33, + 0x42f0e1eba9ea3693, 0x7ecb990321323972, 0x3a86103ab85a2951, 0x06bd68d2308226b0, + 0x37fcc19ed95e6430, 0x0bc7b97651866bd1, 0x4f8a304fc8ee7bf2, 0x73b148a740367413, + 0x2d0962d61b56fef2, 0x11321a3e938ef113, 0x557f93070ae6e130, 0x6944ebef823eeed1, + 0x580542a36be2ac51, 0x643e3a4be33aa3b0, 0x2073b3727a52b393, 0x1c48cb9af28abc72, + 0x18e224479f47cb76, 0x24d95caf179fc497, 0x6094d5968ef7d4b4, 0x5cafad7e062fdb55, + 0x6dee0432eff399d5, 0x51d57cda672b9634, 0x1598f5e3fe438617, 0x29a38d0b769b89f6, + 0x771ba77a2dfb0317, 0x4b20df92a5230cf6, 0x0f6d56ab3c4b1cd5, 0x33562e43b4931334, + 0x0217870f5d4f51b4, 0x3e2cffe7d5975e55, 0x7a6176de4cff4e76, 0x465a0e36c4274197, + 0x7334a9649765a07e, 0x4f0fd18c1fbdaf9f, 0x0b4258b586d5bfbc, 0x3779205d0e0db05d, + 0x06388911e7d1f2dd, 0x3a03f1f96f09fd3c, 0x7e4e78c0f661ed1f, 0x427500287eb9e2fe, + 0x1ccd2a5925d9681f, 0x20f652b1ad0167fe, 0x64bbdb88346977dd, 0x5880a360bcb1783c, + 0x69c10a2c556d3abc, 0x55fa72c4ddb5355d, 0x11b7fbfd44dd257e, 0x2d8c8315cc052a9f, + 0x29266cc8a1c85d9b, 0x151d14202910527a, 0x51509d19b0784259, 0x6d6be5f138a04db8, + 0x5c2a4cbdd17c0f38, 0x6011345559a400d9, 0x245cbd6cc0cc10fa, 0x1867c58448141f1b, + 0x46dfeff5137495fa, 0x7ae4971d9bac9a1b, 0x3ea91e2402c48a38, 0x029266cc8a1c85d9, + 0x33d3cf8063c0c759, 0x0fe8b768eb18c8b8, 0x4ba53e517270d89b, 0x779e46b9faa8d77a, + 0x217870f5d4f51b49, 0x1d43081d5c2d14a8, 0x590e8124c545048b, 0x6535f9cc4d9d0b6a, + 0x54745080a44149ea, 0x684f28682c99460b, 0x2c02a151b5f15628, 0x1039d9b93d2959c9, + 0x4e81f3c86649d328, 0x72ba8b20ee91dcc9, 0x36f7021977f9ccea, 0x0acc7af1ff21c30b, + 0x3b8dd3bd16fd818b, 0x07b6ab559e258e6a, 0x43fb226c074d9e49, 0x7fc05a848f9591a8, + 0x7b6ab559e258e6ac, 0x4751cdb16a80e94d, 0x031c4488f3e8f96e, 0x3f273c607b30f68f, + 0x0e66952c92ecb40f, 0x325dedc41a34bbee, 0x761064fd835cabcd, 0x4a2b1c150b84a42c, + 0x1493366450e42ecd, 0x28a84e8cd83c212c, 0x6ce5c7b54154310f, 0x50debf5dc98c3eee, + 0x619f161120507c6e, 0x5da46ef9a888738f, 0x19e9e7c031e063ac, 0x25d29f28b9386c4d, + 0x10bc387aea7a8da4, 0x2c87409262a28245, 0x68cac9abfbca9266, 0x54f1b14373129d87, + 0x65b0180f9acedf07, 0x598b60e71216d0e6, 0x1dc6e9de8b7ec0c5, 0x21fd913603a6cf24, + 0x7f45bb4758c645c5, 0x437ec3afd01e4a24, 0x07334a9649765a07, 0x3b08327ec1ae55e6, + 0x0a499b3228721766, 0x3672e3daa0aa1887, 0x723f6ae339c208a4, 0x4e04120bb11a0745, + 0x4aaefdd6dcd77041, 0x7695853e540f7fa0, 0x32d80c07cd676f83, 0x0ee374ef45bf6062, + 0x3fa2dda3ac6322e2, 0x0399a54b24bb2d03, 0x47d42c72bdd33d20, 0x7bef549a350b32c1, + 0x25577eeb6e6bb820, 0x196c0603e6b3b7c1, 0x5d218f3a7fdba7e2, 0x611af7d2f703a803, + 0x505b5e9e1edfea83, 0x6c6026769607e562, 0x282daf4f0f6ff541, 0x1416d7a787b7faa0 +}; + +uint64_t ComputeCrc64(uint64_t initCrc, const char *data, size_t length); +} // namespace LIBZIP +} // namespace AppExecFwk +} // namespace OHOS +#endif // INTERFACES_KITS_JS_ZIP_NAPI_CLASS_CHECKSUM_CHECKSUM_COMMON_FUNC_H \ No newline at end of file diff --git a/interfaces/kits/js/zip/napi/class_checksum/checksum_n_exporter.cpp b/interfaces/kits/js/zip/napi/class_checksum/checksum_n_exporter.cpp index 0ae734053c37a80fde872a19fe66f4cb183a0f6e..a6b059e09c451659189d434b9fa68c0472ca2ccc 100644 --- a/interfaces/kits/js/zip/napi/class_checksum/checksum_n_exporter.cpp +++ b/interfaces/kits/js/zip/napi/class_checksum/checksum_n_exporter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,6 +29,7 @@ #include "common/napi_class.h" #include "common/napi_func_arg.h" #include "common/napi_business_error.h" +#include "checksum_common_func.h" #include "checksum_entity.h" #include "zlib.h" @@ -37,74 +38,6 @@ namespace AppExecFwk { namespace LIBZIP { using namespace std; -constexpr int32_t SHIFT_AMOUNT = 8; -constexpr uint64_t CRC64_TABLE[] = { - 0x0000000000000000, 0x3c3b78e888d80fe1, 0x7876f1d111b01fc2, 0x444d893999681023, - 0x750c207570b452a3, 0x4937589df86c5d42, 0x0d7ad1a461044d61, 0x3141a94ce9dc4280, - 0x6ff9833db2bcc861, 0x53c2fbd53a64c780, 0x178f72eca30cd7a3, 0x2bb40a042bd4d842, - 0x1af5a348c2089ac2, 0x26cedba04ad09523, 0x62835299d3b88500, 0x5eb82a715b608ae1, - 0x5a12c5ac36adfde5, 0x6629bd44be75f204, 0x2264347d271de227, 0x1e5f4c95afc5edc6, - 0x2f1ee5d94619af46, 0x13259d31cec1a0a7, 0x5768140857a9b084, 0x6b536ce0df71bf65, - 0x35eb469184113584, 0x09d03e790cc93a65, 0x4d9db74095a12a46, 0x71a6cfa81d7925a7, - 0x40e766e4f4a56727, 0x7cdc1e0c7c7d68c6, 0x38919735e51578e5, 0x04aaefdd6dcd7704, - 0x31c4488f3e8f96ed, 0x0dff3067b657990c, 0x49b2b95e2f3f892f, 0x7589c1b6a7e786ce, - 0x44c868fa4e3bc44e, 0x78f31012c6e3cbaf, 0x3cbe992b5f8bdb8c, 0x0085e1c3d753d46d, - 0x5e3dcbb28c335e8c, 0x6206b35a04eb516d, 0x264b3a639d83414e, 0x1a70428b155b4eaf, - 0x2b31ebc7fc870c2f, 0x170a932f745f03ce, 0x53471a16ed3713ed, 0x6f7c62fe65ef1c0c, - 0x6bd68d2308226b08, 0x57edf5cb80fa64e9, 0x13a07cf2199274ca, 0x2f9b041a914a7b2b, - 0x1edaad56789639ab, 0x22e1d5bef04e364a, 0x66ac5c8769262669, 0x5a97246fe1fe2988, - 0x042f0e1eba9ea369, 0x381476f63246ac88, 0x7c59ffcfab2ebcab, 0x4062872723f6b34a, - 0x71232e6bca2af1ca, 0x4d18568342f2fe2b, 0x0955dfbadb9aee08, 0x356ea7525342e1e9, - 0x6388911e7d1f2dda, 0x5fb3e9f6f5c7223b, 0x1bfe60cf6caf3218, 0x27c51827e4773df9, - 0x1684b16b0dab7f79, 0x2abfc98385737098, 0x6ef240ba1c1b60bb, 0x52c9385294c36f5a, - 0x0c711223cfa3e5bb, 0x304a6acb477bea5a, 0x7407e3f2de13fa79, 0x483c9b1a56cbf598, - 0x797d3256bf17b718, 0x45464abe37cfb8f9, 0x010bc387aea7a8da, 0x3d30bb6f267fa73b, - 0x399a54b24bb2d03f, 0x05a12c5ac36adfde, 0x41eca5635a02cffd, 0x7dd7dd8bd2dac01c, - 0x4c9674c73b06829c, 0x70ad0c2fb3de8d7d, 0x34e085162ab69d5e, 0x08dbfdfea26e92bf, - 0x5663d78ff90e185e, 0x6a58af6771d617bf, 0x2e15265ee8be079c, 0x122e5eb66066087d, - 0x236ff7fa89ba4afd, 0x1f548f120162451c, 0x5b19062b980a553f, 0x67227ec310d25ade, - 0x524cd9914390bb37, 0x6e77a179cb48b4d6, 0x2a3a28405220a4f5, 0x160150a8daf8ab14, - 0x2740f9e43324e994, 0x1b7b810cbbfce675, 0x5f3608352294f656, 0x630d70ddaa4cf9b7, - 0x3db55aacf12c7356, 0x018e224479f47cb7, 0x45c3ab7de09c6c94, 0x79f8d39568446375, - 0x48b97ad9819821f5, 0x7482023109402e14, 0x30cf8b0890283e37, 0x0cf4f3e018f031d6, - 0x085e1c3d753d46d2, 0x346564d5fde54933, 0x7028edec648d5910, 0x4c139504ec5556f1, - 0x7d523c4805891471, 0x416944a08d511b90, 0x0524cd9914390bb3, 0x391fb5719ce10452, - 0x67a79f00c7818eb3, 0x5b9ce7e84f598152, 0x1fd16ed1d6319171, 0x23ea16395ee99e90, - 0x12abbf75b735dc10, 0x2e90c79d3fedd3f1, 0x6add4ea4a685c3d2, 0x56e6364c2e5dcc33, - 0x42f0e1eba9ea3693, 0x7ecb990321323972, 0x3a86103ab85a2951, 0x06bd68d2308226b0, - 0x37fcc19ed95e6430, 0x0bc7b97651866bd1, 0x4f8a304fc8ee7bf2, 0x73b148a740367413, - 0x2d0962d61b56fef2, 0x11321a3e938ef113, 0x557f93070ae6e130, 0x6944ebef823eeed1, - 0x580542a36be2ac51, 0x643e3a4be33aa3b0, 0x2073b3727a52b393, 0x1c48cb9af28abc72, - 0x18e224479f47cb76, 0x24d95caf179fc497, 0x6094d5968ef7d4b4, 0x5cafad7e062fdb55, - 0x6dee0432eff399d5, 0x51d57cda672b9634, 0x1598f5e3fe438617, 0x29a38d0b769b89f6, - 0x771ba77a2dfb0317, 0x4b20df92a5230cf6, 0x0f6d56ab3c4b1cd5, 0x33562e43b4931334, - 0x0217870f5d4f51b4, 0x3e2cffe7d5975e55, 0x7a6176de4cff4e76, 0x465a0e36c4274197, - 0x7334a9649765a07e, 0x4f0fd18c1fbdaf9f, 0x0b4258b586d5bfbc, 0x3779205d0e0db05d, - 0x06388911e7d1f2dd, 0x3a03f1f96f09fd3c, 0x7e4e78c0f661ed1f, 0x427500287eb9e2fe, - 0x1ccd2a5925d9681f, 0x20f652b1ad0167fe, 0x64bbdb88346977dd, 0x5880a360bcb1783c, - 0x69c10a2c556d3abc, 0x55fa72c4ddb5355d, 0x11b7fbfd44dd257e, 0x2d8c8315cc052a9f, - 0x29266cc8a1c85d9b, 0x151d14202910527a, 0x51509d19b0784259, 0x6d6be5f138a04db8, - 0x5c2a4cbdd17c0f38, 0x6011345559a400d9, 0x245cbd6cc0cc10fa, 0x1867c58448141f1b, - 0x46dfeff5137495fa, 0x7ae4971d9bac9a1b, 0x3ea91e2402c48a38, 0x029266cc8a1c85d9, - 0x33d3cf8063c0c759, 0x0fe8b768eb18c8b8, 0x4ba53e517270d89b, 0x779e46b9faa8d77a, - 0x217870f5d4f51b49, 0x1d43081d5c2d14a8, 0x590e8124c545048b, 0x6535f9cc4d9d0b6a, - 0x54745080a44149ea, 0x684f28682c99460b, 0x2c02a151b5f15628, 0x1039d9b93d2959c9, - 0x4e81f3c86649d328, 0x72ba8b20ee91dcc9, 0x36f7021977f9ccea, 0x0acc7af1ff21c30b, - 0x3b8dd3bd16fd818b, 0x07b6ab559e258e6a, 0x43fb226c074d9e49, 0x7fc05a848f9591a8, - 0x7b6ab559e258e6ac, 0x4751cdb16a80e94d, 0x031c4488f3e8f96e, 0x3f273c607b30f68f, - 0x0e66952c92ecb40f, 0x325dedc41a34bbee, 0x761064fd835cabcd, 0x4a2b1c150b84a42c, - 0x1493366450e42ecd, 0x28a84e8cd83c212c, 0x6ce5c7b54154310f, 0x50debf5dc98c3eee, - 0x619f161120507c6e, 0x5da46ef9a888738f, 0x19e9e7c031e063ac, 0x25d29f28b9386c4d, - 0x10bc387aea7a8da4, 0x2c87409262a28245, 0x68cac9abfbca9266, 0x54f1b14373129d87, - 0x65b0180f9acedf07, 0x598b60e71216d0e6, 0x1dc6e9de8b7ec0c5, 0x21fd913603a6cf24, - 0x7f45bb4758c645c5, 0x437ec3afd01e4a24, 0x07334a9649765a07, 0x3b08327ec1ae55e6, - 0x0a499b3228721766, 0x3672e3daa0aa1887, 0x723f6ae339c208a4, 0x4e04120bb11a0745, - 0x4aaefdd6dcd77041, 0x7695853e540f7fa0, 0x32d80c07cd676f83, 0x0ee374ef45bf6062, - 0x3fa2dda3ac6322e2, 0x0399a54b24bb2d03, 0x47d42c72bdd33d20, 0x7bef549a350b32c1, - 0x25577eeb6e6bb820, 0x196c0603e6b3b7c1, 0x5d218f3a7fdba7e2, 0x611af7d2f703a803, - 0x505b5e9e1edfea83, 0x6c6026769607e562, 0x282daf4f0f6ff541, 0x1416d7a787b7faa0 -}; - struct AsyncChecksumArg { uint64_t adler{0U}; const z_crc_t* crcTable = nullptr; @@ -113,18 +46,6 @@ struct AsyncChecksumArg { ~AsyncChecksumArg() = default; }; -static uint64_t ComputeCrc64(uint64_t initCrc, const char *data, size_t length) -{ - uint64_t crc = initCrc; - - /* computation of the CRC */ - for (size_t i = 0; i < length; ++i) { - crc = CRC64_TABLE[(crc ^ data[i]) & 0xFF] ^ (crc >> SHIFT_AMOUNT); - } - - return crc; -} - napi_value ChecksumNExporter::Constructor(napi_env env, napi_callback_info info) { NapiFuncArg funcArg(env, info); diff --git a/interfaces/kits/js/zip/napi/common/common_func.cpp b/interfaces/kits/js/zip/napi/common/common_func.cpp index 29936b3e4f1c0b26bc360b206e195c0e4fa77b0e..d2eeeed87047c1c61b1121c52b18e07745012c25 100644 --- a/interfaces/kits/js/zip/napi/common/common_func.cpp +++ b/interfaces/kits/js/zip/napi/common/common_func.cpp @@ -1173,7 +1173,7 @@ std::tuple CommonFunc::GetGZWriteArg(napi_env env, const int64_t len = 0; NapiValue sizeNVal(env, funcArg[ArgumentPosition::SECOND]); std::tie(succ, len) = sizeNVal.ToInt64(); - if (!succ) { + if (!succ || len > bufLen) { NapiBusinessError().ThrowErr(env, EINVAL); return {false, nullptr, 0}; } diff --git a/interfaces/kits/js/zip/napi/common/napi_business_error.h b/interfaces/kits/js/zip/napi/common/napi_business_error.h index d4bc1ef1b17d6b3c791a4cfb9a75f4b0c3470c8c..cf93a6ca1496af20ebe271f9ef254fb81077f7a6 100644 --- a/interfaces/kits/js/zip/napi/common/napi_business_error.h +++ b/interfaces/kits/js/zip/napi/common/napi_business_error.h @@ -56,21 +56,22 @@ enum ErrCodeSuffix { E_ARCH, }; -const std::unordered_map> errCodeTable{ - {EFAULT, {ZLIB_SYS_CAP_TAG + E_PERM, "Bad address"}}, - {EINVAL, {ELEGACY_ARGUMENT + E_PERM, "The parameter check failed"}}, - {-1, {ZLIB_SYS_CAP_TAG + E_SRCH, "System error"}}, - {-2, {ZLIB_SYS_CAP_TAG + E_INTR, "Compression or decompression stream error, which may be \ - caused by an initialization error in the zlib stream structure or a modified structure."}}, - {-3, {ZLIB_SYS_CAP_TAG + E_IO, "The input data is incorrect. For example, the data does not conform \ - to the zlib compression format, the compressed data is corrupted, or the data is not compressed."}}, - {-4, {ZLIB_SYS_CAP_TAG + E_NXIO, "Memory allocation failed"}}, - {-5, {ZLIB_SYS_CAP_TAG + E_2BIG, "The input buffer is incorrect, and the output buffer is too \ - small to accommodate the compressed or decompressed data."}}, - {-6, {ZLIB_SYS_CAP_TAG + E_BADF, "Version error"}}, - {ENOSTR, {ZLIB_SYS_CAP_TAG + E_MEMORY, "Internal structure error"}}, - {EARCH, {ZLIB_SYS_CAP_TAG + E_ARCH, "System architecture error, compiling with _WIN32"}}, - {ENOENT, {ZLIB_SYS_CAP_TAG + E_NOENT, "No such file or access mode error"}}, +const std::unordered_map> errCodeTable { + { EFAULT, { ZLIB_SYS_CAP_TAG + E_PERM, "Bad address" } }, + { EINVAL, { ELEGACY_ARGUMENT + E_PERM, "The parameter check failed" } }, + { -1, { ZLIB_SYS_CAP_TAG + E_SRCH, "System error" } }, + { -2, { ZLIB_SYS_CAP_TAG + E_INTR, "Compression or decompression stream error, which may be caused by an " + "initialization error in the zlib stream structure or a modified structure." } }, + { -3, { ZLIB_SYS_CAP_TAG + E_IO, + "The input data is incorrect. For example, the data does not conform to the zlib compression format, the " + "compressed data is corrupted, or the data is not compressed." } }, + { -4, { ZLIB_SYS_CAP_TAG + E_NXIO, "Memory allocation failed" } }, + { -5, { ZLIB_SYS_CAP_TAG + E_2BIG, "The input buffer is incorrect, and the output buffer is too small to " + "accommodate the compressed or decompressed data." } }, + { -6, { ZLIB_SYS_CAP_TAG + E_BADF, "Version error" } }, + { ENOSTR, { ZLIB_SYS_CAP_TAG + E_MEMORY, "Internal structure error" } }, + { EARCH, { ZLIB_SYS_CAP_TAG + E_ARCH, "System architecture error, compiling with _WIN32" } }, + { ENOENT, { ZLIB_SYS_CAP_TAG + E_NOENT, "No such file or access mode error" } }, }; class NapiBusinessError { diff --git a/interfaces/kits/js/zip/napi/zlib_callback_info.cpp b/interfaces/kits/js/zip/napi/zlib_callback_info.cpp index c6b04663f8bd3708cd9f162db0f283fe884bcea9..daac17c0f88cf5b19178e7d2acb87dd3fdbeb323 100755 --- a/interfaces/kits/js/zip/napi/zlib_callback_info.cpp +++ b/interfaces/kits/js/zip/napi/zlib_callback_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -161,6 +161,11 @@ void ZlibCallbackInfo::OnZipUnZipFinish(ErrCode result) callbackPtr.release(); } +void ZlibCallbackInfo::DoTask(const OHOS::AppExecFwk::InnerEvent::Callback& task) +{ + PostTask(task); +} + bool ZlibCallbackInfo::GetIsCallback() const { return isCallBack_; diff --git a/interfaces/kits/js/zip/napi/zlib_callback_info.h b/interfaces/kits/js/zip/napi/zlib_callback_info.h index 44816104014e0735757e4323e5a7430150f92383..b9e16ec4c5a806b91fa3d3a5114c3fc9f3f93ffe 100755 --- a/interfaces/kits/js/zip/napi/zlib_callback_info.h +++ b/interfaces/kits/js/zip/napi/zlib_callback_info.h @@ -1,74 +1,77 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_H -#define OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_H - -#include - -#include "appexecfwk_errors.h" -#include "base_cb_info.h" -#include "napi/native_api.h" -#include "napi/native_node_api.h" -#include "napi/native_common.h" -#include "nocopyable.h" -#include "zip_utils.h" - -namespace OHOS { -namespace AppExecFwk { -namespace LIBZIP { -class ZlibCallbackInfo { -public: - ZlibCallbackInfo() = default; - ZlibCallbackInfo(napi_env env, napi_ref callback, napi_deferred deferred, bool isCallback); - virtual ~ZlibCallbackInfo(); - void OnZipUnZipFinish(ErrCode result); - bool GetIsCallback() const; - void SetIsCallback(bool isCallback); - void SetCallback(napi_ref callback); - void SetDeferred(napi_deferred deferred); - void SetDeliverErrCode(bool isDeliverErrCode); - void SetValid(bool valid); -private: - int32_t ExcuteWork(uv_loop_s* loop, uv_work_t* work); -private: - napi_env env_ = nullptr; - napi_ref callback_ = nullptr; - napi_deferred deferred_ = nullptr; - bool isCallBack_ = false; - bool deliverErrcode_ = false; - bool valid_ = true; - std::mutex validMutex_; - DISALLOW_COPY_AND_MOVE(ZlibCallbackInfo); -}; - -struct AsyncCallbackInfo { - napi_env env; - napi_ref callback; - napi_deferred deferred; - bool isCallBack = false; - ErrCode callbackResult; - bool deliverErrcode = false; - ZlibCallbackInfo *data = nullptr; -}; - -struct OriginalSizeCallbackInfo : public BaseCallbackInfo { - explicit OriginalSizeCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} - std::string srcFile = ""; - int64_t originalSize = 0; -}; -} // namespace LIBZIP -} // namespace AppExecFwk -} // namespace OHOS +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_H +#define OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_H + +#include + +#include "appexecfwk_errors.h" +#include "base_cb_info.h" +#include "napi/native_api.h" +#include "napi/native_node_api.h" +#include "napi/native_common.h" +#include "nocopyable.h" +#include "zip_utils.h" +#include "zlib_callback_info_base.h" + +namespace OHOS { +namespace AppExecFwk { +namespace LIBZIP { +class ZlibCallbackInfo : public ZlibCallbackInfoBase { +public: + ZlibCallbackInfo() = default; + ZlibCallbackInfo(napi_env env, napi_ref callback, napi_deferred deferred, bool isCallback); + virtual ~ZlibCallbackInfo(); + virtual void OnZipUnZipFinish(ErrCode result); + virtual void DoTask(const OHOS::AppExecFwk::InnerEvent::Callback& task); + bool GetIsCallback() const; + void SetIsCallback(bool isCallback); + void SetCallback(napi_ref callback); + void SetDeferred(napi_deferred deferred); + void SetDeliverErrCode(bool isDeliverErrCode); + void SetValid(bool valid); + +private: + int32_t ExcuteWork(uv_loop_s* loop, uv_work_t* work); +private: + napi_env env_ = nullptr; + napi_ref callback_ = nullptr; + napi_deferred deferred_ = nullptr; + bool isCallBack_ = false; + bool deliverErrcode_ = false; + bool valid_ = true; + std::mutex validMutex_; + DISALLOW_COPY_AND_MOVE(ZlibCallbackInfo); +}; + +struct AsyncCallbackInfo { + napi_env env; + napi_ref callback; + napi_deferred deferred; + bool isCallBack = false; + ErrCode callbackResult; + bool deliverErrcode = false; + ZlibCallbackInfo *data = nullptr; +}; + +struct OriginalSizeCallbackInfo : public BaseCallbackInfo { + explicit OriginalSizeCallbackInfo(napi_env napiEnv) : BaseCallbackInfo(napiEnv) {} + std::string srcFile = ""; + int64_t originalSize = 0; +}; +} // namespace LIBZIP +} // namespace AppExecFwk +} // namespace OHOS #endif // OHOS_APPEXECFWK_LIBZIP_ZLIB_CALLBACK_H \ No newline at end of file diff --git a/interfaces/kits/js/zip/src/zip.cpp b/interfaces/kits/js/zip/src/zip.cpp index 8375db9f4cb591253994a3c2924dca7a730c60b7..b05f5999cb94ecbb03d25273ae15b7f384689f0c 100644 --- a/interfaces/kits/js/zip/src/zip.cpp +++ b/interfaces/kits/js/zip/src/zip.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -410,7 +410,7 @@ ErrCode UnzipWithFilterCallback( } bool Unzip(const std::string &srcFile, const std::string &destFile, OPTIONS options, - std::shared_ptr zlibCallbackInfo) + std::shared_ptr zlibCallbackInfo) { if (zlibCallbackInfo == nullptr) { APP_LOGE("zlibCallbackInfo is nullptr"); @@ -453,7 +453,7 @@ bool Unzip(const std::string &srcFile, const std::string &destFile, OPTIONS opti zlibCallbackInfo->OnZipUnZipFinish(err); } }; - PostTask(innerTask); + zlibCallbackInfo->DoTask(innerTask); return true; } @@ -527,7 +527,7 @@ ErrCode ZipsWithFilterCallback(const std::vector &srcFiles, const File } bool Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS &options, - bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo) + bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo) { if (zlibCallbackInfo == nullptr) { return false; @@ -559,7 +559,7 @@ bool Zip(const std::string &srcPath, const std::string &destPath, const OPTIONS } }; - PostTask(innerTask); + zlibCallbackInfo->DoTask(innerTask); return true; } @@ -630,7 +630,7 @@ ErrCode GetOriginalSize(const std::string &srcFile, int64_t &originalSize) } bool Zips(const std::vector &srcFiles, const std::string &destPath, const OPTIONS &options, - bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo) + bool includeHiddenFiles, std::shared_ptr zlibCallbackInfo) { if (zlibCallbackInfo == nullptr) { return false; @@ -668,7 +668,7 @@ bool Zips(const std::vector &srcFiles, const std::string &destPath, } }; - PostTask(innerTask); + zlibCallbackInfo->DoTask(innerTask); return true; } } // namespace LIBZIP diff --git a/interfaces/kits/js/zip/test/unittest/zip_test.cpp b/interfaces/kits/js/zip/test/unittest/zip_test.cpp index f48be145862bbf4e5649019cfbbece0cb21c8ace..7f5fa70c190d82871ef6f88d444a26bbe45490f9 100644 --- a/interfaces/kits/js/zip/test/unittest/zip_test.cpp +++ b/interfaces/kits/js/zip/test/unittest/zip_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -18,6 +18,7 @@ #include "zip.h" #include "zip_utils.h" +#include "zlib_callback_info.h" namespace OHOS { namespace AppExecFwk { namespace LIBZIP { diff --git a/services/bundlemgr/include/aot/aot_args.h b/services/bundlemgr/include/aot/aot_args.h index 1ce490c7f80a7d5c26c2df97420fcac62b79b574..c924e80cd3113ae437445ae34e4a181394da87df 100644 --- a/services/bundlemgr/include/aot/aot_args.h +++ b/services/bundlemgr/include/aot/aot_args.h @@ -27,7 +27,7 @@ struct HspInfo : public Parcelable { std::string bundleName; std::string moduleName; std::string hapPath; - std::string codeLanguage; + std::string moduleArkTSMode; std::string ToString() const; bool ReadFromParcel(Parcel &parcel); @@ -53,7 +53,7 @@ struct AOTArgs : public Parcelable { std::string anFileName; std::string appIdentifier; std::string optBCRangeList; - std::string codeLanguage; + std::string moduleArkTSMode; std::vector hspVector; bool isSysComp = false; diff --git a/services/bundlemgr/include/aot/aot_executor.h b/services/bundlemgr/include/aot/aot_executor.h index a070f9f17df59a8d7e6d3906eef1b2829793f736..2ba46632fe6a497ceb4332080e93c827416f43fd 100644 --- a/services/bundlemgr/include/aot/aot_executor.h +++ b/services/bundlemgr/include/aot/aot_executor.h @@ -44,8 +44,8 @@ private: std::string DecToHex(uint32_t decimal) const; bool CheckArgs(const AOTArgs &aotArgs) const; - std::string GetAbcRelativePath(const std::string &codeLanguage) const; - bool GetAbcFileInfo(const std::string &hapPath, const std::string &codeLanguage, + std::string GetAbcRelativePath(const std::string &moduleArkTSMode) const; + bool GetAbcFileInfo(const std::string &hapPath, const std::string &moduleArkTSMode, uint32_t &offset, uint32_t &length) const; ErrCode PrepareArgs(const AOTArgs &aotArgs, AOTArgs &completeArgs) const; nlohmann::json GetSubjectInfo(const AOTArgs &aotArgs) const; diff --git a/services/bundlemgr/include/base_bundle_installer.h b/services/bundlemgr/include/base_bundle_installer.h index 9823a57cb4d7706ca03123ffee8bcfe42e5347f1..63c64937e8f3b860a8a24269f53cbd0b4f70b9f6 100644 --- a/services/bundlemgr/include/base_bundle_installer.h +++ b/services/bundlemgr/include/base_bundle_installer.h @@ -852,10 +852,12 @@ private: const InstallParam &installParam, int32_t &uid); void PrintStartWindowIconId(const InnerBundleInfo &info); bool ProcessExtProfile(const InstallParam &installParam); + void SetHybridSpawn(); bool IsBundleCrossAppSharedConfig(const std::unordered_map &newInfos); ErrCode ProcessDynamicIconFileWhenUpdate(const InnerBundleInfo &oldInfo, const std::string &oldPath, const std::string &newPath); void ProcessUpdateShortcut(); + ErrCode CheckArkTSMode(const std::unordered_map &newInfos); bool isAppExist_ = false; bool isContainEntry_ = false; diff --git a/services/bundlemgr/include/bundle_data_mgr.h b/services/bundlemgr/include/bundle_data_mgr.h index f06c2d5c74a732930ab3af2810fc1fa5a3b8f545..747b14eb4e892c9e6b1c6b1cdc79c6c1866e393a 100644 --- a/services/bundlemgr/include/bundle_data_mgr.h +++ b/services/bundlemgr/include/bundle_data_mgr.h @@ -54,6 +54,7 @@ #include "ipc/create_dir_param.h" #include "uninstall_data_mgr_storage_rdb.h" #include "module_info.h" +#include "module_test_runner.h" #include "preinstall_data_storage_interface.h" #include "router_data_storage_interface.h" #include "shortcut_data_storage_interface.h" @@ -1167,6 +1168,7 @@ public: void FilterShortcutJson(nlohmann::json &jsonResult); ErrCode IsSystemApp(const std::string &bundleName, bool &isSystemApp); void UpdateDesktopShortcutInfo(const std::string &bundleName); + ErrCode GetTestRunner(const std::string &bundleName, const std::string &moduleName, ModuleTestRunner &testRunner); private: /** diff --git a/services/bundlemgr/include/bundle_extractor.h b/services/bundlemgr/include/bundle_extractor.h index 22d1e4d02a22cbbaf14adc26cb62e5102e2f726f..1be34ccb59ac3dc163576bf6c3b31d031907d3b0 100644 --- a/services/bundlemgr/include/bundle_extractor.h +++ b/services/bundlemgr/include/bundle_extractor.h @@ -38,6 +38,12 @@ public: * @return Returns true if the file is successfully extracted; returns false otherwise. */ bool ExtractPackFile(std::ostream &dest) const; + /** + * @brief Extract the module.json of a hap to dest stream. + * @param dest Indicates the obtained std::ostream object. + * @return Returns true if the Profile is successfully extracted; returns false otherwise. + */ + bool ExtractModuleProfile(std::ostream &dest) const; }; class BundleParallelExtractor : public BundleExtractor { diff --git a/services/bundlemgr/include/bundle_mgr_host_impl.h b/services/bundlemgr/include/bundle_mgr_host_impl.h index 8e98379d06f9555dded9fa0659015f4d236e2f7d..bdb2f9564c490a4b6f940767103c9d2951d31efb 100644 --- a/services/bundlemgr/include/bundle_mgr_host_impl.h +++ b/services/bundlemgr/include/bundle_mgr_host_impl.h @@ -1136,6 +1136,8 @@ public: virtual ErrCode RegisterPluginEventCallback(const sptr &pluginEventCallback) override; virtual ErrCode UnregisterPluginEventCallback(const sptr &pluginEventCallback) override; virtual ErrCode GetAllShortcutInfoForSelf(std::vector &shortcutInfos) override; + virtual ErrCode GetTestRunner(const std::string &bundleName, const std::string &moduleName, + ModuleTestRunner &testRunner) override; private: bool GetLabelByBundleName(const std::string &bundleName, int32_t userId, std::string &label); diff --git a/services/bundlemgr/include/bundle_parser.h b/services/bundlemgr/include/bundle_parser.h index 7b39c177a64eb3ec01491a6b11c4926a983aacc8..0a09989b6177b6b51826daf839e2f7b1e894d855 100644 --- a/services/bundlemgr/include/bundle_parser.h +++ b/services/bundlemgr/include/bundle_parser.h @@ -24,6 +24,7 @@ #include "appexecfwk_errors.h" #include "default_permission.h" #include "inner_bundle_info.h" +#include "module_test_runner.h" #include "pre_scan_info.h" namespace OHOS { @@ -132,6 +133,11 @@ public: */ static ErrCode ParseArkStartupCacheConfig(const std::string &configFile, std::unordered_set &bundleNames); + + ErrCode ParseTestRunner(const std::string &hapPath, ModuleTestRunner &testRunner) const; + + ErrCode ParseAppStaticRuntimeEnableList(const std::string &filePath, + std::unordered_map> &enableList) const; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/include/bundle_service_constants.h b/services/bundlemgr/include/bundle_service_constants.h index c3c3cdb818da94653abcd273b0d7bd5cc0e8bfc9..c69c826c6597a219f5d6ef149f4a6d17984b62b6 100644 --- a/services/bundlemgr/include/bundle_service_constants.h +++ b/services/bundlemgr/include/bundle_service_constants.h @@ -183,6 +183,8 @@ constexpr const char* DEVELOPERMODE_STATE = "const.security.developermode.state" constexpr const char* BMS_DATA_PRELOAD = "persist.bms.data.preload"; constexpr const char* IS_SUPPORT_PLUGIN = "const.bms.support_plugin"; constexpr const char* IS_DRIVER_FOR_ALL_USERS = "const.bms.driverForAllUsers"; +constexpr const char* ARK_WHITE_LIST = "persist.ark.enable.static.runtime.whitelist"; +constexpr const char* HYBRID_SPAWN_ENABLE = "persist.appspawn.hybridspawn.enable"; //extResource constexpr const char* EXT_RESOURCE_FILE_PATH = "ext_resource"; // hmdfs and sharefs config @@ -260,6 +262,9 @@ constexpr const char* UPDATE_PERMISSIONS_FLAG_UPDATED = "updated"; constexpr const char* EXT_PROFILE = "ext_profile"; constexpr const char* ENTERPRISE_MANIFEST = "ohos.bms.param.enterpriseManifest"; constexpr const char* MANIFEST_JSON = "manifest.json"; + +// ark white list +constexpr const char* ARK_WHITE_LIST_CONF = "/etc/ark/app_static_runtime_enable_list.conf"; } // namespace ServiceConstants } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/include/common_profile.h b/services/bundlemgr/include/common_profile.h index 3ef3070fa4a2bf3c41f3cf9ed3849b08d72fc12c..f7d2cd224a813e3fb948bef8ef7588b10cc8f93f 100644 --- a/services/bundlemgr/include/common_profile.h +++ b/services/bundlemgr/include/common_profile.h @@ -556,6 +556,12 @@ constexpr const char* START_WINDOW_BACKGROUND_IMAGE_FIT = "startWindowBackground constexpr const char* START_MODE = "startMode"; constexpr const char* START_MODE_MAIN_TASK = "mainTask"; constexpr const char* START_MODE_RECENT_TASK = "recentTask"; + +// test runner +constexpr const char* TEST_RUNNER = "testRunner"; +constexpr const char* TEST_RUNNER_NAME = "name"; +constexpr const char* TEST_RUNNER_SRC_PATH = "srcPath"; +constexpr const char* TEST_RUNNER_ARKTS_MODE = "arkTSMode"; } // namespace Profile } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/include/inner_bundle_info.h b/services/bundlemgr/include/inner_bundle_info.h index 02d7645085dd9ff01cb86a35a62a088989198686..3ee22c788d52634bbbc814fa804e34c46f315c40 100644 --- a/services/bundlemgr/include/inner_bundle_info.h +++ b/services/bundlemgr/include/inner_bundle_info.h @@ -132,8 +132,8 @@ struct InnerModuleInfo { std::string crossAppSharedConfig; std::string abilitySrcEntryDelegator; std::string abilityStageSrcEntryDelegator; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; - std::string abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; Distro distro; // all user's value of isRemovable // key:userId @@ -2319,7 +2319,7 @@ public: const InnerModuleInfo &moduleInfo) const; void CheckSoEncryption(const CheckEncryptionParam &checkEncryptionParam, const std::string &requestPackage, const InnerModuleInfo &moduleInfo) const; - std::string GetModuleCodeLanguage(const std::string &moduleName) const; + std::string GetModuleArkTSMode(const std::string &moduleName) const; void SetMultiAppMode(MultiAppModeData multiAppMode) { @@ -2338,7 +2338,7 @@ public: bool UpdatePluginBundleInfo(const PluginBundleInfo &pluginBundleInfo); bool RemovePluginFromUserInfo(const std::string &pluginBundleName, const int32_t userId); void GetAllDynamicIconInfo(const int32_t userId, std::vector &dynamicIconInfos) const; - std::string GetApplicationCodeLanguage() const; + std::string GetApplicationArkTSMode() const; private: bool IsExistLauncherAbility() const; diff --git a/services/bundlemgr/include/module_profile.h b/services/bundlemgr/include/module_profile.h index ed26a2ea0eb25b565d70cd28aea42279b43e2f12..b9995673f817865dcd4c1f33ce93ca4670d761fd 100644 --- a/services/bundlemgr/include/module_profile.h +++ b/services/bundlemgr/include/module_profile.h @@ -20,6 +20,7 @@ #include "appexecfwk_errors.h" #include "bundle_extractor.h" #include "inner_bundle_info.h" +#include "module_test_runner.h" namespace OHOS { namespace AppExecFwk { @@ -43,6 +44,8 @@ public: const BundleExtractor &bundleExtractor, InnerBundleInfo &innerBundleInfo) const; + ErrCode TransformToTestRunner(const std::ostringstream &source, ModuleTestRunner &testRunner) const; + private: OverlayMsg ObtainOverlayType(const nlohmann::json &jsonObject) const; }; diff --git a/services/bundlemgr/src/aot/aot_args.cpp b/services/bundlemgr/src/aot/aot_args.cpp index bc2b82ee9da12d5e09111768aa1f7a2eb39e165d..75878bcce15cd096d97203336b17eb9367ff19ed 100644 --- a/services/bundlemgr/src/aot/aot_args.cpp +++ b/services/bundlemgr/src/aot/aot_args.cpp @@ -37,7 +37,7 @@ bool HspInfo::ReadFromParcel(Parcel &parcel) hapPath = Str16ToStr8(hapPathVal); READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, offset); READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, length); - READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); return true; } @@ -49,7 +49,7 @@ bool HspInfo::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(hapPath)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, offset); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, length); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); return true; } @@ -72,7 +72,7 @@ std::string HspInfo::ToString() const + ", hapPath = " + hapPath + ", offset = " + std::to_string(offset) + ", length = " + std::to_string(length) - + ", codeLanguage = " + codeLanguage + "]"; + + ", moduleArkTSMode = " + moduleArkTSMode + "]"; } bool AOTArgs::ReadFromParcel(Parcel &parcel) @@ -125,7 +125,7 @@ bool AOTArgs::ReadFromParcel(Parcel &parcel) optBCRangeList = Str16ToStr8(optBCRangeVal); READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, isScreenOff); READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, isEnableBaselinePgo); - READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, isSysComp); READ_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, sysCompPath); return true; @@ -154,7 +154,7 @@ bool AOTArgs::Marshalling(Parcel &parcel) const WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String16, parcel, Str8ToStr16(optBCRangeList)); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, isScreenOff); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Uint32, parcel, isEnableBaselinePgo); - WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, codeLanguage); + WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, moduleArkTSMode); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(Bool, parcel, isSysComp); WRITE_PARCEL_AND_RETURN_FALSE_IF_FAIL(String, parcel, sysCompPath); return true; @@ -190,7 +190,7 @@ std::string AOTArgs::ToString() const + ", optBCRangeList = " + optBCRangeList + ", isScreenOff = " + std::to_string(isScreenOff) + ", isEnableBaselinePgo = " + std::to_string(isEnableBaselinePgo) - + ", codeLanguage = " + codeLanguage + + ", moduleArkTSMode = " + moduleArkTSMode + ", isSysComp = " + (isSysComp ? "true" : "false") + ", sysCompPath = " + sysCompPath + "]"; ret.append(" hspVector = "); diff --git a/services/bundlemgr/src/aot/aot_executor.cpp b/services/bundlemgr/src/aot/aot_executor.cpp index 0fe49dfc7fbcf9d6c05d38c933af73d576cffb1b..24618adb7ff23b06c48dcdf5fd89add34f435ca9 100644 --- a/services/bundlemgr/src/aot/aot_executor.cpp +++ b/services/bundlemgr/src/aot/aot_executor.cpp @@ -100,19 +100,19 @@ bool AOTExecutor::CheckArgs(const AOTArgs &aotArgs) const return true; } -std::string AOTExecutor::GetAbcRelativePath(const std::string &codeLanguage) const +std::string AOTExecutor::GetAbcRelativePath(const std::string &moduleArkTSMode) const { - if (codeLanguage == Constants::CODE_LANGUAGE_1_1) { + if (moduleArkTSMode == Constants::ARKTS_MODE_DYNAMIC) { return ABC_RELATIVE_PATH; } - if (codeLanguage == Constants::CODE_LANGUAGE_1_2 || codeLanguage == Constants::CODE_LANGUAGE_HYBRID) { + if (moduleArkTSMode == Constants::ARKTS_MODE_STATIC || moduleArkTSMode == Constants::ARKTS_MODE_HYBRID) { return STATIC_ABC_RELATIVE_PATH; } - APP_LOGW("invalid codeLanguage : %{public}s", codeLanguage.c_str()); + APP_LOGW("invalid moduleArkTSMode : %{public}s", moduleArkTSMode.c_str()); return Constants::EMPTY_STRING; } -bool AOTExecutor::GetAbcFileInfo(const std::string &hapPath, const std::string &codeLanguage, +bool AOTExecutor::GetAbcFileInfo(const std::string &hapPath, const std::string &moduleArkTSMode, uint32_t &offset, uint32_t &length) const { BundleExtractor extractor(hapPath); @@ -120,7 +120,7 @@ bool AOTExecutor::GetAbcFileInfo(const std::string &hapPath, const std::string & APP_LOGE("init BundleExtractor failed"); return false; } - std::string abcRelativePath = GetAbcRelativePath(codeLanguage); + std::string abcRelativePath = GetAbcRelativePath(moduleArkTSMode); if (abcRelativePath.empty()) { APP_LOGE("abcRelativePath empty"); return false; @@ -146,14 +146,14 @@ ErrCode AOTExecutor::PrepareArgs(const AOTArgs &aotArgs, AOTArgs &completeArgs) return ERR_APPEXECFWK_INSTALLD_PARAM_ERROR; } completeArgs = aotArgs; - if (!GetAbcFileInfo(completeArgs.hapPath, completeArgs.codeLanguage, + if (!GetAbcFileInfo(completeArgs.hapPath, completeArgs.moduleArkTSMode, completeArgs.offset, completeArgs.length)) { APP_LOGE("GetAbcFileInfo failed"); return ERR_APPEXECFWK_INSTALLD_AOT_ABC_NOT_EXIST; } // handle hsp for (auto &hspInfo : completeArgs.hspVector) { - (void)GetAbcFileInfo(hspInfo.hapPath, hspInfo.codeLanguage, hspInfo.offset, hspInfo.length); + (void)GetAbcFileInfo(hspInfo.hapPath, hspInfo.moduleArkTSMode, hspInfo.offset, hspInfo.length); } APP_LOGD("PrepareArgs success"); return ERR_OK; @@ -169,7 +169,7 @@ nlohmann::json AOTExecutor::GetSubjectInfo(const AOTArgs &aotArgs) const subject[BUNDLE_NAME] = aotArgs.bundleName; subject[MODULE_NAME] = aotArgs.moduleName; subject[PKG_PATH] = aotArgs.hapPath; - subject[ABC_NAME] = GetAbcRelativePath(aotArgs.codeLanguage); + subject[ABC_NAME] = GetAbcRelativePath(aotArgs.moduleArkTSMode); subject[ABC_OFFSET] = DecToHex(aotArgs.offset); subject[ABC_SIZE] = DecToHex(aotArgs.length); subject[PROCESS_UID] = DecToHex(currentProcessUid); @@ -206,8 +206,8 @@ void AOTExecutor::MapHapArgs(const AOTArgs &aotArgs, std::unordered_map AOTHandler::BuildAOTArgs(const InnerBundleInfo &info, con aotArgs.isScreenOff = static_cast(deviceIsScreenOff); aotArgs.isEnableBaselinePgo = static_cast(isEnableBaselinePgo); - aotArgs.codeLanguage = installedInfo.GetModuleCodeLanguage(moduleName); - if (aotArgs.codeLanguage.empty()) { - APP_LOGE("codeLanguage empty"); + aotArgs.moduleArkTSMode = installedInfo.GetModuleArkTSMode(moduleName); + if (aotArgs.moduleArkTSMode.empty()) { + APP_LOGE("moduleArkTSMode empty"); return std::nullopt; } APP_LOGD("args : %{public}s", aotArgs.ToString().c_str()); diff --git a/services/bundlemgr/src/base_bundle_installer.cpp b/services/bundlemgr/src/base_bundle_installer.cpp index b72ee6426bac4f6d2b2016a3e0ff0d17054474fc..53695a3133d9fd6e1b46f56723a9243f3c036e73 100644 --- a/services/bundlemgr/src/base_bundle_installer.cpp +++ b/services/bundlemgr/src/base_bundle_installer.cpp @@ -1258,6 +1258,10 @@ ErrCode BaseBundleInstaller::ProcessBundleInstall(const std::vector std::unordered_map newInfos; result = ParseHapFiles(bundlePaths, installParam, appType, hapVerifyResults, newInfos); CHECK_RESULT(result, "parse haps file failed %{public}d"); + + result = CheckArkTSMode(newInfos); + CHECK_RESULT(result, "check arkTS mode failed %{public}d"); + bool onDemandInstall = OnDemandInstallDataMgr::GetInstance().IsOnDemandInstall(installParam); if (!onDemandInstall) { if (userId_ == Constants::DEFAULT_USERID && installParam.isDataPreloadHap && @@ -1498,6 +1502,7 @@ ErrCode BaseBundleInstaller::ProcessBundleInstall(const std::vector if (!ProcessExtProfile(installParam)) { LOG_W(BMS_TAG_INSTALLER, "ProcessExtProfile failed"); } + SetHybridSpawn(); LOG_I(BMS_TAG_INSTALLER, "finish install %{public}s", bundleName_.c_str()); UtdHandler::InstallUtdAsync(bundleName_, userId_); return result; @@ -2264,6 +2269,7 @@ ErrCode BaseBundleInstaller::InnerProcessInstallByPreInstallInfo( return ERR_APPEXECFWK_UPDATE_BUNDLE_ERROR; } } + SetHybridSpawn(); UtdHandler::InstallUtdAsync(bundleName, userId_); GenerateNewUserDataGroupInfos(oldInfo); isBundleCrossAppSharedConfig_ = oldInfo.IsBundleCrossAppSharedConfig(); @@ -4086,6 +4092,46 @@ ErrCode BaseBundleInstaller::ParseHapFiles( return ret; } +ErrCode BaseBundleInstaller::CheckArkTSMode(const std::unordered_map &newInfos) +{ + if (!OHOS::system::GetBoolParameter(ServiceConstants::ARK_WHITE_LIST, false)) { + return ERR_OK; + } + if (newInfos.empty()) { + LOG_E(BMS_TAG_INSTALLER, "newInfos is empty"); + return ERR_APPEXECFWK_INSTALL_INTERNAL_ERROR; + } + auto needCheckWhiteList = std::any_of(newInfos.begin(), newInfos.end(), + [](const auto &item) { + return std::any_of(item.second.GetInnerModuleInfos().begin(), + item.second.GetInnerModuleInfos().end(), + [](const auto &moduleItem) { + return moduleItem.second.moduleArkTSMode != Constants::ARKTS_MODE_DYNAMIC; + }); + }); + if (!needCheckWhiteList) { + return ERR_OK; + } + std::string bundleName = newInfos.begin()->second.GetBundleName(); + std::string appIdentifier = newInfos.begin()->second.GetAppIdentifier(); + std::string appId = newInfos.begin()->second.GetAppId(); + BundleParser bundleParser; + std::unordered_map> enableList; + bundleParser.ParseAppStaticRuntimeEnableList(ServiceConstants::ARK_WHITE_LIST_CONF, enableList); + auto iter = enableList.find(bundleName); + if (iter == enableList.end()) { + LOG_E(BMS_TAG_INSTALLER, "arkWhiteList not have bundle:%{public}s", bundleName.c_str()); + return ERR_APPEXECFWK_INSTALL_ARK_RUNTIME_NOT_IN_ARK_WHITE_LIST; + } + std::vector appSignature = iter->second; + if (std::find(appSignature.begin(), appSignature.end(), appIdentifier) == appSignature.end() + && std::find(appSignature.begin(), appSignature.end(), appId) == appSignature.end()) { + LOG_E(BMS_TAG_INSTALLER, "arkWhiteList appSignature not match -n:%{public}s", bundleName.c_str()); + return ERR_APPEXECFWK_INSTALL_ARK_RUNTIME_SIGNATURE_NOT_MATCH; + } + return ERR_OK; +} + void BaseBundleInstaller::UpdateExtensionSandboxInfo(std::unordered_map &newInfos, const std::vector &hapVerifyRes) { @@ -7793,6 +7839,23 @@ bool BaseBundleInstaller::ProcessExtProfile(const InstallParam &installParam) return true; } +void BaseBundleInstaller::SetHybridSpawn() +{ + if (!InitDataMgr()) { + return; + } + InnerBundleInfo info; + if (!dataMgr_->FetchInnerBundleInfo(bundleName_, info)) { + LOG_E(BMS_TAG_INSTALLER, "Get innerBundleInfo failed"); + return; + } + std::string arkTSMode = info.GetApplicationArkTSMode(); + if (arkTSMode == Constants::ARKTS_MODE_STATIC || arkTSMode == Constants::ARKTS_MODE_HYBRID) { + LOG_I(BMS_TAG_INSTALLER, "set persist.appspawn.hybridspawn.enable true"); + OHOS::system::SetParameter(ServiceConstants::HYBRID_SPAWN_ENABLE, BMS_TRUE); + } +} + bool BaseBundleInstaller::IsBundleCrossAppSharedConfig(const std::unordered_map &newInfos) { for (const auto &item : newInfos) { diff --git a/services/bundlemgr/src/bundle_data_mgr.cpp b/services/bundlemgr/src/bundle_data_mgr.cpp index f71d72fd25349d5ff4892bb52003f2dd937a64f3..41063e9f2133df83bc797a46b4b1a54b504b2866 100644 --- a/services/bundlemgr/src/bundle_data_mgr.cpp +++ b/services/bundlemgr/src/bundle_data_mgr.cpp @@ -9034,6 +9034,7 @@ void BundleDataMgr::ConvertServiceHspToSharedBundleInfo(const InnerBundleInfo &i baseSharedBundleInfo.versionCode = bundleInfo.versionCode; baseSharedBundleInfo.nativeLibraryPath = hapModule.nativeLibraryPath; baseSharedBundleInfo.hapPath = hapModule.hapPath; + baseSharedBundleInfo.moduleArkTSMode = hapModule.moduleArkTSMode; baseSharedBundleInfo.compressNativeLibs = hapModule.compressNativeLibs; baseSharedBundleInfo.nativeLibraryFileNames = hapModule.nativeLibraryFileNames; baseSharedBundleInfos.emplace_back(baseSharedBundleInfo); @@ -11167,5 +11168,24 @@ void BundleDataMgr::UpdateDesktopShortcutInfo(const std::string &bundleName) } shortcutStorage_->UpdateDesktopShortcutInfo(bundleName, shortcutInfos); } + +ErrCode BundleDataMgr::GetTestRunner(const std::string &bundleName, const std::string &moduleName, + ModuleTestRunner &testRunner) +{ + APP_LOGD("start GetTestRunner -n %{public}s -m %{public}s", bundleName.c_str(), moduleName.c_str()); + std::shared_lock lock(bundleInfoMutex_); + auto item = bundleInfos_.find(bundleName); + if (item == bundleInfos_.end()) { + APP_LOGE("-n %{public}s does not exist", bundleName.c_str()); + return ERR_BUNDLE_MANAGER_BUNDLE_NOT_EXIST; + } + auto moduleInfo = item->second.GetInnerModuleInfoByModuleName(moduleName); + if (!moduleInfo) { + APP_LOGE("-m %{public}s is not found", moduleName.c_str()); + return ERR_BUNDLE_MANAGER_MODULE_NOT_EXIST; + } + BundleParser bundleParser; + return bundleParser.ParseTestRunner(moduleInfo->hapPath, testRunner); +} } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/bundle_extractor.cpp b/services/bundlemgr/src/bundle_extractor.cpp index 95e433f799c54beb7fce360113bf5b0147ee9141..4ff2ef7214b71438102c5215eef65180601c274f 100644 --- a/services/bundlemgr/src/bundle_extractor.cpp +++ b/services/bundlemgr/src/bundle_extractor.cpp @@ -50,6 +50,16 @@ bool BundleExtractor::ExtractPackFile(std::ostream &dest) const return ExtractByName(BUNDLE_PACKFILE_NAME, dest); } +bool BundleExtractor::ExtractModuleProfile(std::ostream &dest) const +{ + if (IsNewVersion()) { + APP_LOGD("profile is module.json"); + return ExtractByName(MODULE_PROFILE_NAME, dest); + } + APP_LOGW("profile is config.json"); + return false; +} + BundleParallelExtractor::BundleParallelExtractor(const std::string &source) : BundleExtractor(source, true) { APP_LOGD("BundleParallelExtractor is created"); diff --git a/services/bundlemgr/src/bundle_mgr_host_impl.cpp b/services/bundlemgr/src/bundle_mgr_host_impl.cpp index b97019e379ccc88a35a547d4905450701a5de5dc..740a29dd656e87eaa51fc2126899ed0bf1d16bcc 100644 --- a/services/bundlemgr/src/bundle_mgr_host_impl.cpp +++ b/services/bundlemgr/src/bundle_mgr_host_impl.cpp @@ -5779,5 +5779,22 @@ bool BundleMgrHostImpl::GreatOrEqualTargetAPIVersion(const int32_t platformVersi } return dataMgr->GreatOrEqualTargetAPIVersion(platformVersion, minorVersion, patchVersion); } + +ErrCode BundleMgrHostImpl::GetTestRunner(const std::string &bundleName, const std::string &moduleName, + ModuleTestRunner &testRunner) +{ + APP_LOGD("GetTestRunner -n %{public}s -m %{public}s", bundleName.c_str(), moduleName.c_str()); + if (!BundlePermissionMgr::IsBundleSelfCalling(bundleName)) { + LOG_E(BMS_TAG_DEFAULT, "not self calling"); + return ERR_BUNDLE_MANAGER_PERMISSION_DENIED; + } + + auto dataMgr = GetDataMgrFromService(); + if (dataMgr == nullptr) { + APP_LOGE("dataMgr is nullptr"); + return ERR_APPEXECFWK_NULL_PTR; + } + return dataMgr->GetTestRunner(bundleName, moduleName, testRunner); +} } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/bundle_parser.cpp b/services/bundlemgr/src/bundle_parser.cpp index 78747df103980ff22c0910bf99e4e4194f4bacef..7f000a98fa48306a1cd2a4571771142384e9c9cf 100644 --- a/services/bundlemgr/src/bundle_parser.cpp +++ b/services/bundlemgr/src/bundle_parser.cpp @@ -39,6 +39,8 @@ static constexpr const char* ROUTER_ITEM_KEY_CUSTOM_DATA = "customData"; static constexpr const uint16_t DATA_MAX_LENGTH = 4096; constexpr const char* NO_DISABLING_CONFIG_KEY = "residentProcessInExtremeMemory"; constexpr const char* NO_DISABLING_KEY_BUNDLE_NAME = "bundleName"; +constexpr const char* STATIC_RUNTIME_ENABLE_LIST = "static_runtime_enable_list"; +constexpr const char* APP_SIGNATURE = "app_signature"; bool ParseStr(const char *buf, const int itemLen, int totalLen, std::vector &sysCaps) { @@ -434,9 +436,80 @@ ErrCode BundleParser::ParseArkStartupCacheConfig( if (!ReadFileIntoJson(configFile, jsonBuf)) { return ERR_APPEXECFWK_PARSE_FILE_FAILED; } - PreBundleProfile preBundleProfile; return preBundleProfile.TransToArkStartupCacheList(jsonBuf, bundleNames); } + +ErrCode BundleParser::ParseTestRunner( + const std::string &hapPath, + ModuleTestRunner &testRunner) const +{ + APP_LOGD("parse from %{private}s", hapPath.c_str()); + BundleExtractor bundleExtractor(hapPath); + if (!bundleExtractor.Init()) { + APP_LOGE("bundle extractor init failed"); + return ERR_APPEXECFWK_PARSE_UNEXPECTED; + } + + // to extract module.json + std::ostringstream outStream; + if (!bundleExtractor.ExtractModuleProfile(outStream)) { + APP_LOGE("extract profile file failed"); + return ERR_APPEXECFWK_PARSE_NO_PROFILE; + } + ModuleProfile moduleProfile; + return moduleProfile.TransformToTestRunner(outStream, testRunner); +} + +ErrCode BundleParser::ParseAppStaticRuntimeEnableList(const std::string &filePath, + std::unordered_map> &enableList) const +{ + APP_LOGD("Parse enableList from %{public}s", filePath.c_str()); + nlohmann::json jsonBuf; + if (!ReadFileIntoJson(filePath, jsonBuf)) { + return ERR_APPEXECFWK_PARSE_FILE_FAILED; + } + if (jsonBuf.find(STATIC_RUNTIME_ENABLE_LIST) == jsonBuf.end()) { + APP_LOGE("not have static_runtime_enable_list"); + return ERR_APPEXECFWK_PARSE_PROFILE_PROP_TYPE_ERROR; + } + auto jsonObject = jsonBuf.at(STATIC_RUNTIME_ENABLE_LIST); + ErrCode result = ERR_OK; + if (jsonObject.is_discarded() || !jsonObject.is_array()) { + APP_LOGE("not array"); + return ERR_APPEXECFWK_PARSE_PROFILE_PROP_TYPE_ERROR; + } + int32_t parseResult = ERR_OK; + for (const auto &object : jsonObject) { + if (!object.is_object()) { + APP_LOGE("not object"); + return ERR_APPEXECFWK_PARSE_PROFILE_PROP_TYPE_ERROR; + } + std::string bundleName; + std::vector appSignature; + const auto &objectEnd = object.end(); + BMSJsonUtil::GetStrValueIfFindKey(object, objectEnd, + NO_DISABLING_KEY_BUNDLE_NAME, + bundleName, + true, parseResult); + + GetValueIfFindKey>(object, objectEnd, + APP_SIGNATURE, + appSignature, + JsonType::ARRAY, + false, parseResult, ArrayType::STRING); + + if (parseResult != ERR_OK) { + APP_LOGE("parse enableList failed, parseResult is %{public}d, bundleName:%{public}s", + parseResult, bundleName.c_str()); + result = parseResult; + // need recover parse result to ERR_OK + parseResult = ERR_OK; + continue; + } + enableList.emplace(bundleName, appSignature); + } + return result; +} } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/inner_bundle_info.cpp b/services/bundlemgr/src/inner_bundle_info.cpp index ca378fa5514b570b040e4b52f7f968afd2fa1671..97fe95013ea9d2f87de3f7a989c2d9a71e057dcf 100644 --- a/services/bundlemgr/src/inner_bundle_info.cpp +++ b/services/bundlemgr/src/inner_bundle_info.cpp @@ -270,7 +270,7 @@ void InnerBundleInfo::GetInternalDependentHspInfo( hspInfo.bundleName = baseApplicationInfo_->bundleName; hspInfo.moduleName = item->second.moduleName; hspInfo.hapPath = item->second.hapPath; - hspInfo.codeLanguage = item->second.codeLanguage; + hspInfo.moduleArkTSMode = item->second.moduleArkTSMode; hspInfoVector.emplace_back(hspInfo); } } @@ -392,8 +392,8 @@ void to_json(nlohmann::json &jsonObject, const InnerModuleInfo &info) {MODULE_METADATA, info.metaData}, {MODULE_COLOR_MODE, info.colorMode}, {MODULE_DISTRO, info.distro}, - {Constants::CODE_LANGUAGE, info.codeLanguage}, - {Constants::ABILITY_STAGE_CODE_LANGUAGE, info.abilityStageCodeLanguage}, + {Constants::MODULE_ARKTS_MODE, info.moduleArkTSMode}, + {Constants::ARKTS_MODE, info.arkTSMode}, {MODULE_DESCRIPTION, info.description}, {MODULE_DESCRIPTION_ID, info.descriptionId}, {MODULE_ICON, info.icon}, @@ -599,14 +599,14 @@ void from_json(const nlohmann::json &jsonObject, InnerModuleInfo &info) ArrayType::NOT_ARRAY); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - info.codeLanguage, + Constants::MODULE_ARKTS_MODE, + info.moduleArkTSMode, false, parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::ABILITY_STAGE_CODE_LANGUAGE, - info.abilityStageCodeLanguage, + Constants::ARKTS_MODE, + info.arkTSMode, false, parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, @@ -1664,8 +1664,8 @@ std::optional InnerBundleInfo::FindHapModuleInfo( hapInfo.crossAppSharedConfig = it->second.crossAppSharedConfig; hapInfo.abilitySrcEntryDelegator = it->second.abilitySrcEntryDelegator; hapInfo.abilityStageSrcEntryDelegator = it->second.abilityStageSrcEntryDelegator; - hapInfo.codeLanguage = it->second.codeLanguage; - hapInfo.abilityStageCodeLanguage = it->second.abilityStageCodeLanguage; + hapInfo.moduleArkTSMode = it->second.moduleArkTSMode; + hapInfo.arkTSMode = it->second.arkTSMode; return hapInfo; } @@ -2072,6 +2072,7 @@ bool InnerBundleInfo::GetMaxVerBaseSharedBundleInfo(const std::string &moduleNam baseSharedBundleInfo.versionCode = innerModuleInfo.versionCode; baseSharedBundleInfo.nativeLibraryPath = innerModuleInfo.nativeLibraryPath; baseSharedBundleInfo.hapPath = innerModuleInfo.hapPath; + baseSharedBundleInfo.moduleArkTSMode = innerModuleInfo.moduleArkTSMode; baseSharedBundleInfo.compressNativeLibs = innerModuleInfo.compressNativeLibs; baseSharedBundleInfo.nativeLibraryFileNames = innerModuleInfo.nativeLibraryFileNames; return true; @@ -2101,6 +2102,7 @@ bool InnerBundleInfo::GetBaseSharedBundleInfo(const std::string &moduleName, uin baseSharedBundleInfo.versionCode = item.versionCode; baseSharedBundleInfo.nativeLibraryPath = item.nativeLibraryPath; baseSharedBundleInfo.hapPath = item.hapPath; + baseSharedBundleInfo.moduleArkTSMode = item.moduleArkTSMode; baseSharedBundleInfo.compressNativeLibs = item.compressNativeLibs; baseSharedBundleInfo.nativeLibraryFileNames = item.nativeLibraryFileNames; return true; @@ -2180,6 +2182,7 @@ bool InnerBundleInfo::GetSharedBundleInfo(SharedBundleInfo &sharedBundleInfo) co sharedModuleInfo.hapPath = info.hapPath; sharedModuleInfo.cpuAbi = info.cpuAbi; sharedModuleInfo.nativeLibraryPath = info.nativeLibraryPath; + sharedModuleInfo.moduleArkTSMode = info.moduleArkTSMode; sharedModuleInfo.nativeLibraryFileNames = info.nativeLibraryFileNames; sharedModuleInfos.emplace_back(sharedModuleInfo); } @@ -2328,7 +2331,7 @@ void InnerBundleInfo::GetApplicationInfo(int32_t flags, int32_t userId, Applicat return; } appInfo = *baseApplicationInfo_; - appInfo.codeLanguage = GetApplicationCodeLanguage(); + appInfo.arkTSMode = GetApplicationArkTSMode(); if (!GetApplicationInfoAdaptBundleClone(innerBundleUserInfo, appIndex, appInfo)) { return; } @@ -2390,7 +2393,7 @@ ErrCode InnerBundleInfo::GetApplicationInfoV9(int32_t flags, int32_t userId, App } appInfo = *baseApplicationInfo_; - appInfo.codeLanguage = GetApplicationCodeLanguage(); + appInfo.arkTSMode = GetApplicationArkTSMode(); if (!GetApplicationInfoAdaptBundleClone(innerBundleUserInfo, appIndex, appInfo)) { return ERR_APPEXECFWK_CLONE_INSTALL_INVALID_APP_INDEX; } @@ -2552,7 +2555,7 @@ bool InnerBundleInfo::GetSharedBundleInfo(int32_t flags, BundleInfo &bundleInfo) bundleInfo = *baseBundleInfo_; ProcessBundleWithHapModuleInfoFlag(flags, bundleInfo, Constants::ALL_USERID); bundleInfo.applicationInfo = *baseApplicationInfo_; - bundleInfo.applicationInfo.codeLanguage = GetApplicationCodeLanguage(); + bundleInfo.applicationInfo.arkTSMode = GetApplicationArkTSMode(); return true; } @@ -4120,6 +4123,8 @@ void InnerBundleInfo::UpdateSharedModuleInfo() for (auto iter = innerModuleInfoVector.begin(); iter != innerModuleInfoVector.end(); ++iter) { if (iter->versionCode == moduleInfoIter->second.versionCode) { iter->hapPath = moduleInfoIter->second.hapPath; + iter->arkTSMode = moduleInfoIter->second.arkTSMode; + iter->moduleArkTSMode = moduleInfoIter->second.moduleArkTSMode; iter->compressNativeLibs = moduleInfoIter->second.compressNativeLibs; iter->cpuAbi = moduleInfoIter->second.cpuAbi; iter->nativeLibraryPath = moduleInfoIter->second.nativeLibraryPath; @@ -4220,7 +4225,7 @@ ErrCode InnerBundleInfo::GetAppServiceHspInfo(BundleInfo &bundleInfo) const } bundleInfo = *baseBundleInfo_; bundleInfo.applicationInfo = *baseApplicationInfo_; - bundleInfo.applicationInfo.codeLanguage = GetApplicationCodeLanguage(); + bundleInfo.applicationInfo.arkTSMode = GetApplicationArkTSMode(); for (const auto &info : innerModuleInfos_) { if (info.second.distro.moduleType == Profile::MODULE_TYPE_SHARED) { auto hapmoduleinfo = FindHapModuleInfo(info.second.modulePackage, Constants::ALL_USERID); @@ -5039,7 +5044,7 @@ bool InnerBundleInfo::ConvertPluginBundleInfo(const std::string &bundleName, baseApplicationInfo_->nativeLibraryPath; pluginBundleInfo.abilityInfos.insert(baseAbilityInfos_.begin(), baseAbilityInfos_.end()); pluginBundleInfo.appInfo = *baseApplicationInfo_; - pluginBundleInfo.appInfo.codeLanguage = GetApplicationCodeLanguage(); + pluginBundleInfo.appInfo.arkTSMode = GetApplicationArkTSMode(); for (const auto &info : innerModuleInfos_) { PluginModuleInfo pluginModuleInfo; pluginModuleInfo.moduleName = info.second.name; @@ -5053,6 +5058,7 @@ bool InnerBundleInfo::ConvertPluginBundleInfo(const std::string &bundleName, pluginModuleInfo.compressNativeLibs = info.second.compressNativeLibs; pluginModuleInfo.isLibIsolated = info.second.isLibIsolated; pluginModuleInfo.packageName = info.second.packageName; + pluginModuleInfo.moduleArkTSMode = info.second.moduleArkTSMode; pluginBundleInfo.pluginModuleInfos.emplace_back(pluginModuleInfo); } return true; @@ -5254,37 +5260,37 @@ bool InnerBundleInfo::SetInnerModuleAtomicResizeable(const std::string &moduleNa return true; } -std::string InnerBundleInfo::GetApplicationCodeLanguage() const +std::string InnerBundleInfo::GetApplicationArkTSMode() const { - size_t language1_1_cnt = 0; - size_t language1_2_cnt = 0; + size_t dynamicCnt = 0; + size_t staticCnt = 0; for (const auto& [moduleName, innerModuleInfo] : innerModuleInfos_) { - if (innerModuleInfo.codeLanguage == Constants::CODE_LANGUAGE_1_1) { - language1_1_cnt++; + if (innerModuleInfo.moduleArkTSMode == Constants::ARKTS_MODE_DYNAMIC) { + dynamicCnt++; } - if (innerModuleInfo.codeLanguage == Constants::CODE_LANGUAGE_1_2) { - language1_2_cnt++; + if (innerModuleInfo.moduleArkTSMode == Constants::ARKTS_MODE_STATIC) { + staticCnt++; } } size_t moduleSize = innerModuleInfos_.size(); - if (language1_1_cnt == moduleSize) { - return Constants::CODE_LANGUAGE_1_1; + if (dynamicCnt == moduleSize) { + return Constants::ARKTS_MODE_DYNAMIC; } - if (language1_2_cnt == moduleSize) { - return Constants::CODE_LANGUAGE_1_2; + if (staticCnt == moduleSize) { + return Constants::ARKTS_MODE_STATIC; } - return Constants::CODE_LANGUAGE_HYBRID; + return Constants::ARKTS_MODE_HYBRID; } -std::string InnerBundleInfo::GetModuleCodeLanguage(const std::string &moduleName) const +std::string InnerBundleInfo::GetModuleArkTSMode(const std::string &moduleName) const { auto item = innerModuleInfos_.find(moduleName); if (item == innerModuleInfos_.end()) { APP_LOGW_NOFUNC("moduleName %{public}s not exist", moduleName.c_str()); return Constants::EMPTY_STRING; } - return item->second.codeLanguage; + return item->second.moduleArkTSMode; } } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/module_profile.cpp b/services/bundlemgr/src/module_profile.cpp index dc2da67f01c52d12f1625261a3c619ccdd7f2a1d..cdfd298eaabfcacb2a83be3c0e3da0e6afc412df 100644 --- a/services/bundlemgr/src/module_profile.cpp +++ b/services/bundlemgr/src/module_profile.cpp @@ -209,7 +209,7 @@ struct Ability { std::vector continueType; std::vector continueBundleNames; std::string process; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; }; struct Extension { @@ -235,7 +235,7 @@ struct Extension { std::string extensionProcessMode; std::vector dataGroupIds; std::string customProcess; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; }; struct MultiAppMode { @@ -243,6 +243,12 @@ struct MultiAppMode { int32_t maxCount = 0; }; +struct TestRunner { + std::string name; + std::string srcPath; + std::string arkTSMode; +}; + struct App { bool debug = false; bool keepAlive = false; @@ -333,8 +339,8 @@ struct Module { std::string appStartup; std::string formExtensionModule; std::string formWidgetModule; - std::string codeLanguage = Constants::CODE_LANGUAGE_1_1; - std::string abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_1; + std::string moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; + std::string arkTSMode = Constants::ARKTS_MODE_DYNAMIC; }; struct ModuleJson { @@ -342,6 +348,34 @@ struct ModuleJson { Module module; }; +void from_json(const nlohmann::json &jsonObject, TestRunner &testRunner) +{ + APP_LOGD("read testRunnerfrom module.json"); + int32_t parseResult = ERR_OK; + const auto &jsonObjectEnd = jsonObject.end(); + BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + TEST_RUNNER_NAME, + testRunner.name, + false, + parseResult); + BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + TEST_RUNNER_SRC_PATH, + testRunner.srcPath, + false, + parseResult); + BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + TEST_RUNNER_ARKTS_MODE, + testRunner.arkTSMode, + false, + parseResult); + if (parseResult != ERR_OK) { + APP_LOGE("read testRunner error %{public}d", parseResult); + } +} + void from_json(const nlohmann::json &jsonObject, Metadata &metadata) { APP_LOGD("read metadata tag from module.json"); @@ -689,8 +723,8 @@ void from_json(const nlohmann::json &jsonObject, Ability &ability) g_parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - ability.codeLanguage, + Constants::ARKTS_MODE, + ability.arkTSMode, false, g_parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, @@ -882,8 +916,8 @@ void from_json(const nlohmann::json &jsonObject, Extension &extension) g_parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - extension.codeLanguage, + Constants::ARKTS_MODE, + extension.arkTSMode, false, g_parseResult); } @@ -1672,14 +1706,14 @@ void from_json(const nlohmann::json &jsonObject, Module &module) g_parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::CODE_LANGUAGE, - module.codeLanguage, + Constants::MODULE_ARKTS_MODE, + module.moduleArkTSMode, false, g_parseResult); BMSJsonUtil::GetStrValueIfFindKey(jsonObject, jsonObjectEnd, - Constants::ABILITY_STAGE_CODE_LANGUAGE, - module.abilityStageCodeLanguage, + Constants::ARKTS_MODE, + module.arkTSMode, false, g_parseResult); } @@ -2424,7 +2458,7 @@ bool ToAbilityInfo( } abilityInfo.orientationId = ability.orientationId; abilityInfo.process = ability.process; - abilityInfo.codeLanguage = ability.codeLanguage; + abilityInfo.arkTSMode = ability.arkTSMode; APP_LOGI("startWindowIconId %{public}s_%{public}s_%{public}s_%{public}d", abilityInfo.bundleName.c_str(), abilityInfo.moduleName.c_str(), abilityInfo.name.c_str(), abilityInfo.startWindowIconId); return true; @@ -2488,7 +2522,7 @@ void ToExtensionInfo( extensionInfo.dataGroupIds.emplace_back(dataGroup); } extensionInfo.customProcess = extension.customProcess; - extensionInfo.codeLanguage = extension.codeLanguage; + extensionInfo.arkTSMode = extension.arkTSMode; } bool GetPermissions( @@ -2609,8 +2643,8 @@ bool ToInnerModuleInfo( innerModuleInfo.appStartup = moduleJson.module.appStartup; innerModuleInfo.formExtensionModule = moduleJson.module.formExtensionModule; innerModuleInfo.formWidgetModule = moduleJson.module.formWidgetModule; - innerModuleInfo.codeLanguage = moduleJson.module.codeLanguage; - innerModuleInfo.abilityStageCodeLanguage = moduleJson.module.abilityStageCodeLanguage; + innerModuleInfo.moduleArkTSMode = moduleJson.module.moduleArkTSMode; + innerModuleInfo.arkTSMode = moduleJson.module.arkTSMode; innerModuleInfo.debug = moduleJson.app.debug; innerModuleInfo.abilitySrcEntryDelegator = moduleJson.module.abilitySrcEntryDelegator; innerModuleInfo.abilityStageSrcEntryDelegator = moduleJson.module.abilityStageSrcEntryDelegator; @@ -2920,5 +2954,50 @@ ErrCode ModuleProfile::TransformTo( } return ERR_OK; } + +ErrCode ModuleProfile::TransformToTestRunner( + const std::ostringstream &source, + ModuleTestRunner &moduleTestRunner) const +{ + APP_LOGD("transform module.json stream to TestRunner"); + nlohmann::json jsonObject = nlohmann::json::parse(source.str(), nullptr, false); + if (jsonObject.is_discarded()) { + APP_LOGE("bad profile"); + return ERR_APPEXECFWK_PARSE_BAD_PROFILE; + } + if (!jsonObject.contains(Profile::MODULE)) { + APP_LOGE("TransformToTestRunner failed due to bad module.json"); + return ERR_APPEXECFWK_PARSE_BAD_PROFILE; + } + nlohmann::json moduleJson = jsonObject.at(Profile::MODULE); + if (!moduleJson.contains(Profile::TEST_RUNNER)) { + APP_LOGE("module.json not have testRunner"); + return ERR_APPEXECFWK_PARSE_BAD_PROFILE; + } + nlohmann::json testRunnerObj = moduleJson.at(Profile::TEST_RUNNER); + if (!testRunnerObj.is_object()) { + APP_LOGE("testRunnerObj is not object"); + return ERR_APPEXECFWK_PARSE_BAD_PROFILE; + } + if (testRunnerObj.contains(Profile::TEST_RUNNER_NAME)) { + if (testRunnerObj.at(Profile::TEST_RUNNER_NAME).is_string()) { + moduleTestRunner.name = testRunnerObj.at(Profile::TEST_RUNNER_NAME); + } + APP_LOGW("name is not string"); + } + if (testRunnerObj.contains(Profile::TEST_RUNNER_SRC_PATH)) { + if (testRunnerObj.at(Profile::TEST_RUNNER_SRC_PATH).is_string()) { + moduleTestRunner.srcPath = testRunnerObj.at(Profile::TEST_RUNNER_SRC_PATH); + } + APP_LOGW("srcPath is not string"); + } + if (testRunnerObj.contains(Profile::TEST_RUNNER_ARKTS_MODE)) { + if (testRunnerObj.at(Profile::TEST_RUNNER_ARKTS_MODE).is_string()) { + moduleTestRunner.arkTSMode = testRunnerObj.at(Profile::TEST_RUNNER_ARKTS_MODE); + } + APP_LOGW("arkTSMode is not string"); + } + return ERR_OK; +} } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/test/unittest/bms_bundle_aot_test/bms_data_aot_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_aot_test/bms_data_aot_test.cpp index 1967788c460c1e91dfbbc940a700c72fe94db594..9615ff27b6a397c2b08b44d3cbc7cf1f3f961fbd 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_aot_test/bms_data_aot_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_aot_test/bms_data_aot_test.cpp @@ -149,7 +149,7 @@ HspInfo BmsAOTMgrTest::CreateHspInfo() const hspInfo.hapPath = "hapPath"; hspInfo.offset = OFFSET; hspInfo.length = LENGTH; - hspInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + hspInfo.moduleArkTSMode = Constants::ARKTS_MODE_STATIC; return hspInfo; } @@ -161,7 +161,7 @@ void BmsAOTMgrTest::CheckHspInfo(HspInfo &sourceHspInfo, HspInfo &targetHspInfo) EXPECT_EQ(sourceHspInfo.hapPath, targetHspInfo.hapPath); EXPECT_EQ(sourceHspInfo.offset, targetHspInfo.offset); EXPECT_EQ(sourceHspInfo.length, targetHspInfo.length); - EXPECT_EQ(sourceHspInfo.codeLanguage, targetHspInfo.codeLanguage); + EXPECT_EQ(sourceHspInfo.moduleArkTSMode, targetHspInfo.moduleArkTSMode); } void BmsAOTMgrTest::ClearDataMgr() @@ -760,7 +760,7 @@ HWTEST_F(BmsAOTMgrTest, AOTArgs_0200, Function | SmallTest | Level1) aotArgs.length = LENGTH; aotArgs.hspVector.emplace_back(CreateHspInfo()); aotArgs.hspVector.emplace_back(CreateHspInfo()); - aotArgs.codeLanguage = Constants::CODE_LANGUAGE_1_2; + aotArgs.moduleArkTSMode = Constants::ARKTS_MODE_STATIC; aotArgs.isSysComp = true; aotArgs.sysCompPath = "sysCompPath"; @@ -783,7 +783,7 @@ HWTEST_F(BmsAOTMgrTest, AOTArgs_0200, Function | SmallTest | Level1) for (size_t i = 0; i < aotArgsPtr->hspVector.size(); ++i) { CheckHspInfo(aotArgsPtr->hspVector[i], aotArgs.hspVector[i]); } - EXPECT_EQ(aotArgsPtr->codeLanguage, aotArgs.codeLanguage); + EXPECT_EQ(aotArgsPtr->moduleArkTSMode, aotArgs.moduleArkTSMode); EXPECT_EQ(aotArgsPtr->isSysComp, aotArgs.isSysComp); EXPECT_EQ(aotArgsPtr->sysCompPath, aotArgs.sysCompPath); APP_LOGI("AOTArgs_0200 end"); @@ -1348,10 +1348,10 @@ HWTEST_F(BmsAOTMgrTest, AOTExecutor_1700, Function | SmallTest | Level0) std::string hapPath = ""; uint32_t offset = OFFSET; uint32_t length = LENGTH; - bool result = AOTExecutor::GetInstance().GetAbcFileInfo(hapPath, Constants::CODE_LANGUAGE_1_1, offset, length); + bool result = AOTExecutor::GetInstance().GetAbcFileInfo(hapPath, Constants::ARKTS_MODE_DYNAMIC, offset, length); EXPECT_FALSE(result); hapPath = HAP_PATH; - result = AOTExecutor::GetInstance().GetAbcFileInfo(hapPath, Constants::CODE_LANGUAGE_1_1, offset, length); + result = AOTExecutor::GetInstance().GetAbcFileInfo(hapPath, Constants::ARKTS_MODE_DYNAMIC, offset, length); EXPECT_FALSE(result); } @@ -1420,8 +1420,8 @@ HWTEST_F(BmsAOTMgrTest, AOTExecutor_2100, Function | SmallTest | Level0) */ HWTEST_F(BmsAOTMgrTest, AOTExecutor_2200, Function | SmallTest | Level0) { - EXPECT_EQ(AOTExecutor::GetInstance().GetAbcRelativePath(Constants::CODE_LANGUAGE_1_1), ABC_RELATIVE_PATH); - EXPECT_EQ(AOTExecutor::GetInstance().GetAbcRelativePath(Constants::CODE_LANGUAGE_1_2), STATIC_ABC_RELATIVE_PATH); + EXPECT_EQ(AOTExecutor::GetInstance().GetAbcRelativePath(Constants::ARKTS_MODE_DYNAMIC), ABC_RELATIVE_PATH); + EXPECT_EQ(AOTExecutor::GetInstance().GetAbcRelativePath(Constants::ARKTS_MODE_STATIC), STATIC_ABC_RELATIVE_PATH); EXPECT_EQ(AOTExecutor::GetInstance().GetAbcRelativePath(Constants::EMPTY_STRING), Constants::EMPTY_STRING); } diff --git a/services/bundlemgr/test/unittest/bms_bundle_data_group_test/bms_bundle_data_group_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_data_group_test/bms_bundle_data_group_test.cpp index 1bb77fb268906f54bca53ac945e919d284c626fa..119fe659b00c1dee02a6efc082501e9ff5e2d409 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_data_group_test/bms_bundle_data_group_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_data_group_test/bms_bundle_data_group_test.cpp @@ -2103,4 +2103,64 @@ HWTEST_F(BmsBundleDataGroupTest, BaseBundleInstaller_0026, Function | SmallTest auto result5 = installer.CheckShellCanInstallPreApp(newInfos); EXPECT_EQ(result5, ERR_OK); } + +/** + * @tc.number: SetHybridSpawn_0001 + * @tc.name: test SetHybridSpawn + * @tc.desc: 1.Test SetHybridSpawn +*/ +HWTEST_F(BmsBundleDataGroupTest, SetHybridSpawn_0001, Function | MediumTest | Level1) +{ + BaseBundleInstaller installer; + installer.bundleName_ = "test"; + installer.SetHybridSpawn(); + InnerBundleInfo info; + bool isExist = false; + bool res = installer.GetInnerBundleInfoWithDisable(info, isExist); + EXPECT_TRUE(res); +} + +/** + * @tc.number: SetHybridSpawn_0002 + * @tc.name: test SetHybridSpawn + * @tc.desc: 1.Test SetHybridSpawn +*/ +HWTEST_F(BmsBundleDataGroupTest, SetHybridSpawn_0002, Function | MediumTest | Level1) +{ + BaseBundleInstaller installer; + installer.bundleName_ = "test"; + InnerBundleInfo info; + info.baseApplicationInfo_->bundleName = "test"; + InnerModuleInfo innerModuleInfo; + innerModuleInfo.moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; + info.innerModuleInfos_.try_emplace("entry", innerModuleInfo); + auto dataMgr = GetBundleDataMgr(); + ASSERT_NE(dataMgr, nullptr); + dataMgr->bundleInfos_.emplace("test", info); + installer.SetHybridSpawn(); + EXPECT_EQ(info.GetApplicationArkTSMode(), Constants::ARKTS_MODE_DYNAMIC); + dataMgr->bundleInfos_.erase("test"); +} + +/** + * @tc.number: SetHybridSpawn_0003 + * @tc.name: test SetHybridSpawn + * @tc.desc: 1.Test SetHybridSpawn +*/ +HWTEST_F(BmsBundleDataGroupTest, SetHybridSpawn_0003, Function | MediumTest | Level1) +{ + BaseBundleInstaller installer; + installer.bundleName_ = "test"; + InnerBundleInfo info; + info.baseApplicationInfo_->bundleName = "test"; + InnerModuleInfo innerModuleInfo; + innerModuleInfo.moduleArkTSMode = Constants::ARKTS_MODE_STATIC; + info.innerModuleInfos_.try_emplace("entry", innerModuleInfo); + auto dataMgr = GetBundleDataMgr(); + ASSERT_NE(dataMgr, nullptr); + dataMgr->bundleInfos_.emplace("test", info); + installer.SetHybridSpawn(); + EXPECT_EQ(info.GetApplicationArkTSMode(), Constants::ARKTS_MODE_STATIC); + dataMgr->bundleInfos_.erase("test"); +} } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_bundle_data_storage_test/bms_bundle_data_storage_database_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_data_storage_test/bms_bundle_data_storage_database_test.cpp index d55f0138686fd6672382e38eb72c4237104c1240..cc53f168cbf8d3b999788d19e778929e297cc66d 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_data_storage_test/bms_bundle_data_storage_database_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_data_storage_test/bms_bundle_data_storage_database_test.cpp @@ -854,7 +854,7 @@ protected: "applicationName": "com.ohos.launcher", "backgroundModes": 0, "bundleName": "com.ohos.launcher", - "codeLanguage": "1.1", + "arkTSMode": "dynamic", "codePath": "", "compileMode": 0, "configChanges": [ @@ -1111,7 +1111,7 @@ protected: "asanLogPath": "", "bundleName": "com.ohos.launcher", "cacheDir": "/data/app/el2/100/base/com.ohos.launcher/cache", - "codeLanguage": "1.1", + "arkTSMode": "dynamic", "codePath": "/data/app/el1/bundle/public/com.ohos.launcher", "compileSdkType":"OpenHarmony", "compileSdkVersion":"", @@ -5097,25 +5097,25 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, SetOverlayModuleState_0002, Function } /** - * @tc.number: GetModuleCodeLanguage_0001 - * @tc.name: test GetModuleCodeLanguage - * @tc.desc: 1. test GetModuleCodeLanguage of InnerBundleInfo + * @tc.number: GetModuleArkTSMode_0001 + * @tc.name: test GetModuleArkTSMode + * @tc.desc: 1. test GetModuleArkTSMode of InnerBundleInfo */ -HWTEST_F(BmsBundleDataStorageDatabaseTest, GetModuleCodeLanguage_0001, Function | SmallTest | Level1) +HWTEST_F(BmsBundleDataStorageDatabaseTest, GetModuleArkTSMode_0001, Function | SmallTest | Level1) { InnerBundleInfo innerBundleInfo; for (int32_t i = 0; i < INFO_COUNT; ++i) { InnerModuleInfo innerModuleInfo; - innerModuleInfo.codeLanguage = i % 3 == 0 ? Constants::CODE_LANGUAGE_1_2 : Constants::CODE_LANGUAGE_1_1; + innerModuleInfo.moduleArkTSMode = i % 3 == 0 ? Constants::ARKTS_MODE_STATIC : Constants::ARKTS_MODE_DYNAMIC; innerBundleInfo.innerModuleInfos_.insert(std::make_pair(std::to_string(i), innerModuleInfo)); } - std::string result = innerBundleInfo.GetModuleCodeLanguage(std::to_string(INFO_COUNT)); + std::string result = innerBundleInfo.GetModuleArkTSMode(std::to_string(INFO_COUNT)); EXPECT_EQ(result, Constants::EMPTY_STRING); for (int32_t i = 0; i < INFO_COUNT; ++i) { - result = innerBundleInfo.GetModuleCodeLanguage(std::to_string(i)); - EXPECT_EQ(result, i % 3 == 0 ? Constants::CODE_LANGUAGE_1_2 : Constants::CODE_LANGUAGE_1_1); + result = innerBundleInfo.GetModuleArkTSMode(std::to_string(i)); + EXPECT_EQ(result, i % 3 == 0 ? Constants::ARKTS_MODE_STATIC : Constants::ARKTS_MODE_DYNAMIC); } } @@ -5146,69 +5146,69 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, InnerBundleInfo_13200, Function | Sma } /** - * @tc.number: GetApplicationCodeLanguage_0001 - * @tc.name: test GetApplicationCodeLanguage - * @tc.desc: 1. test GetApplicationCodeLanguage of InnerBundleInfo on empty innerModuleInfos_ + * @tc.number: GetApplicationArkTSMode_0001 + * @tc.name: test GetApplicationArkTSMode + * @tc.desc: 1. test GetApplicationArkTSMode of InnerBundleInfo on empty innerModuleInfos_ */ -HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationCodeLanguage_0001, Function | SmallTest | Level1) +HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationArkTSMode_0001, Function | SmallTest | Level1) { InnerBundleInfo innerBundleInfo; - EXPECT_EQ(innerBundleInfo.GetApplicationCodeLanguage(), Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(innerBundleInfo.GetApplicationArkTSMode(), Constants::ARKTS_MODE_DYNAMIC); } /** - * @tc.number: GetApplicationCodeLanguage_0002 - * @tc.name: test GetApplicationCodeLanguage - * @tc.desc: 1. test GetApplicationCodeLanguage of InnerBundleInfo + * @tc.number: GetApplicationArkTSMode_0002 + * @tc.name: test GetApplicationArkTSMode + * @tc.desc: 1. test GetApplicationArkTSMode of InnerBundleInfo */ -HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationCodeLanguage_0002, Function | SmallTest | Level1) +HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationArkTSMode_0002, Function | SmallTest | Level1) { InnerBundleInfo innerBundleInfo; for (int32_t i = 0; i < INFO_COUNT; ++i) { InnerModuleInfo innerModuleInfo; - innerModuleInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + innerModuleInfo.moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; innerBundleInfo.innerModuleInfos_.insert(std::make_pair(std::to_string(i), innerModuleInfo)); } - EXPECT_EQ(innerBundleInfo.GetApplicationCodeLanguage(), Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(innerBundleInfo.GetApplicationArkTSMode(), Constants::ARKTS_MODE_DYNAMIC); } /** - * @tc.number: GetApplicationCodeLanguage_0003 - * @tc.name: test GetApplicationCodeLanguage - * @tc.desc: 1. test GetApplicationCodeLanguage of InnerBundleInfo + * @tc.number: GetApplicationArkTSMode_0003 + * @tc.name: test GetApplicationArkTSMode + * @tc.desc: 1. test GetApplicationArkTSMode of InnerBundleInfo */ -HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationCodeLanguage_0003, Function | SmallTest | Level1) +HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationArkTSMode_0003, Function | SmallTest | Level1) { InnerBundleInfo innerBundleInfo; for (int32_t i = 0; i < INFO_COUNT; ++i) { InnerModuleInfo innerModuleInfo; - innerModuleInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + innerModuleInfo.moduleArkTSMode = Constants::ARKTS_MODE_STATIC; innerBundleInfo.innerModuleInfos_.insert(std::make_pair(std::to_string(i), innerModuleInfo)); } - EXPECT_EQ(innerBundleInfo.GetApplicationCodeLanguage(), Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(innerBundleInfo.GetApplicationArkTSMode(), Constants::ARKTS_MODE_STATIC); } /** - * @tc.number: GetApplicationCodeLanguage_0004 - * @tc.name: test GetApplicationCodeLanguage - * @tc.desc: 1. test GetApplicationCodeLanguage of InnerBundleInfo + * @tc.number: GetApplicationArkTSMode_0004 + * @tc.name: test GetApplicationArkTSMode + * @tc.desc: 1. test GetApplicationArkTSMode of InnerBundleInfo */ -HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationCodeLanguage_0004, Function | SmallTest | Level1) +HWTEST_F(BmsBundleDataStorageDatabaseTest, GetApplicationArkTSMode_0004, Function | SmallTest | Level1) { InnerBundleInfo innerBundleInfo; for (int32_t i = 0; i < INFO_COUNT; ++i) { InnerModuleInfo innerModuleInfo; - innerModuleInfo.codeLanguage = i % 3 == 0 ? Constants::CODE_LANGUAGE_1_2 : Constants::CODE_LANGUAGE_1_1; + innerModuleInfo.moduleArkTSMode = i % 3 == 0 ? Constants::ARKTS_MODE_STATIC : Constants::ARKTS_MODE_DYNAMIC; innerBundleInfo.innerModuleInfos_.insert(std::make_pair(std::to_string(i), innerModuleInfo)); } - EXPECT_EQ(innerBundleInfo.GetApplicationCodeLanguage(), Constants::CODE_LANGUAGE_HYBRID); + EXPECT_EQ(innerBundleInfo.GetApplicationArkTSMode(), Constants::ARKTS_MODE_HYBRID); } /** @@ -5221,17 +5221,17 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, AbilityInfo_0001, Function | SmallTes AbilityInfo sourceInfo; nlohmann::json jsonObject = sourceInfo; AbilityInfo fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } /** @@ -5248,21 +5248,21 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, AbilityInfo_0002, Function | SmallTes AbilityInfo targetInfo; ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } /** @@ -5275,17 +5275,17 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, ExtensionAbilityInfo_0001, Function | ExtensionAbilityInfo sourceInfo; nlohmann::json jsonObject = sourceInfo; ExtensionAbilityInfo fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } /** @@ -5302,21 +5302,21 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, ExtensionAbilityInfo_0002, Function | ExtensionAbilityInfo targetInfo; ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } /** @@ -5329,21 +5329,21 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, HapModuleInfo_0001, Function | SmallT HapModuleInfo sourceInfo; nlohmann::json jsonObject = sourceInfo; HapModuleInfo fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.moduleArkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; - sourceInfo.abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); - EXPECT_EQ(fromJsonInfo.abilityStageCodeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.moduleArkTSMode, Constants::ARKTS_MODE_DYNAMIC); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; - sourceInfo.abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.moduleArkTSMode = Constants::ARKTS_MODE_STATIC; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); - EXPECT_EQ(fromJsonInfo.abilityStageCodeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(fromJsonInfo.moduleArkTSMode, Constants::ARKTS_MODE_STATIC); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } /** @@ -5360,26 +5360,26 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, HapModuleInfo_0002, Function | SmallT HapModuleInfo targetInfo; ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); - EXPECT_EQ(targetInfo.abilityStageCodeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.moduleArkTSMode, Constants::ARKTS_MODE_DYNAMIC); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; - sourceInfo.abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.moduleArkTSMode = Constants::ARKTS_MODE_DYNAMIC; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); - EXPECT_EQ(targetInfo.abilityStageCodeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(targetInfo.moduleArkTSMode, Constants::ARKTS_MODE_DYNAMIC); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; - sourceInfo.abilityStageCodeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.moduleArkTSMode = Constants::ARKTS_MODE_STATIC; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); - EXPECT_EQ(targetInfo.abilityStageCodeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.moduleArkTSMode, Constants::ARKTS_MODE_STATIC); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); } /** @@ -5392,17 +5392,17 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, ApplicationInfo_0001, Function | Smal ApplicationInfo sourceInfo; nlohmann::json jsonObject = sourceInfo; ApplicationInfo fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::EMPTY_STRING); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::EMPTY_STRING); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; jsonObject = sourceInfo; fromJsonInfo = jsonObject; - EXPECT_EQ(fromJsonInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(fromJsonInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } /** @@ -5419,20 +5419,20 @@ HWTEST_F(BmsBundleDataStorageDatabaseTest, ApplicationInfo_0002, Function | Smal ApplicationInfo targetInfo; ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::EMPTY_STRING); + EXPECT_EQ(targetInfo.arkTSMode, Constants::EMPTY_STRING); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_1; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_DYNAMIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_1); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_DYNAMIC); - sourceInfo.codeLanguage = Constants::CODE_LANGUAGE_1_2; + sourceInfo.arkTSMode = Constants::ARKTS_MODE_STATIC; ret = sourceInfo.Marshalling(parcel); EXPECT_EQ(ret, true); ret = targetInfo.ReadFromParcel(parcel); EXPECT_EQ(ret, true); - EXPECT_EQ(targetInfo.codeLanguage, Constants::CODE_LANGUAGE_1_2); + EXPECT_EQ(targetInfo.arkTSMode, Constants::ARKTS_MODE_STATIC); } } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_bundle_default_app_test/bms_bundle_default_app_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_default_app_test/bms_bundle_default_app_test.cpp index 614bb7aca3ba57494ff0bec7c0878396be9e33f2..cc1943c346eeb63e93b4b1fa53a62c4ed6db19ae 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_default_app_test/bms_bundle_default_app_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_default_app_test/bms_bundle_default_app_test.cpp @@ -1777,7 +1777,7 @@ HWTEST_F(BmsBundleDefaultAppTest, AOT_EXECUTOR_0100, Function | SmallTest | Leve std::string hapPath = "/data/test.hap"; uint32_t offset = 0; uint32_t length = 0; - ret = AOTExecutor::GetInstance().GetAbcFileInfo(hapPath, Constants::CODE_LANGUAGE_1_1, offset, length); + ret = AOTExecutor::GetInstance().GetAbcFileInfo(hapPath, Constants::ARKTS_MODE_DYNAMIC, offset, length); EXPECT_EQ(ret, false); AOTArgs completeArgs; diff --git a/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_data_mgr_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_data_mgr_test.cpp index 8aa234da1f785823c5d825fe3f7b2b432cbb8d7a..7c6b9cc4456914def29c3ed77abf9bd7d582a3f8 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_data_mgr_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_data_mgr_test.cpp @@ -4288,4 +4288,48 @@ HWTEST_F(BmsBundleDataMgrTest, BundleMgrProxyBatchGetBundleStats_0100, Function ErrCode ret = localBundleMgrProxy->BatchGetBundleStats(bundleNames, USERID, bundleStats); EXPECT_EQ(ret, ERR_APPEXECFWK_INSTALLD_PARAM_ERROR); } + +/** + * @tc.number: GetTestRunner_0100 + * @tc.name: GetTestRunner_0100 + * @tc.desc: test GetTestRunner + */ +HWTEST_F(BmsBundleDataMgrTest, GetTestRunner_0100, Function | MediumTest | Level1) +{ + ModuleTestRunner testRunner; + ErrCode ret = GetBundleDataMgr()->GetTestRunner(BUNDLE_NAME_TEST, MODULE_NAME_TEST, testRunner); + EXPECT_EQ(ret, ERR_BUNDLE_MANAGER_BUNDLE_NOT_EXIST); +} + +/** +* @tc.number: GetTestRunner_0200 +* @tc.name: GetTestRunner_0200 +* @tc.desc: test GetTestRunner +*/ +HWTEST_F(BmsBundleDataMgrTest, GetTestRunner_0200, Function | MediumTest | Level1) +{ + MockInstallBundle(BUNDLE_NAME_TEST, MODULE_NAME_TEST, ABILITY_NAME_TEST); + + ModuleTestRunner testRunner; + ErrCode ret = GetBundleDataMgr()->GetTestRunner(BUNDLE_NAME_TEST, BUNDLE_NAME_TEST, testRunner); + EXPECT_EQ(ret, ERR_BUNDLE_MANAGER_MODULE_NOT_EXIST); + + MockUninstallBundle(BUNDLE_NAME_TEST); +} + +/** +* @tc.number: GetTestRunner_0300 +* @tc.name: GetTestRunner_0300 +* @tc.desc: test GetTestRunner +*/ +HWTEST_F(BmsBundleDataMgrTest, GetTestRunner_0300, Function | MediumTest | Level1) +{ + MockInstallBundle(BUNDLE_NAME_TEST, MODULE_NAME_TEST, ABILITY_NAME_TEST); + + ModuleTestRunner testRunner; + ErrCode ret = GetBundleDataMgr()->GetTestRunner(BUNDLE_NAME_TEST, MODULE_NAME_TEST, testRunner); + EXPECT_EQ(ret, ERR_APPEXECFWK_PARSE_UNEXPECTED); + + MockUninstallBundle(BUNDLE_NAME_TEST); +} } // OHOS diff --git a/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_kit_service_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_kit_service_test.cpp index ec1be5c42227ed504913caba0337698ecbfaa3c4..d4e57dd35a0a6e102287af673e2894add51d743e 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_kit_service_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_kit_service_test/bms_bundle_kit_service_test.cpp @@ -1506,7 +1506,6 @@ void BmsBundleKitServiceTest::CheckShortcutInfoTest(std::vector &s void BmsBundleKitServiceTest::CheckCommonEventInfoTest(std::vector &commonEventInfos) const { for (const auto &commonEventInfo : commonEventInfos) { - EXPECT_EQ(commonEventInfo.name, COMMON_EVENT_NAME); EXPECT_EQ(commonEventInfo.bundleName, BUNDLE_NAME_TEST); EXPECT_EQ(commonEventInfo.permission, COMMON_EVENT_PERMISSION); @@ -14607,7 +14606,7 @@ HWTEST_F(BmsBundleKitServiceTest, GetAbilityInfoByName_2000, Function | SmallTes PluginBundleInfo pluginBundleInfo; AbilityInfo info; info.name = "abilityName1"; - pluginBundleInfo.abilityInfos.emplace("abilityName1", info); + pluginBundleInfo.abilityInfos.emplace("abilityName1", info); const std::string moduleName = ""; const std::string abilityName = "abilityName1"; bool result = pluginBundleInfo.GetAbilityInfoByName(abilityName, moduleName, info); @@ -14625,7 +14624,7 @@ HWTEST_F(BmsBundleKitServiceTest, GetAbilityInfoByName_3000, Function | SmallTes AbilityInfo info; info.name = "abilityName1"; info.moduleName = "moduleName1"; - pluginBundleInfo.abilityInfos.emplace("abilityName1", info); + pluginBundleInfo.abilityInfos.emplace("abilityName1", info); const std::string moduleName = "moduleName1"; const std::string abilityName = "abilityName1"; bool result = pluginBundleInfo.GetAbilityInfoByName(abilityName, moduleName, info); @@ -14676,7 +14675,7 @@ HWTEST_F(BmsBundleKitServiceTest, GetHapModuleInfo_3000, Function | SmallTest | AbilityInfo info; info.name = "abilityName"; info.moduleName = "moduleName"; - pluginBundleInfo.abilityInfos.emplace("abilityName.moduleName.", info); + pluginBundleInfo.abilityInfos.emplace("abilityName.moduleName.", info); HapModuleInfo hapInfo; bool result = pluginBundleInfo.GetHapModuleInfo("moduleName", hapInfo); EXPECT_TRUE(result); @@ -14921,4 +14920,19 @@ HWTEST_F(BmsBundleKitServiceTest, Mgr_Proxy_GetAllShortcutInfoForSelf_0100, Func auto ret = bundleMgrProxy->GetAllShortcutInfoForSelf(shortcutInfos); EXPECT_NE(ret, ERR_OK); } + +/** + * @tc.number: GetTestRunner_0100 + * @tc.name: Test GetTestRunner + * @tc.desc: 1.Test the GetTestRunner by BundleMgrHostImpl + */ +HWTEST_F(BmsBundleKitServiceTest, GetTestRunner_0100, Function | SmallTest | Level1) +{ + MockInstallBundle(BUNDLE_NAME_DEMO, MODULE_NAME_DEMO, ABILITY_NAME_DEMO); + auto hostImpl = std::make_unique(); + ModuleTestRunner testRunner; + ErrCode ret = hostImpl->GetTestRunner(BUNDLE_NAME_DEMO, MODULE_NAME_DEMO, testRunner); + EXPECT_EQ(ret, ERR_BUNDLE_MANAGER_PERMISSION_DENIED); + MockUninstallBundle(BUNDLE_NAME_DEMO); +} } diff --git a/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test_three.cpp b/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test_three.cpp index b6260479fdfa911a91705fd48f44cff8a32ca622..82409812d00b19e9cdb38c1d33ad475855828b96 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test_three.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_manager_test/bms_bundle_manager_test_three.cpp @@ -39,6 +39,7 @@ #include "inner_bundle_info.h" #include "mime_type_mgr.h" #include "mock_status_receiver.h" +#include "module_test_runner.h" #include "parameters.h" #include "preinstall_data_storage_rdb.h" #include "scope_guard.h" @@ -2026,4 +2027,22 @@ HWTEST_F(BmsBundleManagerTest3, SetAppDistributionTypes_0001, Function | MediumT retCode = hostImpl->SetAppDistributionTypes(appDistributionTypeEnums); EXPECT_EQ(retCode, ERR_OK); } + +/** +* @tc.number: GetTestRunner_0100 +* @tc.name: GetTestRunner_0100 +* @tc.desc: test GetTestRunner +*/ +HWTEST_F(BmsBundleManagerTest3, GetTestRunner_0100, Function | MediumTest | Level1) +{ + std::string bundlePath = RESOURCE_ROOT_PATH + BUNDLE_BACKUP_TEST; + ErrCode installResult = InstallThirdPartyBundle(bundlePath); + EXPECT_EQ(installResult, ERR_OK); + + ModuleTestRunner testRunner; + ErrCode ret = GetBundleDataMgr()->GetTestRunner(BUNDLE_BACKUP_NAME, MODULE_NAME, testRunner); + EXPECT_EQ(ret, ERR_OK); + + UnInstallBundle(BUNDLE_BACKUP_NAME); +} } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_bundle_parser_test/bms_bundle_parser_test.cpp b/services/bundlemgr/test/unittest/bms_bundle_parser_test/bms_bundle_parser_test.cpp index 6826439083ef582565513146c52ced9075b3c6c5..2d222d0ec7f370c3cf5016931c3f1766d32bbb80 100644 --- a/services/bundlemgr/test/unittest/bms_bundle_parser_test/bms_bundle_parser_test.cpp +++ b/services/bundlemgr/test/unittest/bms_bundle_parser_test/bms_bundle_parser_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -1560,23 +1560,46 @@ ErrCode BmsBundleParserTest::CheckProfileDefaultPermission(const nlohmann::json bool BmsBundleParserTest::WriteToConfigFile(const std::string &bundleName) const { - const std::string filename = ServiceConstants::APP_STARTUP_CACHE_CONG; +const std::string filename = ServiceConstants::APP_STARTUP_CACHE_CONG; nlohmann::json jsonObject; std::ifstream inFile(filename); - if (!inFile.is_open()) { - APP_LOGE("Copy file failed due to open conf file failed errno:%{public}d", errno); - APP_LOGE("create json file:%{public}s", filename.c_str()); - jsonObject = nlohmann::json::object(); + if (inFile.is_open()) { + try { + inFile >> jsonObject; + } catch (const nlohmann::json::parse_error& e) { + APP_LOGW("JSON parse failed for empty file or invalid format, err: %{public}s", e.what()); + jsonObject = nlohmann::json::object(); + } + inFile.close(); } else { - inFile >> jsonObject; + APP_LOGI("create new fike: %{public}s", filename.c_str()); + jsonObject = nlohmann::json::object(); } if (!jsonObject.contains("ark_startup_snapshot_list") || !jsonObject["ark_startup_snapshot_list"].is_array()) { jsonObject["ark_startup_snapshot_list"] = nlohmann::json::array(); } - jsonObject["ark_startup_snapshot_list"].push_back(bundleName); - std::ofstream outFile(filename); + + auto& snapshotList = jsonObject["ark_startup_snapshot_list"]; + if (std::find(snapshotList.begin(), snapshotList.end(), bundleName) == snapshotList.end()) { + snapshotList.push_back(bundleName); + } else { + APP_LOGI("bundlename already existed: %{public}s", bundleName.c_str()); + } + + const std::string tempFile = filename + ".tmp"; + std::ofstream outFile(tempFile); + if (!outFile) { + APP_LOGE("create file failed: %{public}s, err: %{public}d", tempFile.c_str(), errno); + return false; + } outFile << std::setw(Constants::DUMP_INDENT) << jsonObject; outFile.close(); + + if (std::rename(tempFile.c_str(), filename.c_str())) { + APP_LOGE("rename file failed: %{public}s, err: %{public}d", tempFile.c_str(), errno); + std::remove(tempFile.c_str()); + return false; + } return true; } @@ -4346,12 +4369,12 @@ HWTEST_F(BmsBundleParserTest, FormInfo_0600, Function | MediumTest | Level1) */ HWTEST_F(BmsBundleParserTest, ParseArkStartupCacheConfig_0100, Function | MediumTest | Level1) { - std::string configFile = ServiceConstants::APP_STARTUP_CACHE_CONG; + std::string configFile = "config.config"; std::unordered_set arkStartupCacheList; ErrCode ret = BundleParser::ParseArkStartupCacheConfig(configFile, arkStartupCacheList); EXPECT_EQ(ret, ERR_APPEXECFWK_PARSE_FILE_FAILED); WriteToConfigFile("com.123"); - ret = BundleParser::ParseArkStartupCacheConfig(configFile, arkStartupCacheList); + ret = BundleParser::ParseArkStartupCacheConfig(ServiceConstants::APP_STARTUP_CACHE_CONG, arkStartupCacheList); EXPECT_EQ(ret, ERR_OK); } } // OHOS \ No newline at end of file diff --git a/services/bundlemgr/test/unittest/bms_data_mgr_test/BUILD.gn b/services/bundlemgr/test/unittest/bms_data_mgr_test/BUILD.gn index 87fe14d418b7b1178e7fd9221d33f3cf494a51ed..35d6df9cb26e35bb2298ca353f8753681da038b9 100644 --- a/services/bundlemgr/test/unittest/bms_data_mgr_test/BUILD.gn +++ b/services/bundlemgr/test/unittest/bms_data_mgr_test/BUILD.gn @@ -222,6 +222,8 @@ ohos_unittest("BmsExtensionDataMgrTest") { "bundle_framework:appexecfwk_core", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", + "googletest:gmock_main", + "googletest:gtest_main", "hilog:libhilog", "hitrace:hitrace_meter", "init:libbegetutil", diff --git a/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp b/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp index a0b04841275eae3d09a35f9e1eca349962995ca2..119a900c603001bfe1df3572d904a172a30c73d6 100644 --- a/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp +++ b/services/bundlemgr/test/unittest/bms_data_mgr_test/bms_extension_data_mgr_test.cpp @@ -16,6 +16,7 @@ #define private public #include +#include #include #include "ability_manager_helper.h" @@ -381,7 +382,10 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0011, Function | SmallTest std::vector bundleStats; ErrCode res = bmsExtensionDataMgr.GetBundleStats("", USERID, bundleStats); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -397,7 +401,10 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0012, Function | SmallTest BmsExtensionDataMgr bmsExtensionDataMgr; ErrCode res = bmsExtensionDataMgr.ClearData("", USERID); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -413,7 +420,10 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0013, Function | SmallTest BmsExtensionDataMgr bmsExtensionDataMgr; ErrCode res = bmsExtensionDataMgr.ClearCache("", nullptr, USERID); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -444,7 +454,10 @@ HWTEST_F(BmsExtensionDataMgrTest, BmsExtensionDataMgr_0015, Function | SmallTest std::string bundleName = ""; ErrCode res = bmsExtensionDataMgr.GetBundleNameByUid(TEST_UID, bundleName); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1381,7 +1394,10 @@ HWTEST_F(BmsExtensionDataMgrTest, QueryAbilityInfos_001, Function | SmallTest | bmsExtensionDataMgrTest.handler_ = &handleTest; ErrCode res = bmsExtensionDataMgrTest.QueryAbilityInfos(want, userId, abilityInfos); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_APPEXECFWK_NULL_PTR); #endif @@ -1389,7 +1405,10 @@ HWTEST_F(BmsExtensionDataMgrTest, QueryAbilityInfos_001, Function | SmallTest | bmsExtensionDataMgrTest.handler_ = nullptr; res = bmsExtensionDataMgrTest.QueryAbilityInfos(want, userId, abilityInfos); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_INSTALL_FAILED_BUNDLE_EXTENSION_NOT_EXISTED); #endif @@ -1413,7 +1432,10 @@ HWTEST_F(BmsExtensionDataMgrTest, QueryAbilityInfosWithFlag_001, Function | Smal ErrCode res = bmsExtensionDataMgrTest.QueryAbilityInfosWithFlag(want, flags, userId, abilityInfos, isNewVersion); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_APPEXECFWK_NULL_PTR); #endif @@ -1422,7 +1444,10 @@ HWTEST_F(BmsExtensionDataMgrTest, QueryAbilityInfosWithFlag_001, Function | Smal res = bmsExtensionDataMgrTest.QueryAbilityInfosWithFlag(want, flags, userId, abilityInfos, isNewVersion); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_INSTALL_FAILED_BUNDLE_EXTENSION_NOT_EXISTED); #endif @@ -1444,7 +1469,10 @@ HWTEST_F(BmsExtensionDataMgrTest, GetBundleInfos_001, Function | SmallTest | Lev bmsExtensionDataMgrTest.handler_ = &handleTest; ErrCode res = bmsExtensionDataMgrTest.GetBundleInfos(flags, bundleInfos, userId, isNewVersion); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_APPEXECFWK_NULL_PTR); #endif @@ -1452,7 +1480,10 @@ HWTEST_F(BmsExtensionDataMgrTest, GetBundleInfos_001, Function | SmallTest | Lev bmsExtensionDataMgrTest.handler_ = nullptr; res = bmsExtensionDataMgrTest.GetBundleInfos(flags, bundleInfos, userId, isNewVersion); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_INSTALL_FAILED_BUNDLE_EXTENSION_NOT_EXISTED); #endif @@ -1470,7 +1501,10 @@ HWTEST_F(BmsExtensionDataMgrTest, Uninstall_001, Function | SmallTest | Level0) std::string bundleName = "testname"; ErrCode res = bmsExtensionDataMgrTest.Uninstall(bundleName); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_INSTALL_FAILED_BUNDLE_EXTENSION_NOT_EXISTED); #endif @@ -1490,7 +1524,10 @@ HWTEST_F(BmsExtensionDataMgrTest, GetBundleStats_001, Function | SmallTest | Lev std::vector bundleStats; ErrCode res = bmsExtensionDataMgrTest.GetBundleStats(bundleName, userId, bundleStats); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1499,7 +1536,10 @@ HWTEST_F(BmsExtensionDataMgrTest, GetBundleStats_001, Function | SmallTest | Lev bmsExtensionDataMgrTest.handler_ = &handleTest; res = bmsExtensionDataMgrTest.GetBundleStats(bundleName, userId, bundleStats); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1518,7 +1558,10 @@ HWTEST_F(BmsExtensionDataMgrTest, ClearData_001, Function | SmallTest | Level0) int32_t userId = 0; ErrCode res = bmsExtensionDataMgrTest.ClearData(bundleName, userId); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1527,7 +1570,10 @@ HWTEST_F(BmsExtensionDataMgrTest, ClearData_001, Function | SmallTest | Level0) bmsExtensionDataMgrTest.handler_ = &handleTest; res = bmsExtensionDataMgrTest.ClearData(bundleName, userId); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1547,7 +1593,10 @@ HWTEST_F(BmsExtensionDataMgrTest, ClearCache_001, Function | SmallTest | Level0) sptr callback; ErrCode res = bmsExtensionDataMgrTest.ClearCache(bundleName, callback, userId); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1556,7 +1605,10 @@ HWTEST_F(BmsExtensionDataMgrTest, ClearCache_001, Function | SmallTest | Level0) bmsExtensionDataMgrTest.handler_ = &handleTest; res = bmsExtensionDataMgrTest.ClearCache(bundleName, callback, userId); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1596,7 +1648,10 @@ HWTEST_F(BmsExtensionDataMgrTest, GetBundleNameByUid_001, Function | SmallTest | int32_t uid = 0; ErrCode res = bmsExtensionDataMgrTest.GetBundleNameByUid(uid, bundleName); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif @@ -1605,7 +1660,10 @@ HWTEST_F(BmsExtensionDataMgrTest, GetBundleNameByUid_001, Function | SmallTest | bmsExtensionDataMgrTest.handler_ = &handleTest; res = bmsExtensionDataMgrTest.GetBundleNameByUid(uid, bundleName); #ifdef USE_EXTENSION_DATA - EXPECT_EQ(res, ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY); + EXPECT_THAT(res, testing::AnyOf( + ERR_APPEXECFWK_FAILED_GET_REMOTE_PROXY, + BMS_BROKER_ERR_UNINSTALL_FAILED, + BMS_BROKER_ERR_INSTALL_FAILED)); #else EXPECT_EQ(res, ERR_BUNDLE_MANAGER_EXTENSION_INTERNAL_ERR); #endif diff --git a/services/bundlemgr/test/unittest/bms_event_handler_test/bms_event_handler_test.cpp b/services/bundlemgr/test/unittest/bms_event_handler_test/bms_event_handler_test.cpp index b1a2ae29cf96d0a1cf1f011f5d1492a13e851e26..363d3fda4f065642d6492485d5e55708ab969bd4 100644 --- a/services/bundlemgr/test/unittest/bms_event_handler_test/bms_event_handler_test.cpp +++ b/services/bundlemgr/test/unittest/bms_event_handler_test/bms_event_handler_test.cpp @@ -2600,7 +2600,7 @@ HWTEST_F(BmsEventHandlerTest, InnerProcessCheckAppLogDir_0100, Function | SmallT innerBundleUserInfo0.bundleName = BUNDLE_NAME_FOR_TEST_U1ENABLE; innerBundleInfo.AddInnerBundleUserInfo(innerBundleUserInfo0); dataMgr->bundleInfos_.emplace(BUNDLE_NAME_FOR_TEST_U1ENABLE, innerBundleInfo); - + handler->InnerProcessCheckAppLogDir(); std::string parentDir1 = ServiceConstants::BUNDLE_APP_DATA_BASE_DIR + ServiceConstants::BUNDLE_EL[1] + ServiceConstants::PATH_SEPARATOR + std::to_string(1) + ServiceConstants::LOG; @@ -2911,9 +2911,13 @@ HWTEST_F(BmsEventHandlerTest, CheckSystemOptimizeShaderCache_0200, Function | Sm ret = handler->CheckSystemOptimizeBundleShaderCache(bundleName, appIndex, userId, uid); EXPECT_EQ(ret, ERR_APPEXECFWK_INSTALLD_PARAM_ERROR); + setuid(Constants::FOUNDATION_UID); uid = 1003; ret = handler->CheckSystemOptimizeBundleShaderCache(bundleName, appIndex, userId, uid); EXPECT_EQ(ret, ERR_OK); + setuid(Constants::ROOT_UID); + ret = handler->CheckSystemOptimizeBundleShaderCache(bundleName, appIndex, userId, uid); + EXPECT_EQ(ret, ERR_APPEXECFWK_INSTALLD_PERMISSION_DENIED); } /** @@ -2928,11 +2932,13 @@ HWTEST_F(BmsEventHandlerTest, CheckSystemOptimizeShaderCache_0300, Function | Sm std::string bundleName = "com.CheckSystemOptimizeShaderCache_0300"; int32_t appIndex = 1; int32_t userId = 100; + setuid(Constants::FOUNDATION_UID); ErrCode ret = handler->CleanSystemOptimizeBundleShaderCache(bundleName, appIndex, userId); EXPECT_EQ(ret, ERR_OK); appIndex = 0; ret = handler->CleanSystemOptimizeBundleShaderCache(bundleName, appIndex, userId); EXPECT_EQ(ret, ERR_OK); + setuid(Constants::ROOT_UID); } } // OHOS diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/app.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..bbc9497da185bba656ad2b4939009f4019ed92c4 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "bundleName": "com.third.hiworld.big", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..d94fe6c1eee7aaadb112e26cb01a7c08c7ecf6b9 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "com.third.hiworld.big" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..b71c16122943f248ace0f5fa26da38b71dbdbdde --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/AppScope/resources/base/media/app_layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:app_background", + "foreground" : "$media:app_foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/BUILD.gn b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/BUILD.gn old mode 100755 new mode 100644 index 9036dc0d8a3714101d57f07cafec0e91e9efc692..a8da475a1f8cc72aba1aa1e7ecfdf74d07b60620 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/BUILD.gn +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,22 +14,10 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("stbmsThirdBundle43") { - hap_profile = "./src/main/config.json" +ohos_app("stbmsThirdBundle43") { hap_name = "bmsThirdBundle43" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle/${hap_name}.hap" + hap_out_dir = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle" testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.third.hiworld.big.p7b" } -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..a1e33acefa5a2ecf2e93944e3a101798abfb5284 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "targetSdkVersion": 20, + "compatibleSdkVersion": 20, + "compileSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "com.third.hiworld.example.h1", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.js b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/build-profile.json5 old mode 100755 new mode 100644 similarity index 53% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.js rename to test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/build-profile.json5 index eb5be916aa414adb35cf8541635725d702a893dc..b4d65d490ef6cbe22d933b9231555210f1555786 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.js +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/build-profile.json5 @@ -1,25 +1,43 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const injectRef = Object.getPrototypeOf(global) || global -injectRef.regeneratorRuntime = require('@babel/runtime/regenerator') - -export default { - data: { - title: "" - }, - onInit() { - this.title = this.$t('strings.world'); - } -} +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfa8a00f74f409d9647f55cdf270ab6aec69fe41 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/obfuscation-rules.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..c1d419bdc6fa72c5914cc864ede925c53a2b01c5 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/obfuscation-rules.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/oh-package.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/ets/entryability/EntryAbility.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..b12b706076bc833e0f1c073e99881ef3b3a84004 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,44 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/ets/pages/Index.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e2d24ad42693fc877d51bb7820f0a9da68fa135 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,23 @@ +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize($r('app.float.page_text_font_size')) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + .onClick(() => { + this.message = 'Welcome'; + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/module.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..5be97bf0aaf581435f804c87cfee38c0e094cf37 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/module.json5 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "2in1", + "tablet", + "default", + "tv", + ], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "bmsThirdBundle_A1", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true + } + ] + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/float.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/startIcon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/profile/backup_config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/profile/main_pages.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/dark/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/hvigor/hvigor-config.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3340f07e45ddc5dcadbb87012668555def2e6e0 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/oh-package.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..15ec86a73e760904339e9269d493e3015429d8a2 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/config.json deleted file mode 100755 index 730762bda365a421d4e4f6db1c1b6112e6fd8df7..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "app":{ - "bundleName": "com.third.hiworld.big", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 3, - "target": 3, - "releaseType": "Release" - } - }, - "deviceConfig": { - "default": { - } - }, - "module": { - "package":"com.third.hiworld.example.h1", - "name":"bmsThirdBundle7", - "deviceType": [ - "2in1", - "tablet", - "default", - "tv", - "car" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "testability", - "moduleType": "entry" - }, - "abilities": [{ - "name": "bmsThirdBundle_A1", - "icon": "$media:snowball", - "label": "bmsThirdBundle_A1 Ability", - "launchType": "singleton", - "orientation": "unspecified", - "type": "page", - "visible": true - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/i18n/en-US.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/i18n/en-US.json deleted file mode 100755 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/i18n/zh-CN.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/i18n/zh-CN.json deleted file mode 100755 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.hml b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.hml deleted file mode 100755 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/element/string.json deleted file mode 100755 index 4a5d2b0f227cd287e7fa240071e0509f2775bb16..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "permreason_example", - "value": "bmsfirstright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/media/icon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/media/icon.png deleted file mode 100755 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/media/snowball.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/media/snowball.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/resources/base/media/snowball.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/app.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ef1306dc8a98165e4073d05c619b84b351233665 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "bundleName": "com.third.hiworld.example1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..9f5cd292b2e27f6e9f8b82bdb4daefe826226e4e --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "com.third.hiworld.example1" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..b71c16122943f248ace0f5fa26da38b71dbdbdde --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources/base/media/app_layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:app_background", + "foreground" : "$media:app_foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/BUILD.gn b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/BUILD.gn old mode 100755 new mode 100644 index d65c70dd52e39e6a64cccce7b0d2b466bec64881..13e6d407fef1d930a6c717dafbc5b7815bbe2635 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/BUILD.gn +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,22 +14,10 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("stbmsThirdBundle44") { - hap_profile = "./src/main/config.json" +ohos_app("stbmsThirdBundle44") { hap_name = "bmsThirdBundle44" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle/${hap_name}.hap" + hap_out_dir = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle" testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.third.hiworld.example1.p7b" } -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..a1e33acefa5a2ecf2e93944e3a101798abfb5284 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "targetSdkVersion": 20, + "compatibleSdkVersion": 20, + "compileSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "com.third.hiworld.example.h1", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b4d65d490ef6cbe22d933b9231555210f1555786 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.ts_checker_cache b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.ts_checker_cache new file mode 100644 index 0000000000000000000000000000000000000000..2d9f1f5d3f92e3145ec212a685392e0b6cb52299 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.ts_checker_cache @@ -0,0 +1,5580 @@ +{ + "runtimeOS": "OpenHarmony", + "sdkInfo": "true:20:6.0.0.41:Beta1", + "fileList": { + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts": { + "mtimeMs": 1752757680927.4539, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.errorCode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityAccessCtrl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityStage.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ActionExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appRecovery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoStartupManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcess.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childProcessManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessArgs.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dataUriUtils.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EnvironmentCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errorManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntentDriver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentDecorator.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentEntryExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.OpenLinkOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.quickFixManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ShareExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessAbilityRouter.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.uriPermissionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appControl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleMonitor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleResourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultAppManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeInstall.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.installer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.overlay.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.continueManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedBundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.package.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.privacyManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfig.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfigEntry.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupListener.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupTask.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.sendableContextManager.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.screenLockFileManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddableUIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.shortcutManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.application.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appDomainVerify.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.CompletionHandler.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.kioskManager.d.ts" + ], + "parent": [ + "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts": { + "mtimeMs": 1752757680927.4539, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.faultLogger.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.hiAppEvent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hichecker.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hidebug.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hilog.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiSysEvent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiTraceChain.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiTraceMeter.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.logLibrary.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.jsLeakWatcher.d.ts" + ], + "parent": [ + "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts": { + "mtimeMs": 1752757680927.4539, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animation.windowAnimationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animator.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.WindowExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceNavigation.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceSearch.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ArcButton.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Chip.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.NavPushPathHelper.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ChipGroup.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ComposeListItem.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ComposeTitleBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Counter.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Dialog.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.DialogV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.EditableTitleBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ExceptionPrompt.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Filter.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FormMenu.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Popup.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ProgressButton.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SegmentButton.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SelectionMenu.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SelectTitleBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SplitLayout.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeader.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SwipeRefresher.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.TabTitleBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBarV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.TreeView.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.InterstitialDialogAction.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentUtils.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.inspector.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.performanceMonitor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.StateManagement.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.curves.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceWeb.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.deviceStatus.dragInteraction.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.font.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.matrix4.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.measure.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.mediaquery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.PiPWindow.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingBall.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.pluginComponent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.prompt.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.router.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screen.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screenshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiAppearance.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiExtensionHost.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.app.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.mediaquery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.prompt.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.router.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcList.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcAlphabetIndexer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcScrollBar.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiExtension.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceTabs.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.Prefetcher.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.DownloadFileButton.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.MultiNavigation.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ArcSlider.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcSwiper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeaderV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SegmentButtonV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts" + ], + "parent": [ + "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets" + ], + "error": false + }, + "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets": { + "mtimeMs": 1753101604665.172, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "parent": [], + "error": true, + "errorCodes": [ + 28040 + ] + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts": { + "mtimeMs": 1752757681547.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityOperation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/startAbilityParameter.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.errorCode.d.ts": { + "mtimeMs": 1752757681491.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/startAbilityParameter.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/appVersionInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/processInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityOperation.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts": { + "mtimeMs": 1752757681487.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/startAbilityParameter.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityAccessCtrl.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/permissions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/security/PermissionRequestResult.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Ability.d.ts": { + "mtimeMs": 1752757681531.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EnvironmentCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityStage.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts": { + "mtimeMs": 1752757681547.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityRunningInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionRunningInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityForegroundStateObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStateData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityRunningInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityStage.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ActionExtensionAbility.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationStateObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppForegroundStateObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStateData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppStateData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessInformation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityFirstFrameStateObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityFirstFrameStateData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiAppInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessInformation.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appRecovery.d.ts": { + "mtimeMs": 1752757681519.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts": { + "mtimeMs": 1752757681491.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts": { + "mtimeMs": 1752757681331.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ViewData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PageNodeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillType.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/CustomData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillPopupConfig.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillPopupConfig.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoStartupManager.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcess.d.ts": { + "mtimeMs": 1752757681495.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessArgs.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childProcessManager.d.ts": { + "mtimeMs": 1752757681483.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessArgs.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessArgs.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcess.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childProcessManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ChildProcessOptions.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childProcessManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/FormExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EventHub.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStartCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/VpnExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EmbeddableUIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PhotoEditorExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceProxy.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceHostProxy.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionConnectCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.sendableContextManager.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EnvironmentCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityStage.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ServiceExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextConstant.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.StateManagement.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dataUriUtils.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogRequest.d.ts": { + "mtimeMs": 1752757681523.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogSession.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EnvironmentCallback.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errorManager.d.ts": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ErrorObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/LoopObserver.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Ability.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantConstant.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntentDriver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentDecorator.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentEntryExecutor.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentContext.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentEntryExecutor.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntentDriver.d.ts": { + "mtimeMs": 1752757681495.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentExecutor.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentDecorator.d.ts": { + "mtimeMs": 1752757681531.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentEntryExecutor.d.ts": { + "mtimeMs": 1752757681555.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionListener.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.OpenLinkOptions.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.quickFixManager.d.ts": { + "mtimeMs": 1752757681323.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ServiceExtensionAbility.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ShareExtensionAbility.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.CompletionHandler.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/triggerInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/WindowExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddableUIAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ActionExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ShareExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStartCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiExtension.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiExtensionHost.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentEntryExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/startAbilityParameter.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/FormExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/wantAgentInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/triggerInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityStage.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appRecovery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntentDriver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appControl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfigEntry.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.WindowExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FormMenu.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingBall.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.pluginComponent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ability_component.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/embedded_component.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/form_component.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/isolated_component.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantConstant.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntentDriver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.uriPermissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/wantAgentInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/triggerInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/wantAgentInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessAbilityRouter.d.ts": { + "mtimeMs": 1752757681495.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BusinessAbilityInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BusinessAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.uriPermissionManager.d.ts": { + "mtimeMs": 1752757681523.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantConstant.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appControl.d.ts": { + "mtimeMs": 1752757681331.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts": { + "mtimeMs": 1752757681547.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Metadata.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/PermissionDef.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/PluginBundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/SharedBundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/RecoverableApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AppProvisionInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Skill.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/SharedBundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/RecoverableApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessInformation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionRunningInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleMonitor.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleResourceManager.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleResourceInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityResourceInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/PermissionDef.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInstaller.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInstaller.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultAppManager.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedBundleManager.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/RemoteAbilityInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeInstall.d.ts": { + "mtimeMs": 1752757681531.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/DispatchInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundlePackInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerBundleManager.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleStatusCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/launcherAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/shortcutInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.installer.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ShortcutInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.overlay.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/OverlayModuleInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationManager.d.ts": { + "mtimeMs": 1752757681323.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationExtraParams.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationExtraParams.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.continueManager.d.ts": { + "mtimeMs": 1752757681495.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedBundle.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/remoteAbilityInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts": { + "mtimeMs": 1752757681487.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinuableInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinueCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinueDeviceInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinueMissionInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionCallbacks.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionDeviceInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionParameter.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.package.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.privacyManager.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/permissions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfig.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupListener.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfigEntry.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfigEntry.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfig.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupListener.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfig.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupTask.d.ets": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupManager.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupConfig.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.sendableContextManager.d.ets": { + "mtimeMs": 1752757681543.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/SendableContext.d.ets" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.screenLockFileManager.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddableUIAbility.d.ts": { + "mtimeMs": 1752757681483.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EmbeddableUIAbilityContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts": { + "mtimeMs": 1752757681547.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PhotoEditorExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceHostProxy.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.shortcutManager.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ShortcutInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.application.d.ts": { + "mtimeMs": 1752757681487.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appDomainVerify.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.CompletionHandler.d.ts": { + "mtimeMs": 1752757681531.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ExtensionAbility.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.kioskManager.d.ts": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/KioskStatus.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.AbilityKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts": { + "mtimeMs": 1752757614067.2646, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/data/rdb/resultSet.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityOperation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityOperation.d.ts": { + "mtimeMs": 1752757614071.2646, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityResult.d.ts": { + "mtimeMs": 1752757614071.2646, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts": { + "mtimeMs": 1752757614055.2646, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStartCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PhotoEditorExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts": { + "mtimeMs": 1752757614059.2646, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/FormExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/startAbilityParameter.d.ts": { + "mtimeMs": 1752757614071.2646, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/data/rdb/resultSet.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInstaller.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.mediaquery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.inspector.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EventHub.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/component/navigation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.router.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/FormExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.pointer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationSubscribe.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityAccessCtrl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiExtension.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiExtensionHost.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoStartupManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childProcessManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errorManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightIntentDriver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.quickFixManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessAbilityRouter.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.uriPermissionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appControl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleMonitor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleResourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultAppManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeInstall.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.installer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.overlay.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.continueManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedBundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.privacyManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupListener.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.faultLogger.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.hiAppEvent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiSysEvent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.logLibrary.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animation.windowAnimationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/WindowExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceNavigation.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FormMenu.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceWeb.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.deviceStatus.dragInteraction.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.hdrCapability.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.PiPWindow.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingBall.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.pluginComponent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.prompt.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screen.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screenshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiAppearance.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.MultiNavigation.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneResources.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/embedded_component.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_destination.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/pattern_lock.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/video.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cert.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cryptoFramework.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.print.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/isolated_component.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/data/rdb/resultSet.d.ts": { + "mtimeMs": 1752757616847.2715, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataAbility.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityOperation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/data/rdb/resultSet.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityHelper.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/dataAbilityOperation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/appVersionInfo.d.ts": { + "mtimeMs": 1752757614075.2646, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts": { + "mtimeMs": 1752757614079.2646, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/processInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/hapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/appVersionInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/processInfo.d.ts": { + "mtimeMs": 1752757614083.2646, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/component/navigation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiExtension.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiExtensionHost.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.InsightIntentEntryExecutor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.WindowExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/folder_stack.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_destination.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigation.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts": { + "mtimeMs": 1752757616371.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/moduleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/customizeData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/launcherAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementName.d.ts": { + "mtimeMs": 1752757616375.2703, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/launcherAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedBundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/remoteAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts": { + "mtimeMs": 1752757614575.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.PiPWindow.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingBall.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/hapModuleInfo.d.ts": { + "mtimeMs": 1752757616379.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts": { + "mtimeMs": 1752757616367.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/customizeData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/hapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/moduleInfo.d.ts": { + "mtimeMs": 1752757616379.2703, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/customizeData.d.ts": { + "mtimeMs": 1752757616375.2703, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/PermissionDef.d.ts": { + "mtimeMs": 1752757616367.2703, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts": { + "mtimeMs": 1752757681491.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.colorSpaceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PhotoEditorExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.pointer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionListener.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingBall.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screen.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screenshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInfo.d.ts": { + "mtimeMs": 1752757616371.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/hapModuleInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleInstaller.d.ts": { + "mtimeMs": 1752757616375.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.colorSpaceManager.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts": { + "mtimeMs": 1752757681491.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/rawFileDescriptor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.WindowExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/rawFileDescriptor.d.ts": { + "mtimeMs": 1752757616851.2715, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts": { + "mtimeMs": 1752757616851.2715, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/units.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleResourceInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityResourceInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts": { + "mtimeMs": 1752757616411.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.CompletionHandler.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityRunningInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionRunningInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appControl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultAppManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/RemoteAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.font.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.mediaquery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.inspector.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.router.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentUtils.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animator.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animator.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.measure.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentSnapshot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.pointer.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/XComponentNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.InterstitialDialogAction.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RenderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/XComponentNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Content.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeContent.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ArcButton.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBarV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.InterstitialDialogAction.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SegmentButtonV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/content_slot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/node_container.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.font.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.mediaquery.d.ts": { + "mtimeMs": 1752757681323.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.inspector.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/component/navigation.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/action_sheet.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/alert_dialog.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/custom_dialog_controller.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.router.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentUtils.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animator.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.measure.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentSnapshot.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.pointer.d.ts": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts": { + "mtimeMs": 1752757615983.2693, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.OpenLinkOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceProxy.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionConnectCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStartCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EmbeddableUIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appRecovery.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.kioskManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/component/navigation.d.ts": { + "mtimeMs": 1752757680979.454, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts": { + "mtimeMs": 1752757616419.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Metadata.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/SharedBundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceProxy.d.ts": { + "mtimeMs": 1752757616071.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionConnectCallback.d.ts": { + "mtimeMs": 1752757616067.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStartCallback.d.ts": { + "mtimeMs": 1752757614191.265, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts": { + "mtimeMs": 1752757616391.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Metadata.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Skill.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts": { + "mtimeMs": 1752757614587.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EventHub.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextConstant.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityAccessCtrl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.application.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.print.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts": { + "mtimeMs": 1752757616415.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Metadata.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Skill.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Metadata.d.ts": { + "mtimeMs": 1752757616423.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts": { + "mtimeMs": 1752757616399.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Metadata.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BusinessAbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/Skill.d.ts": { + "mtimeMs": 1752757616439.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AbilityInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/PermissionDef.d.ts": { + "mtimeMs": 1752757616423.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/PluginBundleInfo.d.ts": { + "mtimeMs": 1752757616423.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/SharedBundleInfo.d.ts": { + "mtimeMs": 1752757616431.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/RecoverableApplicationInfo.d.ts": { + "mtimeMs": 1752757616427.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/AppProvisionInfo.d.ts": { + "mtimeMs": 1752757616391.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleInfo.d.ts": { + "mtimeMs": 1752757616403.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultAppManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationStateObserver.d.ts": { + "mtimeMs": 1752757614563.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppStateData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStateData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppForegroundStateObserver.d.ts": { + "mtimeMs": 1752757614547.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppStateData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStateData.d.ts": { + "mtimeMs": 1752757614195.265, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationStateObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityForegroundStateObserver.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppStateData.d.ts": { + "mtimeMs": 1752757614551.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationStateObserver.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppForegroundStateObserver.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessData.d.ts": { + "mtimeMs": 1752757614611.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationStateObserver.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessInformation.d.ts": { + "mtimeMs": 1752757614615.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityFirstFrameStateObserver.d.ts": { + "mtimeMs": 1752757614179.265, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityFirstFrameStateData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityFirstFrameStateData.d.ts": { + "mtimeMs": 1752757614179.265, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityFirstFrameStateObserver.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiAppInfo.d.ts": { + "mtimeMs": 1752757614615.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MultiAppMode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningAppClone.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiInstanceInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MultiAppMode.d.ts": { + "mtimeMs": 1752757614611.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiAppInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningAppClone.d.ts": { + "mtimeMs": 1752757614615.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiAppInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiInstanceInfo.d.ts": { + "mtimeMs": 1752757614615.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/RunningMultiAppInfo.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EventHub.d.ts": { + "mtimeMs": 1752757614595.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ApplicationContext.d.ts": { + "mtimeMs": 1752757614559.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EnvironmentCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ProcessInformation.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.application.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts": { + "mtimeMs": 1752757616083.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/XComponentNode.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeController.d.ts": { + "mtimeMs": 1752757616199.27, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.PiPWindow.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts": { + "mtimeMs": 1752757616159.2698, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RenderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/XComponentNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.PiPWindow.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/canvas.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts": { + "mtimeMs": 1752757616175.2698, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2D.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RenderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/particle.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/units.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RenderNode.d.ts": { + "mtimeMs": 1752757616219.27, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/XComponentNode.d.ts": { + "mtimeMs": 1752757616235.27, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Content.d.ts": { + "mtimeMs": 1752757616091.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeContent.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts": { + "mtimeMs": 1752757616091.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BuilderNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Content.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeContent.d.ts": { + "mtimeMs": 1752757616195.27, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Content.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2D.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.colorSpaceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/canvas.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2D.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts": { + "mtimeMs": 1752757616067.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.OpenLinkOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ConfigurationConstant.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceProxy.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionConnectCallback.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillExtensionContext.d.ts": { + "mtimeMs": 1752757614563.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/CustomData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStageContext.d.ts": { + "mtimeMs": 1752757614187.265, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AbilityStage.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.StartupTask.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts": { + "mtimeMs": 1752757614595.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/HapModuleInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Configuration.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ExtensionAbilityInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/FormExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/VpnExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PhotoEditorExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/WindowExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/FormExtensionContext.d.ts": { + "mtimeMs": 1752757614599.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ServiceExtensionContext.d.ts": { + "mtimeMs": 1752757615055.267, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.OpenLinkOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ServiceExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/VpnExtensionContext.d.ts": { + "mtimeMs": 1752757616071.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupCallback.d.ts": { + "mtimeMs": 1752757614571.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoStartupManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupInfo.d.ts": { + "mtimeMs": 1752757614575.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoStartupCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoStartupManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/EmbeddableUIAbilityContext.d.ts": { + "mtimeMs": 1752757614591.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.EmbeddableUIAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PhotoEditorExtensionContext.d.ts": { + "mtimeMs": 1752757614611.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityResult.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceExtensionContext.d.ts": { + "mtimeMs": 1752757616071.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStartCallback.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIServiceHostProxy.d.ts": { + "mtimeMs": 1752757616071.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIServiceExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AppServiceExtensionContext.d.ts": { + "mtimeMs": 1752757614551.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/ability/connectOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AppServiceExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/CustomData.d.ts": { + "mtimeMs": 1752757614591.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts": { + "mtimeMs": 1752757616931.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationSubscribe.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationActionButton.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationTemplate.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationFlags.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/NotificationCommonDef.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationActionButton.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationFlags.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationFlags.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSlot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSorting.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscribeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationTemplate.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationUserInput.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSlot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts": { + "mtimeMs": 1752757681519.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/NotificationCommonDef.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationActionButton.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationFlags.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationFlags.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSlot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSorting.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationTemplate.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationUserInput.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/UIAbilityContext.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSlot.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscribeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationSubscribe.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/NotificationCommonDef.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscribeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/wantAgentInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/triggerInfo.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationActionButton.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/wantAgentInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationContent.d.ts": { + "mtimeMs": 1752757616915.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationActionButton.d.ts": { + "mtimeMs": 1752757616903.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationUserInput.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationTemplate.d.ts": { + "mtimeMs": 1752757616947.2717, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationFlags.d.ts": { + "mtimeMs": 1752757616915.2717, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/NotificationCommonDef.d.ts": { + "mtimeMs": 1752757616899.2717, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationSubscribe.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSlot.d.ts": { + "mtimeMs": 1752757616935.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSorting.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSorting.d.ts": { + "mtimeMs": 1752757616935.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSlot.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSortingMap.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscribeInfo.d.ts": { + "mtimeMs": 1752757616939.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationSubscribe.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts": { + "mtimeMs": 1752757616947.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSortingMap.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationSubscribe.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationUserInput.d.ts": { + "mtimeMs": 1752757616951.2717, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationActionButton.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/wantAgentInfo.d.ts": { + "mtimeMs": 1752757617063.272, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/wantAgent/triggerInfo.d.ts": { + "mtimeMs": 1752757617059.272, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantAgent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantAgent.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSortingMap.d.ts": { + "mtimeMs": 1752757616935.2717, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSorting.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationSubscriber.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/permissions.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityAccessCtrl.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.privacyManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/security/PermissionRequestResult.d.ts": { + "mtimeMs": 1752757616951.2717, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityAccessCtrl.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityRunningInfo.d.ts": { + "mtimeMs": 1752757614183.265, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionRunningInfo.d.ts": { + "mtimeMs": 1752757614599.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityForegroundStateObserver.d.ts": { + "mtimeMs": 1752757614179.265, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AbilityStateData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiExtension.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiExtensionHost.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.UIExtensionContentSession.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts": { + "mtimeMs": 1752757614567.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillType.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/CustomData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillPopupConfig.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ViewData.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AutoFillExtensionAbility.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillType.d.ts": { + "mtimeMs": 1752757614571.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PageNodeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillPopupConfig.d.ts": { + "mtimeMs": 1752757614563.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ViewData.d.ts": { + "mtimeMs": 1752757616071.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PageNodeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRect.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRequest.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PageNodeInfo.d.ts": { + "mtimeMs": 1752757614611.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillType.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRect.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ViewData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/AutoFillRect.d.ts": { + "mtimeMs": 1752757614563.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ViewData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/PageNodeInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autoFillManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ErrorObserver.d.ts": { + "mtimeMs": 1752757614595.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errorManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/LoopObserver.d.ts": { + "mtimeMs": 1752757614603.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errorManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionInfo.d.ts": { + "mtimeMs": 1752757614607.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionListener.d.ts": { + "mtimeMs": 1752757614607.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionSnapshot.d.ts": { + "mtimeMs": 1752757614607.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BusinessAbilityInfo.d.ts": { + "mtimeMs": 1752757614575.2659, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessAbilityRouter.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessAbilityRouter.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundleResourceInfo.d.ts": { + "mtimeMs": 1752757616411.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleResourceManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityResourceInfo.d.ts": { + "mtimeMs": 1752757616419.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleResourceManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/RemoteAbilityInfo.d.ts": { + "mtimeMs": 1752757616427.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedBundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/DispatchInfo.d.ts": { + "mtimeMs": 1752757616411.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeInstall.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/BundlePackInfo.d.ts": { + "mtimeMs": 1752757616407.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeInstall.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleStatusCallback.d.ts": { + "mtimeMs": 1752757616375.2703, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerBundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/launcherAbilityInfo.d.ts": { + "mtimeMs": 1752757616379.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementName.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerBundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/shortcutInfo.d.ts": { + "mtimeMs": 1752757616383.2703, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerBundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/LauncherAbilityInfo.d.ts": { + "mtimeMs": 1752757616419.2705, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ApplicationInfo.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ElementName.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/ShortcutInfo.d.ts": { + "mtimeMs": 1752757616435.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherBundleManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.shortcutManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundleManager/OverlayModuleInfo.d.ts": { + "mtimeMs": 1752757616423.2705, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.overlay.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationResult.d.ts": { + "mtimeMs": 1752757616843.2715, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationExtraParams.d.ts": { + "mtimeMs": 1752757616843.2715, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationManager.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/remoteAbilityInfo.d.ts": { + "mtimeMs": 1752757616379.2703, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementName.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedBundle.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinuableInfo.d.ts": { + "mtimeMs": 1752757614587.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinueCallback.d.ts": { + "mtimeMs": 1752757614587.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinueDeviceInfo.d.ts": { + "mtimeMs": 1752757614587.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ContinueMissionInfo.d.ts": { + "mtimeMs": 1752757614591.2659, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionCallbacks.d.ts": { + "mtimeMs": 1752757614603.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionDeviceInfo.d.ts": { + "mtimeMs": 1752757614603.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/MissionParameter.d.ts": { + "mtimeMs": 1752757614607.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedMissionManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/SendableContext.d.ets": { + "mtimeMs": 1752757614615.266, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/arkts/@arkts.lang.d.ets" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.sendableContextManager.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/arkts/@arkts.lang.d.ets": { + "mtimeMs": 1752757680875.4539, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/SendableContext.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/KioskStatus.d.ts": { + "mtimeMs": 1752757614603.266, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.kioskManager.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.faultLogger.d.ts": { + "mtimeMs": 1752757681331.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.hiAppEvent.d.ts": { + "mtimeMs": 1752757681491.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hichecker.d.ts": { + "mtimeMs": 1752757681331.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hidebug.d.ts": { + "mtimeMs": 1752757681547.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hilog.d.ts": { + "mtimeMs": 1752757681495.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiSysEvent.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiTraceChain.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiTraceMeter.d.ts": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.logLibrary.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.jsLeakWatcher.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.PerformanceAnalysisKit.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animation.windowAnimationManager.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.WindowExtensionAbility.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/WindowExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceNavigation.d.ets": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceSearch.d.ets": { + "mtimeMs": 1752757681347.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeader.d.ets" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ArcButton.d.ets": { + "mtimeMs": 1752757681343.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Chip.d.ets": { + "mtimeMs": 1752757681523.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ChipGroup.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.NavPushPathHelper.d.ets": { + "mtimeMs": 1752757681331.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ChipGroup.d.ets": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Chip.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ComposeListItem.d.ets": { + "mtimeMs": 1752757681515.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ComposeTitleBar.d.ets": { + "mtimeMs": 1752757681539.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Counter.d.ets": { + "mtimeMs": 1752757681555.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Dialog.d.ets": { + "mtimeMs": 1752757681491.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.DialogV2.d.ets": { + "mtimeMs": 1752757681331.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.EditableTitleBar.d.ets": { + "mtimeMs": 1752757681335.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ExceptionPrompt.d.ets": { + "mtimeMs": 1752757681499.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Filter.d.ets": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FormMenu.d.ets": { + "mtimeMs": 1752757681331.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.form.formBindingData.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets": { + "mtimeMs": 1752757681487.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Popup.d.ets": { + "mtimeMs": 1752757681503.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ProgressButton.d.ets": { + "mtimeMs": 1752757681535.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SegmentButton.d.ets": { + "mtimeMs": 1752757681483.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SelectionMenu.d.ets": { + "mtimeMs": 1752757681511.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SelectTitleBar.d.ets": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SplitLayout.d.ets": { + "mtimeMs": 1752757681483.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeader.d.ets": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceSearch.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SwipeRefresher.d.ets": { + "mtimeMs": 1752757681327.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.TabTitleBar.d.ets": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBar.d.ets": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBarV2.d.ets": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.TreeView.d.ets": { + "mtimeMs": 1752757681347.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.InterstitialDialogAction.d.ets": { + "mtimeMs": 1752757681531.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.performanceMonitor.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.StateManagement.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextConstant.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.curves.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceWeb.d.ets": { + "mtimeMs": 1752757681519.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.deviceStatus.dragInteraction.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.colorSpaceManager.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.hdrCapability.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.matrix4.d.ts": { + "mtimeMs": 1752757681531.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.PiPWindow.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NodeController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingBall.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/BaseContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.pluginComponent.d.ts": { + "mtimeMs": 1752757681511.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.prompt.d.ts": { + "mtimeMs": 1752757681483.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screen.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screenshot.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiAppearance.d.ts": { + "mtimeMs": 1752757681535.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.app.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.configuration.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.mediaquery.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.prompt.d.ts": { + "mtimeMs": 1752757681499.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@system.router.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcList.d.ts": { + "mtimeMs": 1752757681479.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcAlphabetIndexer.d.ts": { + "mtimeMs": 1752757681487.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcScrollBar.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts": { + "mtimeMs": 1752757681495.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Dialog.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/with_theme.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets": { + "mtimeMs": 1752757681479.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets": { + "mtimeMs": 1752757681339.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.AtomicServiceTabs.d.ets": { + "mtimeMs": 1752757681495.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CommonModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/AlphabetIndexerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BlankModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ButtonModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CalendarPickerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CheckboxModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CheckboxGroupModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ColumnModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ColumnSplitModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CounterModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/DataPanelModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/DatePickerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/DividerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FormComponentModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GaugeModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridColModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridItemModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridRowModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/HyperlinkModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageAnimatorModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SymbolGlyphModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageSpanModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/LineModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ListModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ListItemModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ListItemGroupModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/LoadingProgressModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/MarqueeModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/MenuModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/MenuItemModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavDestinationModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavigationModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavigatorModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavRouterModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PanelModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PathModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PatternLockModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PolygonModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PolylineModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ProgressModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/QRCodeModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RadioModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RatingModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RectModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RefreshModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RichEditorModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RowModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RowSplitModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ScrollModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SearchModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SelectModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ShapeModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SideBarContainerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SliderModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SpanModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/StackModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/StepperItemModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SwiperModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TabsModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextAreaModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextClockModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextInputModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextPickerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextTimerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TimePickerModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ToggleModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/VideoModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/WaterFlowModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/AttributeUpdater.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ContainerSpanModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SymbolSpanModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ParticleModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/StepperModifier.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeader.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.Chip.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ChipGroup.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBar.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ToolBarV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeaderV2.d.ets", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SegmentButtonV2.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.Prefetcher.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.DownloadFileButton.d.ets": { + "mtimeMs": 1752757681331.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets": { + "mtimeMs": 1752757681483.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.MultiNavigation.d.ets": { + "mtimeMs": 1752757681543.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.ArcSlider.d.ets": { + "mtimeMs": 1752757681499.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.ArcSwiper.d.ts": { + "mtimeMs": 1752757681547.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SubHeaderV2.d.ets": { + "mtimeMs": 1752757681531.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.SegmentButtonV2.d.ets": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets": { + "mtimeMs": 1752757681327.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.AtomicServiceOptions.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.ArkUI.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/WindowExtensionContext.d.ts": { + "mtimeMs": 1752757616075.2695, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/ExtensionContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.WindowExtensionAbility.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.Want.d.ts": { + "mtimeMs": 1752757681351.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/WindowExtensionContext.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CommonModifier.d.ts": { + "mtimeMs": 1752757616087.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/tabs.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/AlphabetIndexerModifier.d.ts": { + "mtimeMs": 1752757616075.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/BlankModifier.d.ts": { + "mtimeMs": 1752757616079.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ButtonModifier.d.ts": { + "mtimeMs": 1752757616083.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CalendarPickerModifier.d.ts": { + "mtimeMs": 1752757616083.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CheckboxModifier.d.ts": { + "mtimeMs": 1752757616087.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CheckboxGroupModifier.d.ts": { + "mtimeMs": 1752757616083.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ColumnModifier.d.ts": { + "mtimeMs": 1752757616087.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ColumnSplitModifier.d.ts": { + "mtimeMs": 1752757616087.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CounterModifier.d.ts": { + "mtimeMs": 1752757616091.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/DataPanelModifier.d.ts": { + "mtimeMs": 1752757616091.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/DatePickerModifier.d.ts": { + "mtimeMs": 1752757616091.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/DividerModifier.d.ts": { + "mtimeMs": 1752757616095.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FormComponentModifier.d.ts": { + "mtimeMs": 1752757616095.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GaugeModifier.d.ts": { + "mtimeMs": 1752757616163.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridModifier.d.ts": { + "mtimeMs": 1752757616179.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridColModifier.d.ts": { + "mtimeMs": 1752757616175.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridItemModifier.d.ts": { + "mtimeMs": 1752757616179.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/GridRowModifier.d.ts": { + "mtimeMs": 1752757616179.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/HyperlinkModifier.d.ts": { + "mtimeMs": 1752757616183.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageAnimatorModifier.d.ts": { + "mtimeMs": 1752757616183.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageModifier.d.ts": { + "mtimeMs": 1752757616183.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SymbolGlyphModifier.d.ts": { + "mtimeMs": 1752757616227.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageSpanModifier.d.ts": { + "mtimeMs": 1752757616183.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/LineModifier.d.ts": { + "mtimeMs": 1752757616183.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ListModifier.d.ts": { + "mtimeMs": 1752757616187.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ListItemModifier.d.ts": { + "mtimeMs": 1752757616187.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ListItemGroupModifier.d.ts": { + "mtimeMs": 1752757616187.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/LoadingProgressModifier.d.ts": { + "mtimeMs": 1752757616187.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/MarqueeModifier.d.ts": { + "mtimeMs": 1752757616187.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/MenuModifier.d.ts": { + "mtimeMs": 1752757616191.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/MenuItemModifier.d.ts": { + "mtimeMs": 1752757616187.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavDestinationModifier.d.ts": { + "mtimeMs": 1752757616191.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavigationModifier.d.ts": { + "mtimeMs": 1752757616191.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavigatorModifier.d.ts": { + "mtimeMs": 1752757616195.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/NavRouterModifier.d.ts": { + "mtimeMs": 1752757616191.2698, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PanelModifier.d.ts": { + "mtimeMs": 1752757616199.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PathModifier.d.ts": { + "mtimeMs": 1752757616203.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PatternLockModifier.d.ts": { + "mtimeMs": 1752757616203.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PolygonModifier.d.ts": { + "mtimeMs": 1752757616203.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/PolylineModifier.d.ts": { + "mtimeMs": 1752757616203.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ProgressModifier.d.ts": { + "mtimeMs": 1752757616203.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/QRCodeModifier.d.ts": { + "mtimeMs": 1752757616207.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RadioModifier.d.ts": { + "mtimeMs": 1752757616207.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RatingModifier.d.ts": { + "mtimeMs": 1752757616207.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RectModifier.d.ts": { + "mtimeMs": 1752757616207.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RefreshModifier.d.ts": { + "mtimeMs": 1752757616207.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RichEditorModifier.d.ts": { + "mtimeMs": 1752757616219.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RowModifier.d.ts": { + "mtimeMs": 1752757616219.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/RowSplitModifier.d.ts": { + "mtimeMs": 1752757616219.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ScrollModifier.d.ts": { + "mtimeMs": 1752757616219.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SearchModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SelectModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ShapeModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SideBarContainerModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SliderModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SpanModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/StackModifier.d.ts": { + "mtimeMs": 1752757616223.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/StepperItemModifier.d.ts": { + "mtimeMs": 1752757616227.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SwiperModifier.d.ts": { + "mtimeMs": 1752757616227.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TabsModifier.d.ts": { + "mtimeMs": 1752757616227.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextAreaModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextClockModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextInputModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextPickerModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TextTimerModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/TimePickerModifier.d.ts": { + "mtimeMs": 1752757616231.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ToggleModifier.d.ts": { + "mtimeMs": 1752757616235.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/VideoModifier.d.ts": { + "mtimeMs": 1752757616235.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/WaterFlowModifier.d.ts": { + "mtimeMs": 1752757616235.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/AttributeUpdater.d.ts": { + "mtimeMs": 1752757616079.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ContainerSpanModifier.d.ts": { + "mtimeMs": 1752757616091.2695, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SymbolSpanModifier.d.ts": { + "mtimeMs": 1752757616227.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ParticleModifier.d.ts": { + "mtimeMs": 1752757616203.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/StepperModifier.d.ts": { + "mtimeMs": 1752757616227.27, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.form.formBindingData.d.ts": { + "mtimeMs": 1752757681335.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.FormMenu.d.ets" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.hdrCapability.d.ts": { + "mtimeMs": 1752757681503.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ability_component.d.ts": { + "mtimeMs": 1752758500220.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/action_sheet.d.ts": { + "mtimeMs": 1752758500220.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/alert_dialog.d.ts": { + "mtimeMs": 1752758500220.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/canvas.d.ts": { + "mtimeMs": 1752758500220.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/FrameNode.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.uniformTypeDescriptor.d.ts": { + "mtimeMs": 1752757681331.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.intentionCode.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2D.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.pointer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.uniformTypeDescriptor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragController.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifiedDataChannel.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalInput.intentionCode.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ImageModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/SymbolGlyphModifier.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.matrix4.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.UIContext.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uiEffect.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/ComponentContent.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts": { + "mtimeMs": 1752757681543.456, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/ScenePostProcessSettings.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneTypes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneResources.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/Scene.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/component3d.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/component3d.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/ScenePostProcessSettings.d.ts": { + "mtimeMs": 1752757616867.2715, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneTypes.d.ts": { + "mtimeMs": 1752757616879.2715, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneResources.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/Scene.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneResources.d.ts": { + "mtimeMs": 1752757616871.2715, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneTypes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/Scene.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts": { + "mtimeMs": 1752757616863.2715, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneResources.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneTypes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/ScenePostProcessSettings.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/Scene.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/Scene.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/Scene.d.ts": { + "mtimeMs": 1752757616859.2715, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneResources.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneTypes.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/SceneNodes.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/content_slot.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/custom_dialog_controller.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/embedded_component.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/folder_stack.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/form_component.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawableDescriptor.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.matrix4.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_destination.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigation.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/node_container.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/particle.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/pattern_lock.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/tabs.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/CommonModifier.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts": { + "mtimeMs": 1752757681483.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2D.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_common.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_common.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.intl.d.ts": { + "mtimeMs": 1752757681507.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/time_picker.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/time_picker.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.intl.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/with_theme.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/units.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/arkui/Graphics.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/video.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cert.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.print.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.netErrorList.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/web.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/web.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cert.d.ts": { + "mtimeMs": 1752757681515.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cryptoFramework.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.print.d.ts": { + "mtimeMs": 1752757681483.4558, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/application/Context.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.netErrorList.d.ts": { + "mtimeMs": 1752757681339.4553, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cryptoFramework.d.ts": { + "mtimeMs": 1752757681327.4553, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cert.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.worker.d.ts": { + "mtimeMs": 1752757681539.4558, + "children": [], + "parent": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/isolated_component.d.ts" + ], + "error": false + }, + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/isolated_component.d.ts": { + "mtimeMs": 1752758500224.3394, + "children": [ + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.worker.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts", + "/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.Want.d.ts" + ], + "parent": [], + "error": false + } + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo new file mode 100644 index 0000000000000000000000000000000000000000..85e7419575eef2dec9d1d66b91c4249e0e4a4f25 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/data/rdb/resultset.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.want.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/startabilityparameter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/app/appversioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/moduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/customizedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/app/processinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementname.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/basecontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/permissiondef.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.colorspacemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/global/rawfiledescriptor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawabledescriptor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourcemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleinstaller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/hapmoduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/elementname.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/connectoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogrequest.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.font.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.mediaquery.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.inspector.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/metadata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/permissiondef.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/pluginbundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/sharedbundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/recoverableapplicationinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/appprovisioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/bundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/skill.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/extensionabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/applicationinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/abilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/hapmoduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.openlinkoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/appstatedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilitystatedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/processdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/applicationstateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/appforegroundstateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/processinformation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityfirstframestatedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityfirstframestateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/multiappmode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/runningappclone.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/runningmultiinstanceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/runningmultiappinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.configurationconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.configuration.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.completionhandler.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.startoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.atomicserviceoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiserviceproxy.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiserviceextensionconnectcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilitystartcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/eventhub.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilitylifecyclecallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.environmentcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.applicationstatechangecallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/applicationcontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/context.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiabilitycontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/component/navigation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptaction.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.router.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentutils.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2d.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/graphics.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rendernode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/content.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/componentcontent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/framenode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/buildernode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/nodecontroller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/xcomponentnode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/nodecontent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.measure.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentsnapshot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifieddatachannel.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragcontroller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/extensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/customdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilitystagecontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/formextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/serviceextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/vpnextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autostartupinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autostartupcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/embeddableuiabilitycontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/photoeditorextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiserviceextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiservicehostproxy.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/appserviceextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalinput.pointer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uicontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/dataabilityoperation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/dataabilityresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/dataabilityhelper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.errorcode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationuserinput.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/wantagent/triggerinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantagent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/wantagent/wantagentinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantagent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationactionbutton.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationcommondef.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationflags.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationslot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsorting.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationtemplate.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationcontent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsubscribeinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsortingmap.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsubscriber.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationsubscribe.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationrequest.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/permissions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/security/permissionrequestresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityaccessctrl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityrunninginfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/extensionrunninginfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityforegroundstateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilitymanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilitystage.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.extensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiextension.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiextensionhost.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiextensioncontentsession.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.actionextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.apprecovery.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofilltype.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillpopupconfig.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillrect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/pagenodeinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/viewdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillrequest.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autofillextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autofillmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autostartupmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocessargs.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocess.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocessoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocessmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.datauriutils.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogsession.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/errorobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/loopobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errormanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentcontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentdriver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentexecutor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentdecorator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintententryexecutor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missionlistener.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missionsnapshot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.quickfixmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.serviceextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.shareextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/businessabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessabilityrouter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.uripermissionmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appcontrol.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundlemonitor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/bundleresourceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/launcherabilityresourceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleresourcemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultappmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/remoteabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedbundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/dispatchinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/bundlepackinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeinstall.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundlestatuscallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/launcherabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/shortcutinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerbundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.installer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/launcherabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/shortcutinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherbundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/overlaymoduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.overlay.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationextraparams.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.continuemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/remoteabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedbundle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuableinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuecallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuedeviceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuemissioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missioncallbacks.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missiondeviceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missionparameter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedmissionmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.package.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.privacymanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.embeddeduiextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startuplistener.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupconfig.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupconfigentry.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startuptask.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/arkts/@arkts.lang.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/sendablecontext.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.sendablecontextmanager.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.screenlockfilemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.embeddableuiability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.photoeditorextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiserviceextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.shortcutmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.application.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appdomainverify.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appserviceextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/kioskstatus.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.kioskmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/kits/@kit.abilitykit.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.faultlogger.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.hiappevent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hichecker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hidebug.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hilog.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hisysevent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hitracechain.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hitracemeter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.loglibrary.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.jsleakwatcher.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/kits/@kit.performanceanalysiskit.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animation.windowanimationmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.want.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/windowextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.windowextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicservicenavigation.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/commonmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/alphabetindexermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/blankmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/buttonmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/calendarpickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/checkboxmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/checkboxgroupmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/columnmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/columnsplitmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/countermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/datapanelmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/datepickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/dividermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/formcomponentmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gaugemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gridmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gridcolmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/griditemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gridrowmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/hyperlinkmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/imageanimatormodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/imagemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/symbolglyphmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/imagespanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/linemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/listmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/listitemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/listitemgroupmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/loadingprogressmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/marqueemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/menumodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/menuitemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navdestinationmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navigationmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navigatormodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navroutermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/panelmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/pathmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/patternlockmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/polygonmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/polylinemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/progressmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/qrcodemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/radiomodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/ratingmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rectmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/refreshmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/richeditormodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rowmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rowsplitmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/scrollmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/searchmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/selectmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/shapemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/sidebarcontainermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/slidermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/spanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/stackmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/stepperitemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/swipermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/tabsmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textareamodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textclockmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textinputmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textpickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/texttimermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/timepickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/togglemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/videomodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/waterflowmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/attributeupdater.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/containerspanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/symbolspanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/particlemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/steppermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.subheader.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicservicesearch.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.arcbutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.chip.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.navpushpathhelper.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.chipgroup.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.composelistitem.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.composetitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.counter.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.dialog.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.dialogv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.editabletitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.exceptionprompt.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.filter.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.form.formbindingdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.formmenu.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.gridobjectsortcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.popup.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.progressbutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.progressbuttonv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.segmentbutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.selectionmenu.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.selecttitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.splitlayout.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.swiperefresher.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.tabtitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.toolbar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.toolbarv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.treeview.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.interstitialdialogaction.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.performancemonitor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.statemanagement.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.curves.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicserviceweb.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.devicestatus.draginteraction.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.hdrcapability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.matrix4.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.pipwindow.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingball.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.plugincomponent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.prompt.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screen.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screenshot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiappearance.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.app.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.configuration.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.mediaquery.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.prompt.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.router.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arclist.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arcalphabetindexer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arcscrollbar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.foldsplitcontainer.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.fullscreenlaunchcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicservicetabs.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.prefetcher.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.downloadfilebutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.innerfullscreenlaunchcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.multinavigation.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.arcslider.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arcswiper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.subheaderv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.segmentbuttonv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.halfscreenlaunchcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/kits/@kit.arkui.d.ts","../../../../../../src/main/ets/entryability/entryability.ets","../../../../../../src/main/ets/pages/index.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ability_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/action_sheet.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/alert_dialog.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/alphabet_indexer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/animator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/badge.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/blank.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/bundlestatuscallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/button.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/calendar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/calendar_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/canvas.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/checkbox.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/checkboxgroup.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/circle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/column.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/column_split.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.uniformtypedescriptor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalinput.intentioncode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uieffect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common_ts_ets_api.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scenepostprocesssettings.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scenetypes.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/sceneresources.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scenenodes.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/component3d.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/container_span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/content_slot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/context_menu.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/counter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/custom_dialog_controller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/data_panel.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/date_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/divider.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/effect_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ellipse.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/embedded_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/enums.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/featureability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/flex.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/flow_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/focus.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/folder_stack.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/for_each.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/form_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/form_link.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/gauge.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/gesture.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/global.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/griditem.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid_col.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid_container.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid_row.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/hyperlink.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image_animator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image_common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image_span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/lazy_for_each.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/lazy_grid_layout.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/line.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/list.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/list_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/list_item_group.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/loading_progress.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/matrix2d.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/marquee.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/media_cached_image.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/menu.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/menu_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/menu_item_group.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_destination.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_router.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/node_container.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/page_transition.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/panel.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/particle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/paste_button.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/path.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/pattern_lock.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/plugin_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/polygon.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/polyline.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/progress.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/qrcode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/radio.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rating.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/refresh.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/relative_container.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/repeat.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rich_editor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rich_text.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/root_scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/row.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/row_split.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/save_button.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/screen.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/scroll.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/scroll_bar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/search.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/security_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/select.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/shape.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/slider.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/stack.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/state_management.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/stepper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/stepper_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/swiper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/indicatorcomponent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/symbolglyph.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/symbol_span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/tabs.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/tab_content.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_area.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_clock.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_input.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_timer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/time_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/toggle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/toolbar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/with_theme.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/units.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/video.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cryptoframework.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cert.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.print.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.neterrorlist.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/web.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/window_scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/xcomponent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/sidebar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/remote_window.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/water_flow.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.worker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/isolated_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/styled_string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/index-full.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/inspector.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/location_button.d.ts"],"fileInfos":[{"version":"be8b901880718680b6c067fd8083bd5b04cde401c1e1123823e3068bb2e0d282","affectsGlobalScope":true},"e8d2e50f9e8fdd312d31f97571b4c7295b8f29f7f8363498edae2a9eb113ee36","4b1854aec637e8e041eff02899e16fd3c0c78685c622336aadfd67e6604bbe1b","d6f7d47355a0167969e9a8eedfb0994f21e038d360965ec06c30f6871038900b","4735756aff7c5857de387f321633f272e2daba4950c427ab200de954340c7c13","13dfb22c1b46f9858b19fc7df54674146f3d174ccd35f0e02e8d05a3026b9ba8","33d21bcca0f7b054d0d0d402125f547c9ac77782c2df301de314143f08e81406","80510205fb587019e1ad42bfbc046d4f55f3c5a1c8b3debca7d6fe0adc93959f",{"version":"276144a8254bed55adae6f0646c37a2cd11575ac2cbc679bf7ac0419c443fd58","affectsGlobalScope":true},{"version":"3523038578cadf637fdce58f06018e144fd5b26c12e3f9c1cef14cdf92ca3d20","affectsGlobalScope":true},{"version":"28065193ddf88bf697915b9236d2d00a27e85726563e88474f166790376e10d8","affectsGlobalScope":true},{"version":"511c964513d7c2f72556554cdeb960b4f0445990d11080297a97cc7b5fa1bb68","affectsGlobalScope":true},{"version":"725daac09ec6eb9086c2bea6bbdf6d6ab2a6f49d686656c6021a4da0415fe31f","affectsGlobalScope":true},{"version":"21574b67bbedcb39a6efa00ca47e5b9402946a4d4e890abd5b51d3fd371819ba","affectsGlobalScope":true},{"version":"2415a2b1a4a521594b9837316ae3950b0c0c2f8b689defd358986bf3e263e904","affectsGlobalScope":true},{"version":"e5d8d715990d96a37f3521a3f1460679507b261eec1b42dc84d4de835997b794","affectsGlobalScope":true},{"version":"93fa2a84417c65ab8ed121a0b84536312e00a11cbf45b0006a75324d00b176d2","affectsGlobalScope":true},{"version":"a003a6051b48dc64eaa8ad83789e4c2a540f3482bed821053b6770969bd598fb","affectsGlobalScope":true},{"version":"e90857fa86cecc3bc964a2d7db9d95a0c406bebfadeb4853a01a0079936f12f7","affectsGlobalScope":true},{"version":"8bbb03589e48f10b49996064f35256e858d205dcb364428fb4cc045061b1d786","affectsGlobalScope":true},{"version":"5044747370afee4b4c247e8a14c2969d245bbcf8396295dc5a60c659d796a71f","affectsGlobalScope":true},{"version":"8e4921934f4bec04df1bee5762a8f4ad9213f0dab33ea10c5bb1ba1201070c6a","affectsGlobalScope":true},{"version":"a894424c7058bcc77c1a3c92fe289c0ff93792e583e064c683d021879479f7b8","affectsGlobalScope":true},{"version":"8f03386d697248c5d356fd53f2729b920ea124cd1414a6c22de03c5d24729277","affectsGlobalScope":true},{"version":"21ac76354ecc1324ee2e31ac5fcebfa91b1b6beb3e8c3fe6f3988538e9629c73","affectsGlobalScope":true},{"version":"ecc058373716a6bb19a4492ac553b61e3ebc0eb657407b6ea62337316885b64b","affectsGlobalScope":true},{"version":"fe7acdc1039eca904399190766d1c8766b7d2621413f972c8542dddd69612097","affectsGlobalScope":true},{"version":"c25aa843b930662d62f0e853dd1f347d08b66cdec09bd760151d4ba6ce220fe6","affectsGlobalScope":true},{"version":"3e47477f297e4fa0d556c40a872c2c45bddefa487fd054bf1f80bceb527a682b","affectsGlobalScope":true},{"version":"a902be9f4116b449dbac07ffe3f4d69abb664f8eddfaeb892225612469213788","affectsGlobalScope":true},{"version":"155d8d1e367e05af5e5708a860825785f00eabae01744cf7bc569664301415a4","affectsGlobalScope":true},{"version":"5b30b81cdeb239772daf44e6c0d5bf6adec9dbf8d534ed25c9a0e8a43b9abfff","affectsGlobalScope":true},{"version":"cdb77abf1220d79a20508bbcfddf21f0437ea8ef5939ba46f999c4987061baab","affectsGlobalScope":true},{"version":"62e02a2f5889850ed658dfde861b2ba84fb22f3663ea3b2e2f7fb3dcd1813431","affectsGlobalScope":true},{"version":"357921f26d612a4c5ac9896340e6a2beffcaf889ff5cdfcc742e9af804d1a448","affectsGlobalScope":true},{"version":"d836a4258d6b5ee12054b802002d7c9c5eb6a1adb6a654f0ee9429cbda03e1a0","affectsGlobalScope":true},{"version":"c021bff90eb33d29edfde16c9b861097bbf99aa290726d0d0ac65330aa7be85a","affectsGlobalScope":true},{"version":"1c4e64dc374ea5922d7632a52b167187ba7c7e35b34d3c1e22625be66ca1576d","affectsGlobalScope":true},{"version":"cd1bebc4db8fb52c5618ecad3f511f62c78921451c198220c5b2ee5610b4d7b9","affectsGlobalScope":true},{"version":"fb60e7c9de1306648f865b4c8ef76b7376731af3955b69551004ad3848fb8f4c","affectsGlobalScope":true},{"version":"18d23591bba5678cf57ef139e1a3daad8017b26ad6612c8c34d6fa39044b245f","affectsGlobalScope":true},{"version":"868df11ccdabb6de564f70b68aa6b379a243ef32c8f6ee6dc71056a3dd54578a","affectsGlobalScope":true},{"version":"cebef4c7f9b6afb02cd08e7288fab05d0be3e3c898c720775b8aa286e9f7cfed","affectsGlobalScope":true},{"version":"7e3c49afe9bf537f68ce2487d7996c6e5c2350c0f250939726add1efcb1bcf01","affectsGlobalScope":true},{"version":"c7673e88666f933b0d007e82e42b60e85cf606ec247033e8ee5ab5940e4be206","affectsGlobalScope":true},"114a0d4df9d1ee7fe823424460088ad620decc4359516e6143f9a1f49d4ad1a3","1b48b2e2be1f20ff327943afb2b33e4724bc63587f23bd7edc4209c415a9041c","734f6e14694c64bd97f1043a47397565d098937d35301b18c8670612a4e159cf","8e0622fd44e6fc146b3b431cd5433449bcc7660b555e6e6175926a5665353ad4","0cc5c94908b284934cc25e6bd28a612650b9644d64ce21248732f8ad95625cd5","0fe10efa53a287daaccba7fa70bbf20820ead1cd0c011ad59248f04cea5f3534","6534aeb84fdb78bdf07dd551c70e5f859c28a08b00507446b1043c20526feb9d","59528c8bb0cd15a4e2b544547cd324bb3a1153ebd52beb99c1f36f5437bca908","7542f446bc5bc9148a8443618064cdd94ba23293716dc839ea17e79dee318b45","3a5f3b923aa0dbf9d743ee99961763d38576b11ba81dbcd1b90c046f52d6071e","53b8801feda0f792b5959291f0e760ed1e013a78fb4e22072b663a76eb47a368","a8e07c1a2f8475fbab17dda22a5f51e2d26fbc39603cf3b18f9c0ae2b519e55e","b165c286dd5008c086949aafc593a6e216d96b17421c007af34b09741e132460","2167184e6d17755ab77268889020dfaef0c1de1a93f85ac7f91499a9f65d9029","1598ee8f3142f70e7f16845796722d65d483fc39b657f465a8c0bdef4585dc42","ff3b80b87f5c428ff03782f0036d2056e1f371b828f5fd1397064730c35c1c2a","41ceb60605d3dfa3d0be98d489f0fecc0a98bcc198b1b69733834ae4d94c3ccf","b16c3a6ac93cad023707a13e62ea05309b949966d56892827601d8065e8956da","1b27e1284efe00273d0cf76c3f500e96c5ad288dee06e1ef06dec81c40fff4ba","8e4f57a67be7ada1d4e649183d0fc2a136a11d7b96ed2a812a89465901f2fd82","e440c7066c19e60990f65eee96ecd5fe22cebf754376c0732a29ee4a11cfd2a4","79465a9b77dadae7e2af7d9ff548207d4ee6e44989e07cc75124661e4abe84ee","8a5e6d322a0e6f82ad799a856f16de541e091b795eb1b4f05e159b8c6bfd2077","f5c03ad15eee48dedd7bdef771d50369c70fa70b10523ab777e925a4c90dbbeb","e79dae84c8e3d36f8f47f2da99a824ebee5674af266cbf274355e1b058fb219b","8c804ac09102ae81cb3a5bd3698b0bbea4ee98bcf1c67ea28daf963e01743cc1","41c21e94cc18d83501abacdaf56f29ffa89e64a6dd5449580a53f7c834d487fc","5d1e8f9c86780f23962980d995e80f70cb90173100c4f3f1280c651c6dc22094","2238892eef3efdeaa60f96d62943897ca8c945dd6fb230ce71d2d9ce1989c30d","a0577605aac5da0b747b491593a469584f0005416e52dce21fbb970abcd115e2","0c56efabf3d886334e097e749e84bec2a40ab265089fb445e8cb88c47ef2e2b4","95fdeb811613fe4b7db3766ace5232f7b0830a84bc4eeb5db6fa7c327d1fbbfe","0885aa6e52133b13da14bd23c6e2923eb41f6587004d566b7fdcd643003f85dd","ceea5165733d80827e7a55d977c12e856d74e21aa5f0ff1feb49cbb9588bb540","050fe93cdb38916adc9b7d95d0085276f551b14e9482d6424fb4c72351e1d12b","678c852113057aeb50ed1fc344151e3e4b8e903e2d85c1a1806242c40d5ebe51","7f4971301fde2c2cf2175270ff152ad699d50fa7f3dbd47279efe5f3ca476c17","135143374c0c1346c5a1ffe1a3ed6152ea47369776f4e05e2b093f9660c5a11a","845873c4c1a98f3d9f84ae7bf5976211eadb60a1f6877ecfcd6760efe48b7e51","5c5627008db0c037c148380ab9ed21004ad2e33df3c693a5f750a84fdb182c34","90e2871e53f616739841e476f3054c5ae40255095aa2e7459222c4dc15e838b0","7a99dd486eb23a0fc3f0151fc53192497924d6470523d81d3b65d7151dae2b38","6498f86f7d7ee781d6ce43ff336bf4ad3b9c16bc727fdee114580a60ef3ad397","b2b5603060e1d6b2982cb5670e4c9f2864b185276e63bbc903d3a9c17ecdbfb0","783616dbe6f5eb8691d1c390e7b089cbadafa32bd00b0c70c04d41407a761d69","1ee4140494ebdaa4971b592cb59603953c4f613a6707069292e04006a41eb4dd","0cc349911f34825338f1c395dc96b64716cf25bcf5b5102d97385dcbb5590b5a","7e56809720e87c8bb10cedd0610fdd18c15b5575a62180b62e49c8b3720a9928","d720df61b68e1ac759fb8ee19a85b2d64d5fadc4f0f4a8c8e7b55df67a3f1775","acba4d1a0998ac6561b9a1aa15c6b1125f769f046cb38d325856a40b768cdaca","0e40c1a6790e0addbb90805e725440079712c91dd578c70fb6129d18f7fa9a9b","21930bd35ce5693ef61bd468014596dfaa5bd6b6c2d4f59f60844fac0eee384d","885699c517b8059b5a310e6c1e1365a1af0f37c89306fdb194e858bb6ad556fe","ecde85c883c841fb8069b1b1ab7d43ea56d55a66a8f123b1a73c6c139753df7a","9b4db77a88701419da97fabd73df38974efa8903e7ece164191f7b37b058eb22","0c17da2a16320aad741f4417bbf9f1d190e46de0c4ce7b03b339af7619f67beb","301779b2a8d0ceda5365e955f8828f65aa8f624789dcbd936e383015b48bab7f","e4b22054a008f8dc65d6a45ea27dcbf9a5aa3f484fd3fcdb86f36d8f38d5f48b","754e6ab5ab5dc6adf6e60c3a1d84257d226b672ae1e85b49253374dbcb5208f6","a6bdf6b79fdb3e0d9071c4b881f3ddfcf989db936115ea0940c5274ec9bda234","59076a01123585639ac35ad1ba8fd1acceee2335fe1ffcbf032d38925e47bce1","16820b43a1c139ef435c5dad03ec2a7f91c6e0fed732691ecba152ed1b44cd52","2478abad18abd3df6315d031c62f01f83a91caa634f35b17465df224608a8ac0","7c8b714b73a86f44112ff9c9ce9ba4d57b55e5b16853ceb31b757aff6cd5d237","0c98893d17a23b9b9a68328528d408ac9141b4d4e3fb5b2b38e6895c4f98aaed","a06221608f5d45845214ee4991743c1e7a6c91fa2addd3665d618abd1f940be1","1e60fd5cd37c33d064917e9b6202739ed7ad2b655c8db4c030aaf08cc1de5589","a3b1605aa96882b0e5766013858d9dd73df8423fcf0d8aa635a12bed07452f09","ee67d9b87041e39ed225a1c5e815d839985dfc9b6e12af1c96adef07b37251c7","c585cd71cd521f4373ff211223d2487faf3a467037b8e6ab0fa112551492b4c8","105a88bf7880674f76b13a3100c47f22f72b2cbe30f42115bac1d45a772bd4a4","c1bad72c3cd45e059aeb4dbf63540a69ffb58baac68f24d788f763f65aaedc59","77257e293740a1da7851793e3c7891ff9866a2c12ab6de588b5cbfd7e114763e","a513dc04b4779feec9e641a5218d9ba373779af667afc2147c81598ad7e58353","cfb4b1935c9fe3cde417d2732467e6a6a3568d18dec7ae4e7a66986d1993af7d","486609fe99f6a3f875a7ec02440f1442f9f70d1b960b25e487d7172fff2145e0","7067a4950c4dfa1282ac4b2af9ea9d6f654ab9ca4874030b0ce08eba113bb788","158d2327507e87febe9d9c300240930378b1abab2b6e6ca8defc9033f6c00803","f8e0de937ef0c85b9b885a4ac3349b8340d021192e214df4781c0926091f19f1","d998ebc2f8883409c3c1644f8bafaf4a0395a6862bb62fa47ffe43b014e72305",{"version":"9ee9891b3c8989c9dc4f9c739cc1480d7570db26343b75a86aa838090269ef23","affectsGlobalScope":true},"43ab492109878d087709e2af999e8ab035a40bd3468d873bac62f2d10e9ab814","353376bae901ae62a7996a45c3b0a7564ce5aab73ee5db49cb96aaa5d539362c","ec48c0499e9491a2b3549d02c1847bec623fe5bc88660c0a0f6466b52333c22c","dbb741bd0585ce01508978a4545f4a8cbe162845a0978ffe708c4edbe80396a6","f83ee958f4e51ff58ec869784ca5403f66e111488d80ad8ed55e43fe96e79546","e3f8c5af5ba2428b01ede95d218ba1dda5dbdfa3af477ecfb890cdca5977f6f1","996753b4604c6af1d5466837880a515708754683fa0569fc87305fc941bd103d","28a0e9a5d3d7580d8f895175542c3dd4340b9bde92a2b6f3e878d9206820e40f","16d269cca8715b0ca8b907859f6cce45f230f1b55a6429f267e4c5a8aa7f9d17","d7ad828b513b07e5194c7be5fd1fd8339150725298331b30ce0a4f93664bed55","fbcc37c2436bead20140d294ca70ca3410caf7117da4f602bd99658b88e43bb5","41640189084bcc53ee3ed1f302205899608319ec9fb26099b7f2f8206e64e2ba","5799a9c76c05db3522391375e5acda31de9e8066f92863c68d7a1cfd9614b665","53a5c6a0ecdf633bea0a5ffdaeb9425b01c350ece3ef11b53301eb08bd9dbbf8","60eb05d3ac100e163b0256a2fa81373d20c442b298b314f67087d7d4e7ef0da9","a480bb40ed9139c1886999772d83f2d46d4cbf86449af3c606dcca1dbc38d087","a8516b44218cb7e5e4badfc63301100b03412ad0f32b36bc29dd5f957874a783","2fd4536b789dffa504fa1060d29618e0898f63635fc5b6ac8f8eaacc0e01a435","c43074bae9acb448990469dee5260ae37f49142def0904191a4eb413c8be8d13","f8c3d909d650cbb9c951d8192eb9b1d107c431bf7813c2c02f55d1a19a757d92","9b2ca987a7467f455d8c400bb707e88ed04946cc7b7fe35fa1f3aa5857f680e0","ef2a7b4201827194eb706b950ef40889d0870f402e610cb096d86f0bb2d3bfda","16e1cd7282285183d0dd67a4a3b6ce7e9864de9c3aea1c4fe0d2496517521c50","a18f4f7162afbefb920ab97eb79c886badef0c12e2c0adc1778e5236301b33c5","01ca87c03d55631fd380b00103cc9b711a3aa9dd0f245bd077aa773fdd6adced","e15a16903c5239648c795bc68acdc833f6ae58daf7cbabad085e372ad2396a45","610031cec5c2530332b133b5a64418f3682652d1cc5adc120aee11edd8238254","b93b13225a47159c26011fc4cd2d0be60d4986be127c887de1b17fa8a0e40337","6e9801e6ddf7c3eeeda628c984737cadcfa7d075866ec59d0a66d0443aa3fd58","91a141deb1ae9e934627a5cc2f48861ad3a4162b16396867b8f6e533e760648a","123d55661bf39c9f88362f3f25c834e7fedf1538244b410293078e8c02c0c829","25d084c26f6956c51674a81f67ec88a0d6393e2582199243f06435ee0c2a88bb","bc6faa40ca044b14b715e85fef1ae84e35bd773a5aaad6b78f48d73da135e7b3","efbba0f807788d67fae730c94c5c0f412e099c4a62dbd28ba3fbead308e2b891","ac4eb8ccb507661633b9e0b700283d7d9ef214c01beae76fe329def1740f8655","67819e5de1ef35de58abe6fcd4b48d4a9cbc9e7d3d72bdbef84366e06f8eacbd","743615d8959d057c5fea280d5ba008c941d57459458e43daf426469f859e0c29","7adcf9ed168575450c990db43af6cbc6b1f9ca4e8222d3798bce2c96614ce7ce","e6f8f9c77868e7ed2756dc0c5013846287f6702939ead800ff2802898edb5ab3","cf3394c5b596894b30eeb4c6efbfe7d43760deb61341e979851a42a8d5659fe9","d680d4fbc41e96559a28e9125ad4d59ff396bd63631a684ca37d37908868ca6e","383f35282369bbe076f1203bb8db614279bcdf69d3997a7ed8cd02b885aabcc9","64322c0908a6e5cce21f118b77e1bfa46ea39abb05fea77bb9369705e3b8cf47","97e9592d53be761c186124ada0363ffcf29efd028772f317e252e31edee3f84d","d09cc9b02290489a11a10dc890f257339d1f44ee18f878a5cce93d4dc7afa02b","93dcf8bc5ab37927c8124c865a0785d538043fcdd26c85155ecfc3315ba38d18","550ac65c6accb7503d008c202c543d2e45dd485489185bee532e5832394be213","5fcf84eded0ee0f179690488c5c588c6739cd85faf173f0bb91c42b09cf9b291","de3f6f674302dc918c2d55dee449b5592b3b488fcf4712f2b6f6bd396eb9dc4d","e1fedabb13b9e83a711428cdb06b87f2eda423420cfac8c53ad7be8a569090e1","0d6fe2b77fbf134cfabfcca2c7d7bcbe5825f61aff487e6726584f4ba604b0c9","3bd6d1ebcd351252822879e08c5613956c428361cf77b9239f0c06b5c9f53554","a29822911a18f2ca475fd5ca72d74d2d3a4ec017171a7a1c0611919cf366e312","8dada6b127999d59a993ddbe4b856ff1698eb3e4ce9a5972b865073cd0f197a4","e455cc3d08750d3c3a9487c40797be8126bcb1feb1c28f01861285fd48978f89","5240b6959850f4ec58875d2a1db2633faa6f8ed35e75c2d0de64a524c7fcafc8","9a6a4a914c327ba4bc10b3ac7a1a0c5338138e32de6ed07ca5a29822a078fd4c","2f14a1db6fad4179c0225ba3bb2c5c928a483a6611bdfb7a63085258e0fe64e6","07711ae4c5fe6e2de94b7d306b2b6fcfb9c9113296089fe8c87b62f4593f5c3b","2e7e717ed6c912ad95ce23bb673d322760dbce616f43ceb9ac4bb6f7bc67a8de","544c3b6f3c93eb5dc022069ea98f78bbef8795031375d4b133cd2598234e08fd","967aab48934337426ac2c4471f0377aa74f5299c141fc1f6711d06ed09530861","f9a79b7f7b570277f70adca994260509d640ac2addcdaeafbe4a538f9dcbfd09","d8c1480dd116695f48dee789bf2b70a05ed5241d1d7834110f53747c5c9ff022","cf83ce8b02b9f4860743ebe72aee1e1b19167be791a55a88d67333edf32c12f2","565b1449b1dc37539d4ba2e0193a4a73c59cd072d035bdd4e3637410810161dc","5790411f7d7d27d3abf7370a399f4f4e7b23195bc2d2e125074c794d31454a16","a1bd47140ce25587992c80684a40da4196be462de1108238c831a20331f4b118","cb46296e32cd5079447688d3eae970509209f6bdeebcd5fa3c51e68fcff1b3a4","10b8255e393b59cbc7d4941d2c2d433b05f836fa51986f5ad6c0614bb00d77a2","33863627013943f5eae09fed79a6c20f29f51480de274d7eccb82ad16c1430d8","333cf561f902209e0c65334d4321a9932980f5fb626fe6565d41b63add1b1e3e","d276350becf2c472e770baba0a53f78587c0ef6fae03263a53358cba9e054b0f","ef7a639115957399d079b58d91bbce24e3a4e9bdc3fb11991cdfee14aa08f3e0","a53902b5aaf0d627fd7583337716a35af64b30361720175efd3d7b5d200e18ca","e86b3ed41e0f5ebe7a708dfed10352b80f58b840b54c2ea4253ec5f188560919","63242dbb1afa86b412c2c943a40d14a629b72fb141050ffb7bda08428e7e0bb8","384b2bf0df62f10d3dbd1d8d10bd100dd4bc79604f6553f537ba4b4f13dd3e4e","ff7425092ac5f3133521b144d37291444913e5fce6213b83459d286a2350d70f","88c2298e44e20c3136ce548e1c86b0c03e4fbd7653c2d96a0c284c48892c59f9","094436082008689d4b2d33bbef344e5c0fc72d706e4ffc5328f635e7396348f6","c319a1856a796fe3ca62edebed75504fea71bf75902897f1267c9989ca837b48","12f982ee9f348f7726f00745345ebc864bdd7411c44daf492483cd3346b1f2dd","1cf80da27152935181cf2dc6758301d3f19c16560a0f4b3b514d8f25034ab31e","ab34b423206e93f99b9db476b1f362b864044e5f9ed88d71dffa372815e8f94d","6cef8e9e926eeb88383106098ef3b654e3807068a716a43d684a1dc51bdaff43","d5af63e09643c2229940268038c812a9808bab6c2a06abb675043595b2a6922e","047277fabf0c7c861f064b2ab2d121e9281793c2a2faa22c811611e1c8fee470","44b6a75d86db6e0bdd3f0d01a6d66b1d5d62ba2d82f0a275af60fb7275017635","c95377bfded73bac96169bfd8d4d3dfb7bccdd1673148638efced75dd783a9eb","0a73da2f9a2360bd7514d3a07ea97064a3bcb0433ff6434698028671054e12a8","cfffd4fe37ec1640e8cf1f184e53cb5b9159f354de8cd2caddc1ae961004ead8","17a4c0fc8fcea72c48e8026612a64790188f1cd116547d02bae0fc0d78542cd4","6785f974f4335c881eb81d872e8abea8a13bd23f9778bc4567bb7b28cd17b646","f6205ac45949bb1745a0a645cd993e339713e22ea4817b4bbeb3a86c424cf25f","d69e798de3f0d6fd83cd3aed9f46386b4d5d68657eaf84464ab36203e11aa48e","4751093bf8fe095237caa95568fc75622e08808ad7f17f4dd30753bbf843f273","9301cf2b421dcedabbfc3add38af2ed5bb8fa4362f0aade9499987b51fd338b6","715625042ff68948b6a6d55d533351702d0a7b79f21a0f16686ef7bf07e33fdb","738dc8ac3328660d80501336452c51392df2cd6df9fb9ec0090c6d32eb19e8f7","522a743447fcf539140079f42fe00faa40abbcb2c36453bef3ac67406e7eaac4","7711bcbe27892aeb39f0b048e840b87243a3e1d7977827ebd4320343bc4c2c21","5981129a9699302da81caa5c90f5612df3945776378f3a5be3ace5e1641b20f5","52db5751a49819c0110c0af57564c2081cce12312f2bac482e7190dff3fbe64e","070bb8456cf9a8f65eb6ea1c3a390afb2f5426552c0c6662c6ab984d0820406d","c2bc89af9147c56102e1aacdea4da8afe41fd3ab5a5123e052ba7add52a11b69","b071c15b3f17b96864024801d8bb40592b882ee6af02aed5cb4de4e8ce3c3ad5","0c4e5ec8d9b5b5b1f14ff00b63984b812594a56d458204f01edb2fc4981d8dea","e489bdc329be98b8f68a923e4b554f8bd616b2558982c77d09fb6784091b068a","eb8f901c9ef0a01033e46fdfd1a6188d598868667d7a5cf51f9d3b24dfcdc1ab","fc4748ef48770134380c37b3d96751dadc85311470c7094f0d6f6dfeb6e36293","4fae2eee74e0143252ffc4aa9678b4c68096a7269fab33fa93449dd31f101094","54768cbe156ed3d648ffdcb2165c5424efa0ead8bb470fa78c6e7c8e46858bcd","f64cb8e33998dfbff5d2494e3ad26be84106014961d66b6c6b1c136bb269766f","ee07163b003a31858773a6fd3a1b19e10f0550560b9dd3add4a25d0196ceb22d","87154fc805ab0d25d3de72c35ba3c741e559cfca34245a95d22e7f3500a6bf3f","1f204854548b39f8a2c686d0ae4894bfcf4efb91627090b4be8dec70280e1c90","6b76137c1f2eb9aedbb83ae0b600e11181e461e6d09a98197f1379a55c3c8ecf","767d932bf78d1e613bfb4307e698e54dad618a3f2b0f119a983d64d503695cb0","a2ef18090b3a99985ab85c21941e34f72875c607fde4df186bf1f010ecd3f186","96982678047b3030ac02779085f0f4da756722fe3dd1abf73ac2f7abfd28b7ac","c018a7d6ec5c55b591483b4681bbc6d3b5e1a8823990c8b5722cf5dc4ae46c61","5e80c90b49d9c0dfea5b87af19bfdc399275f82a907c21c2deb95e3119af88fd","e54adf25101863a2bff7e5278ce0bd39740c1a982d7e7a593ed78befd41f4f47","6af65b44f9b47c1fa444f3ea1b3f71adbbe00fbdba936f36181bd80e12d81bf0","e004ea566e419175d5d70e18f31791a6f66d6357a168bff60fb156f56240eba5","09d63d3f38dcff440e6fbc80ca1cca61dc02d12670eb9f44f69ed804096bec80","e4a6cac57a47a95c539288c91fef8b073f54b38260f1dc3a0b14949d6500d47d","2edf0c9c6315ad9857ac17468220e8728978ef4e35b65f723c0dfceee66d6bc1","947263880cef2ef9f6d6a6baa95e883c82a514b452e99316e1dd6f5ca1cff8e5","564029090deef87174fa7697d120f35503be38598c7cb568d3d43de22d9fc9c1","cc6a6f4152be9dded455a9529a3cdad4fab7edcb8a884b2de75ad63214cccc98","c73df8fb77e12bbcfdb804d894227eb69f6b4fd829a9930ae23dd28fc799c798","01decde48036019bee78cb63108faf884b4efc80bb042c719ddd9c3c5c038dba","11b74426ed7c26be01c43cb065d6758ceef4cc3443f5439271793c38a652d411","083952a1513abb0eed9269144a9c384083c252688c1e01cd3b4c81f077377183","7c2a38194e145f88e0920e549511bdc41230fcfa52b1a56658cbaf4652a008c6","febf0f0cf0ffb1ac0ac465078bd0bf970c6f3e3ef2c1581f65aabf6b6168fefc","b47c7685ee6994b986a01f801b2d21201c90b16f67dfe64a2615dadb72c74181","95b713da82331dffe540ec684f727ede96fa54b5d495a87effaed254066ed398","431bd43eaf61359704826212496b643541e942c2d04dbd6d9c7f02e14bdc6dd0","c9785ffe38a87862a21fb8ec28ffeca0f43e487b7b10e1339c4cb2c94b04d9ee","dd2395e38a3e0784626f8b55868b483294451880a82100c7f7384f27b0b9a7f5","6684c914fa84771ebbe49e855c3013cb2c3ef317fd43fd20e16a3303b9286952","4e9bf661056b55f2040870294da1b4be5a621e8db6bc1bf8a5b7162ba2c9c513","26c1335fbe7de0bc2805a481b2ac82e58ef4c0166966c87f5c812ece1858acc0","2137c69ca6cf9e6482bb6d6909f08da62e031d18824795bfb98af901832ab21c","3c9eb94208017f40160b628eb8dffd7e20b2331318d064741e5cef5d82a20c00","861003cb523b7a2e4eb8eaad7a82b5b0235e4d7b53a09f355027b7330c7cc195","133ed480efb3f3681fcdfb949200b9cf65e4860df38fb864a890fc0214e2cfa4","6a5ce322d33254f0bb061d384ad7282687325afcd67577b82c63115535639b3d","544675ae1245867a712986d5caaa4d95e1c6c0dea7e8173d79225c94836f197d","342151d9e69d3ab7d873244aebf148bc2b5bef1cf9d0ad8740caa458c8a88e3d","7be9a0481de8b4d7e662a21a1d5fa4eb73f99d0377954ddb8e449c157b6bb268","7b570dd41fd88b817707922b11d62e7d28d0406233c7c0de03ba1c92943cede4","bcf9c2036656cfe5a8da239355dc11b93ff58805f4403173930f138a453de890","28497786e32552eb0aba2b683876ff80527206c1330e9d1f29c593ee4f6d0b52","1ab5b3008ef810348739ded40580a4e08431699223cccd049e914a1b467a7e5b","5c425f34b72ea3a36729e02b98db311a260ada159138661f977e1e0a5ec9e788","463d2e36bf717928352f0dc4ed67e2878dd9eec6738e906e19dc4619d3aee591","19ec69bb72e3b6e4214a11632f8ecb8b51bb11e4321be690c6e1719a777457f2","cfaf707b9d1f4c2e10d6cf13ae5cd1da86d9123f40387d189deb5697b174488a","5707a4e0f082e4f42fbf80040aef3b246834c74cc66dd841fbec9c991ef1381b","1e0f707f5846aac727deb23dfc1bfe8f8763384f7f6af4949a31a78a388c7c12","475459f9a3a3f8d50d92cf52bce42b8e46d99e8bccb50e1ce4498f817444705d","01878ab57b73f085fd5d10f53136dd352481464fcde6c4aba4af1383e3eb7277","4ed97228560a40461cc02ecc6156a292f11864218fc2af813d4dbb07735bdb7f","3807790aa6a582d455313673d4e5caefd7da35c7457f889597911a39f3e3bcc2","e032b562295cb85207bdec5cdb20a9b3be593b57560f3bc647cf9989c4b13613","2c58e9a38a682574bd46121070a9bc1d49b6d84d7e4356c73407447d0515baae","458412be4bc1685d53ccb03d3a3f124ccafb8733b12ccbeab0e3ee260df48c76","6fb453602a5297bc1183afc9ce5bec12410e0fb16a1b41f51eb1904b4c2e606b","4493f7be5364cac2bf9ea5d93e7011490f635970c435ad4eea4ede2b1e1dc776","689c7289b75a804f2ccf8b5c893ca4ad5e871fc255ceb70f19f1a0f801d541fe","4b6b4882af64f69643bdcaddfe76199caec4e16262c148bb78ff9dc646153a98","aaba5287e9e9e213154f94c22ce67bfdb3b294df5e6ec787807cc87719ea567d","32acca3a5b0f58c3852d0a14a03e183972aeebd45f0c830303301deda1997c7b","a7201009d7c4e1947cf14e2e0f7b28382a71d15923c91a4f5f92479ee2e13b8a","570d80abf9c591781e425cdf67bb85a6cde5238cc43909791f2aa85b521cfd1c","06df1301b2b94943cb02b337371e3d070e8011c05f301f3919669f21a5c9909d","1eb62848225aabe250f6033de39d1a347fe14667eab4098bb91e730af57bee85","414b0a25ec34067ea2d14f252010e85f3a4fcaf3b0959cb833f511110f141e81","28d00ecc2dd7fd32034cb0e0b4f100ee31f4d2f4140084c00ec1e8e2f2bf8352","de3e710c23df64ce88709c0a533e9b391139248ebddabcf6fe7492033a108f4d","ae660d72657e7bba6f04c2dd50becfc585f6ccdbf8782de358944535401025ca","5e8e0e9e71339691a133e1f9f3f317e5f4d9fdc655988f561a3b300aa85fb863","33f0835bf957eeceac93cc1956e2d73c2775757916a81dc15a3197e5bf46a5ef","b5f9007616d3076944151f56fe4e61eb3127a14d9c4efda7c8c57c18aff74a8f","e39a1cff7424a5c85f748da77fe12d15c1db5fc406c8d138f97dd8746c242a45","0af6cf0780ce04d207f70357261c2f7c3a83d5a479332376c0c53a378caaf946","2aad3afc028b4e79612431c4bc02985f6ccff51defacd5a22de40c0db06ab293","f330a746552555f198be6228c272b2c9a9e2f44c9de2dc21f910d60b1e162e02","4c130a63d8f747d9983a117623f7c23535eb6d58f226558712777bb37490b6c4","561b665854bed5dcc46cb12cf2e71c900f1721c8ec80ade351d6b9ffecc40370","cba1f7ab4520cdcc8031b98ca7ee693ab5a75af673c4678571ae6659bfa751e1","eb8dc68cf0d3686c114a36b397c2cd57e502ce727b5ac0b3bcd98c379c5eb969","1da2b990f5cd5a315a866191df969216927c3314de00abe49d51d673c6231cc5","dbafe11fa4c83192ef5eeaa3d8500daddd08bcad30fe10eb5e4c832cf1bf9d54","385f6390a15a5a3607f87ffb3b73ec0e502ced2439bcc1aa911d40043f9c70d1","ccf7559a5cb23cd80972446d722876e5dab2d27ab5556df0fd020b15b9e4131e","01d235b20217422fe8e7cb085eb4ce65170b3718c8c81d6fa1e78c347ff9897b","75fc489be65ac52a3a07b707ef2eb56c40f07b66821119baf12e7a484b4f7e91","c360268fb197f568e9d53abcfd9007a7e73d517c335897e34ef42164e5c77ddb","fa4fd914ba600b131024af8651d40ffcd65a5277dadea5489859b4963c643b07","35f678b11b8d4d0892b4ab9930ac4774935c85621e741535c385ee41aad6bc88","0ff1b8b79dcb7f992a7b2da33f4977398d7595f0dc423d864acabbcbd7b64f11","74ed682594846c34c87f314f712a694e5a5e80d451e1f5fb927bbfcec7cd945c","f17bcf0484049122dd54caa6c2b31323eb46c9a93b97b74941aa357126a14be2","8b2577154198feea893913cd0ad31019a7339227541c4e85cea79a345c054060","ec33b93673c808aab6c04feaef188d1fd4baa1981c565743f25a69a1681b58c8","d2f0b25716bcf18895c71306abda91b5c9e5720077522060c5fec9bd1d755c03","8c107d9768a16d54f16190b0d6f33957d4bd41eef4fb7ef6b10fca0e5a39a587","f51a2fa05657ba130768c5c3fe6097c45a6230e256b0b345179c1e6622664432","a753d9f7839ac708864000ccdad7006ed39330a016d4acb9b700bd0b19269b8c","4eb69b0c92bbbb3315797e27bd0dd9c6cd4ec680745d8fdba478303706cc9a8f","5bfecf6a65553c9ce646091b23e4d09c3f04feefd906cbd83bc22e96ef4f79fb","c1a5ad3bb3fcacabf8a7f7d4e779162ce5a49c7387b76fd75d3f140b9c1204fe","21dfb3b2b6fc3843226f11d3d03e97f6544708f8a59ee120c1a47b0d3c83be60","34de4d52b327457b4f84a2473fb70ab29704c5fb96384ef46ed2b31c8bbee32b","4a34059c517df713a0dda19b8822ffa4cc5386a31c0d01e0c120dc3f0df876ec","6fc6d72206de1808f3e7384bd7f335d46470fac06ac92d420aadcc4b1fc356ff","9f430daf20fbd4c160ccfe6fa70734ef54c401822877793f611dae747460fdc5","54001fb8bc9ec220335984bc700db7dbe11f6db80781f542d2a6d5f6dd6ab19f","d15a84d2faaaeffbcff47d3f85885e6a00e0a1256e5bdece9425998838c1968a","9dedf9d48a9abf33b273e10a0766059961a16f1e5cf0b0bec3bd79d433e0f600","8098ab70970c888c7a84ca823469e3abc9977a4f0487548d475c99f51b299c41","3703305a9a02b5d9381a70d652f63df7f3eeec7366315fb9a4e18003e90996f6","74f67b37c367289180f0d18b9d215794679c8e0bb1bdf6e43f8bc66861b49b29","9b1c3688a96c614da8548f9f9be84ed6c2396a20afa0f7c1f8591b04aa8d56c7","c6ef17f19b568cd43bcbc1344ee2482023f2bc5bda12f7378777a06a6e83fa20","f55b2178809affa443e9d19b140a4d68ecdc76009df2e52cc82ed455d6975d1a","1e0e8354b15155e66ad26b5ae2cf5e407e03d29e0e9a1859ddf1d75d85fd6a8f","ac1cae57620d71becdbb1fd4dfcec8381251da5624c42567557d6279e59e56ae","7caa569a7fcaed31c1a6271c09b53ea410acc265a516096fc3adeccf7a6e6fa6","7578b159a52287aff4580af10f311f6466a7d94e736462c9c1ed520378a66619","eb08060f522ce5c18e14aac3ecc2b216b82a90969121e65f908578d890e8cc4e","9be94e2480bf2a3a913d0c5eb021555ccf552d9057abc813a9a845547e114357","f5bfcf427c95ba6b5c8d8b4aac164e7dcdf05e581c2eff5b61f04d18e2154a87","6413f346dc7316eadc8468f81426d4a72edab9670693a0502ca6c6d3d7232bed","1ac177047f332d4f68cb005bf9d74cb96376f16cd07cb9c9f3bb87939ae30ed3","f5af4306d5f7221d4c2ac4bb14d63d18c766bfcac00c887dbc70275d84402445","1925a2dd113d37dfa79075f52e9d9467b97ccf8115a6730a4eb95258846e0940","9674a5cd6204bb3dcac4f4d5d2b604966d1f7b6614e443bd437fc3d9f6498296","136c17a91bebb444868ea9c8dd35e102dfe143b8911078a9fcbebfdc9760061b","ac666699023461cf3984aa17788cf05e18cd6c25ccb14a18f8a9dad47979857d","b88e1ee37a3f13206994af6a3a95b7b85ca981d2ed0e163a1cfccc61f2005b99","098896805971aa87a40b9dc30adac527fd1af711de8f05d176a3bc755b6b6cce","a50c078a7b8a18f4a1e5a9f945397d767abc8b57b1443265b73964c02cb9627b","6fe02cfd8557b5be84285d1a69152e18cb1e1ff868bad43baabab68501ceeacd","31affe042c0f506e84793b099fd177cdd362a87ee9b70d3b2bd6d4b49663ee6a","b49be00dcf47e823a6c5fd0758fd87c136baddff69891a15fc90bb5dc0f9b854","962e3490eafa7facde98920e8016ad46fec7b7954631c9ed411a46252434abd5","b11ebda48bd57987c9d80bbda73ad5a09bfb24819a72c67e276bcbb12d1b1945","5c199d42d9e46d8c54bc2a44d1a94e467c860d4429d732d377b050279a1fb8c5","3ad2eaabe3f599d97b0944d46c9c654621859e5b6cc4b50e9ca6db2b7054dd9c","78ebd6f0f533255e6097ec1f183597517da7b2d5ef66e3a742e101317af331b3","8cf219184cbbb4c4705b22584f42e8d37e252db15c74f0f8f17ff781c290d9b2","e1228a081f701145fae6ea5a8d865729cc02f9cf890dffb6bc658d86c5f1270a","d01ae7728a2ea8144029ed64d05b84de6b29f2b576630a759db11f38077347a2","d347951b31aaabf5f047fce44a32320b3bd2f89285d23fe016093e38534c7146","383bf90ab08d31e488c509abc03f0603021e3830e0defb343a913918b5427c0d","4eba71d4d89abdc4a12cded8ca849c5c90893a6c487fbaad326cc411722e5323","6e720d2d20a095f13ca3fdad775414f06ded3c7aaeff1cc8ba502a53cde07ba3","764180cd5de36462ff483e415bbb010768077de55ab10283551d488254ab3281","ab284957eba695e638f31cfb4473bd23c946a27c415d0bb05dcc97c5afc8a470","811c241b6cdd18b438806f8a025c6c962cb7de2c238766161c2f7eae2e63d4b4","eaaf5e82e87bd72e28988852b815b0d259253e34fca56657fc36278223b0c0fb","b71a8e85fe26ae624b45f2dfc054de7b5a4b5f8778f08041814f02ffb0c02554","3cf41c62922773ac4c5ff20a643e9d841e0a5e4a7f711dc9409a6d411ed04f88","4aa8673d1b1f1697ea8d095f58b0ef3131027fc9f7c95c6f7e11717e6e70b6fe","f958eb29c9bfa5dcae5294149fb4bf8976a4fda269c37720c802f58fc75d704b","911c98e6286a2349cb9d833330e9c6a662e1b854ee7f06b5c2ff8a9c00dc5585","c2b5fa70179123a02eaf0df776a0ea7ae801382036d850cd9cb44cfafb19efce","6d82ecc5a484947f7219bca151cc2d941bd22c4eb5fd6d8c965c34e2ee6da402","5d148f8ccbee85ff390f4269c4da4716339986744a5f49a15c379aa4b34c50a7","f3fa1713741b3f7d07ed6bf57134fcbb6729e78f789a910b7e969403b9840a0f","c73fa9daa7dab6a33832ccf090eccfcced795a9e02d7211d1939815dfafe02b8","cd6ecc25c2b5cecf2848d14a9ff04404d294fd842475693ab761837d0a71737a","10ca2e94f0f6a783dc18964ab393d5c25365549b9ab62d3dca28a24a8d3e1a1d","155c2c713177ececdbd94b6cd3e991c95e088673e1c97557f1a3b94c877e4d12","b01dac1fad496b774c2d17ef2bb2989efd12d897b12edfcd0a75a406677cf638","da921267fc67980e6603f79f55c51ab8793cd9899a4ac65defba724611397c20","36c1f4a87431dc92ac95f17d748002cbe0024303bc8bbad2cae094a91a174233","47d813d0b77a6c8f40475beda0772f4fc82b1d7ee1f373dd97326e4d67b26b38","b9700f37f629fbc158c085458c7921d3e1b3df19db3b449bc7fd11e4c782f2ba","1e754526314112216f50b99614bbc67b878061c6b08d5698980edd1c4432bca9","a068d30a65d12787ed69a2f3fe0497e0f8caeaf993b2e2e8dca896c123b64fe8","f232f6fc61fcfe176575850ebb7228c288af8a86a4a92a2def46739b028df6e0","d8bee0072ffbb66b5af3c4860ce702c59b2e949b2a263b5a13ebcf3ff12c83a5","aba9f73847737989efc9e08f2137281f4b47871981275195c53c5073b9001626","246919311b29a3564f9f56c137616d0dacbf1ebca78ccf2cefdc09e8f91c0bdc","0ef7d8fc895a5033bb0175927f72ae39d3c570b406b9cb15a831e8bcb4fbcd87","9072b632ce475cedaced514d52266f5737d82d05d37cfc8d88821f25cb0893a0","57b31d387cafc4e8c7b81abd54f56f8e8bc0ee94d65e9f2c74e054be634a7e32","9d2f05a7e7502e2e604c3f1504d76383d9d18bd43bdb90530132253037c0e231","4863421fd95311f3a6514ef67159f907be1f433a64bc39a69ff8d9d37de09319","270a4ac674a3aa3a6aee30a9b9559f72f8b55f386ee55a21c49c0059803478ae","2be2dc0ddf1826bd260cf4652334af58d1a25e00e3928e208efa256262151995","8b43118599a5bf581e76cd623aa2309a4b94daf272ffcf4dfe9303fa289b682b","5c3e89cb0297d72fb78710e6cdf009edc210ea0d3c8c17d1c717adebb6cc2afd","214a0150bf42defadb2ed009389c8dd5ab960b55a4cf3bb14fee9482303cf92c","5f1569fb153b65b9833ef311f896f1ad0d325186f14fa8b69e6a50096e2a4267","4d39395f280561414d2325e40cc02570bb39db91164f43010256571527f2bdbb","0350b682180b4df1ee105df4dea5937749c0c1e01ec5af5d7b05d7019797e0a2","ab96424ab03f0a0052e1a1ed3fe1d76e385f65e8d2301880f39351aeba002e5d","9077988667b156dba8fe2750dd1e0a72f3d425ba0c980c62bdeea65a947bed2e","d261b14cd53cde4e97bf3084b74f85e6cbf5b3d6321d365c6cc9f20b6955f533","9df7e4655665769f02cdc7fb13a793b757394def93d6c1b9a6d1023e57db71b0","7a3b3185c3ccf4e4f086b5e1711f1092327810d05555c131010dfe2eced8eb1e","acaf5ea0a34374caeaced63bb89ee46a6745830896f6df04198743ad77c48d49","fe0aebac858f851a1521dbdb9f2859aa0ec0f5066f79df99a7813a26f6edfeba","71e1101d434da42bd2304d1c62039c7de1fe79c1ada1f1319620d588672dd407","d9875dd7eec64fc63ae284bb9bf479edfc0670e9b087e61c74318309769cf01d","f5803432e9a599fe904a3469269c87d42b6ca5c12f438f3eff75cfa98d593134","9c9829c9004fa3965794e0633d94b9652459c45dcbc28ac751aaed2d865872c5","6ea5d42e62c598904898ea4aabfac34890a54dd5c238dd543e71bde7c7515fd7","bc882517392e2bc54836058c6183ecd3ecb3e65062353832403b2cbe021a7e03","63c3489e06b1ca16b24c03219784b87edf83309a83708e80ab46026eded153b0","09561316f4833bf62fb84e78c763fd4eb9631913e62157f5ec2b0929b4bd3b22","e0a473fa55a314be3c83449d4b5e28fa58892e01b48f41a9395135f4c396d486","6bb1ce90efa2e0d66caef4bc9c58225b53574c26ab86222f0e94fd18a5577d13","0a559972195611f8100f9bc90e6de882a0057fd83409da3afbe25ed51d8b64ff","ddb5ae9f2c2e2de0526a516508fe1aa4bde0dafc215ed58fdb09ccc1e5939c20","75e073ae15e7dd713b00f6c04bde25e597d27e543ef1952871530ec6bf1ada25","8908956116a8cf5e8f72ee63eb5564282640dca076ce696d818603c6b875fe24","82800515888719f3c713e0bb150338fb1db512da8d3d79138ef485ee25e33a85","0539cd2a9783a16c0618266a8cce6bcdd5b2e71dd4ee800eb0e970c8a1d723c8","b86e4fa6486aeb376d9b46881327eecf888c2843e0bbdd2de63f221784e76a03","6cdc760089a5123897108939d32a7c0955f6c6172cfb8abf8454d273df030ac1","105d8abc05163a4eb6ce51e717bdfa74904ad853ab0484f1cce1212cdc2cc006","7deb1b222b2c7b5e6c90432b328d5c4c9a75cac2698fd438a3ca5ea7071e364e","c467012efbe63006c46f5f7c3fa0ef84278d41ebfcc57f3e655a0abf65b3fb2a","4d83597dddf298a444ac417971b8b0cb94ae132c6813bd191f3314188e635184","248a3ca6051c6b6857164156019d576dc0ff80c2026e8bbd75f3009dea5c3f05","4d2517326e79c2835302c028ccfd41a0348ffbaf529dc75c851f0d06c6b197e8",{"version":"a4a245f63c440ecbf347b0e0409ec38684c43fd1ec4104df5f9405292231d328","affectsGlobalScope":true},{"version":"da854b64a978deb3c2434e6e3e8e40142210e33a6e36e4ef482479577f625d13","affectsGlobalScope":true},{"version":"a2edbb2729d2df138e42998a5804ca54b9e9610a230d2903007a9ad123458da8","affectsGlobalScope":true},{"version":"745de33e37cae24e4b530ca03a8e77942e5d2360281988daa79066d86639461a","affectsGlobalScope":true},{"version":"be6e8ce9d89e6ae797bc5fec1dd2bf1a3e5096819a740e5f7d990ad052953f04","affectsGlobalScope":true},{"version":"31cef656e2ae2836c00be7f7c36dd225c96879b1530ef99595f87667a550dbf0","affectsGlobalScope":true},{"version":"6b6cfa0fa9528f829fa03a2cbcb1a9a325800daed455ef111ff15d8d6be8f39f","affectsGlobalScope":true},{"version":"2dae1085d34be82cceaa9da090d387d6a0ac7587ce93d63aa5e3ae5577338bc3","affectsGlobalScope":true},"214d4176826f0654e1a22cce5c0733e5ca2d138a0fa4d9560b99b7dbac0da15c",{"version":"ffae7fd73a4a74451be1de4ac54f9686aa321d0b5c633014ab336cc0b437b80a","affectsGlobalScope":true},{"version":"904bf520503c38c1ddf3167da34750738fe3cfc88092f62158e3a0e037bf2160","affectsGlobalScope":true},{"version":"35f376ae278243e6afe9c24a12a7f786f398dfe578aba5fde0679c52e5146fc4","affectsGlobalScope":true},{"version":"680672358d2f84fdefc97936432b59025d25112d269406c0a84e51c13b90b195","affectsGlobalScope":true},{"version":"353273db48805fa739de275b52173cb3edf2e553ef86e7813a3f6e4a1d4bddb7","affectsGlobalScope":true},{"version":"51c6c5d5054b6f505dc1a228587d6b817dd366c60284c575773244d1516c3a95","affectsGlobalScope":true},{"version":"1b818842e3d38878689b2c2f3ef055ced422697dc9979976c489a06ff06a65b9","affectsGlobalScope":true},{"version":"77e6217a65f8517f192db4d3d52518c2db0aa9d87876915e68011115a02c5f6b","affectsGlobalScope":true},{"version":"a912df79153642e7c30ae0759358f7066f2502e328682928391bb13eeb20dc98","affectsGlobalScope":true},"49bcb93c8995baac4db5c755b57402656b22897494dafaf34779cc1f14a3d43c","aabcc875047a9ce097df133c01ccba6e6d1a70f9b3ebe16edfbce541b711d278","f844bcad7a95d4f6db6d7c400100085b593891bfef0040d55c334f48e9f227c4",{"version":"181a3c43a7e60d6c6459a1b261e7167448805d42c29459dd879432ca5a3d7a38","affectsGlobalScope":true},{"version":"e6397d4242c72f4ad6e414d3cc3eaf7cf6b540e820f21ba2021597ab53902d19","affectsGlobalScope":true},"32dd1f6fa95589df742f0e5dc59a39617b85691b3d485a55d05949e6a277c341","e512a66403669c219c10d1054162afba9e912f923a0549223219f4f8474d95e9","a7c2ce9db04a8a4825cb13d7e0d5beaa7d4c3a3cab4bd0ef9e2faebee2aae6e5","5f87b9bf2da0531b912400e7cd49a372b915e729251493ed6863e354b88fb672","66c509d1a6aae2aef4f896ab6d44ff3c9fea39ddd5168f05b5e70c080d0d828e","9febc93b9612a5081040535a0cc788716ec7ffc0e182517ad1057647704bc96d",{"version":"cd734a3ceb5b1343e1d92f40813437e25530eb5b7ef5154c90b46dec68e4caeb","affectsGlobalScope":true},{"version":"1d26e6d3045e6aa4c43b1b3058fc150ea0a3a05b82f832ce143cfd0d83713758","affectsGlobalScope":true},{"version":"328c9a08cfd0be25d4b3f33f60b21ffe469885f6b4d868e704fa45b4a355b7ca","affectsGlobalScope":true},{"version":"eecedc013fd6e67e7b2727cdf98fefd8dbfd833686a458157cdb305c576f2ee4","affectsGlobalScope":true},{"version":"009f50b2f451600f3b511c7532555ed02a44b93853325b72dd3b979e8ce6e58c","affectsGlobalScope":true},{"version":"2e11c2fbb7a11c2bbaf75a03876f6d0142cf5987e1deea4b1db88d175e84a8e8","affectsGlobalScope":true},{"version":"f2bf83fd6f73d59d35c157612efcf5636a02bea68dddd457edfe396241506b94","affectsGlobalScope":true},{"version":"a5699c6f98fef02b7cfacd5be3da1ad9c2f1bcb30d72e9a24f263dd6ddd6e75f","affectsGlobalScope":true},{"version":"491ac07cb7139d2c9dd1fb834df8a71a34b3afd1fe7ca2abab060df7b025b974","affectsGlobalScope":true},{"version":"2d11f6aa532595ba237ee02dfa916d8d991f55efae45036f4a031564419941a8","affectsGlobalScope":true},{"version":"07ce1b728bc8a189504941753896e911834ead3c0f4d8106d39b878d59f5768c","affectsGlobalScope":true},{"version":"d84104ff83394662482270c22f3db767397ead8f356c835215ef209f61331000","affectsGlobalScope":true},{"version":"76e578014f6c6f18b511c6214ecbe4540f69da877f98c12c732ae5ef1c8202ec","affectsGlobalScope":true},{"version":"8b0e1e59695dd28adf930fa4f82ee7f34789fa179837f52fcaa4e56478080974","affectsGlobalScope":true},{"version":"ba927c21dc934422ed6799948e4f4f4d97ffed5d53071f1aa1c4180b63720982","affectsGlobalScope":true},{"version":"34e04261f8d46785867afa92ce6ce81f656228b9983927b9106605ea80399f04","affectsGlobalScope":true},{"version":"8be0e01065b88a7ae97de8138d5561ee34b4dd52dd261253652af6e2999d6220","affectsGlobalScope":true},{"version":"b05a34fd6db3bb5f17b9f65a08bc30fe50c5bb9d60eb184f15dd8d9580dfcbbf","affectsGlobalScope":true},{"version":"399edc722872d367cddd6cd495369534cdbd2d30583889e83d3ab183f3446467","affectsGlobalScope":true},{"version":"7262faf4e227893619259508ed54e86a8c28ad9fa2aad1a96f889511fde2003d","affectsGlobalScope":true},{"version":"7a1fdf8e667f526c7a0f3ad9fd8c11ddb3203837294ed277089f7bd2b82753e7","affectsGlobalScope":true},{"version":"c20348336236b9431486b77a9f72ce1d9fa918ea3d135064485a77162799c8c9","affectsGlobalScope":true},{"version":"96212f6329bb7dc85c082830166a2fe923bfbf079e16b023abce3e7bdf5356b5","affectsGlobalScope":true},{"version":"3d87ff64541bbe7143ff9393f41c90ce630f49d5dabfb97aa77dba7f987d4b7b","affectsGlobalScope":true},{"version":"6643af14ed0c659833208ee8a18f811cd262d8ded336578b8b1eb0989cac7889","affectsGlobalScope":true},{"version":"f07f6f392d85adc461612b9fc0114b19e19b03f4e0cf2b86bb17a2660aaad8b6","affectsGlobalScope":true},{"version":"e3444fd440d71f349fd854b42b955316d02249dcb5c5fd3da770388fb93a5011","affectsGlobalScope":true},{"version":"58c153487cdb0395e0602770d51dcb9b49f123e9e361dac849000ea98bac381e","affectsGlobalScope":true},{"version":"556469c9300b8bdf20ca790bccbbd6fc6697bb5d70cb5e921314fa89f2a21834","affectsGlobalScope":true},{"version":"0f7f6bb0ad58920c9f3fb76920826678bb5b7c71ea665b8653479139282039a8","affectsGlobalScope":true},{"version":"1f46a188451215fc2dc45a4798630a0a4927b7783d7234aec9c5282b69afdd05","affectsGlobalScope":true},{"version":"ecf0dac14da8a6526926b6734ff7b3de19a52b0eab50ff2bcee0476c70061feb","affectsGlobalScope":true},{"version":"a82fab989da9ffdf06c4cb390184f59f40a88e0f0b773fd9d30f1030a4bdd133","affectsGlobalScope":true},{"version":"3babd328660263e70db849a19469ee97eb26fdfea5159739c6ae63f11ae3a296","affectsGlobalScope":true},{"version":"d839874dd15f6ed348bace3842d483b53fb2933a67fc7e15414a6fb8513f9830","affectsGlobalScope":true},{"version":"b0bc815e0adc758ea47d6d3d0197b08f8d20edf56a8f7dda51db6576aa492ef0","affectsGlobalScope":true},{"version":"0f6f743dfe13b3eb04d3c7ab32d067cdf21a9ded28b916ef44dee3b6f889f50a","affectsGlobalScope":true},{"version":"8a3cdb83655d310a669b9ddb697aaf8ecc1e8e41d732543368ff0c616e6e8551","affectsGlobalScope":true},{"version":"0f5832fbf7749e68dd9e47863997e8c9f3f06b66e3db629157754c390025f49c","affectsGlobalScope":true},{"version":"cee65150d81b2a64424bdf77d4d773f76a14fb67b52137b62c8400c09002ff24","affectsGlobalScope":true},{"version":"265e798c386cb4d68884c27cd3fe18b18531fdcf8b06a6f5f0457d5708409313","affectsGlobalScope":true},{"version":"9ae8d47d98aab6ad483da501854bad2badb44ec9801ff9f20df88866f0695526","affectsGlobalScope":true},{"version":"8ad20d4d07985a03b06755c578f8c5e61959b70c08aa6adf6834dceaa45038cc","affectsGlobalScope":true},{"version":"0643f06db5ae457bf88d1fb98e9ef29f0fa26a1b929bfc4a804d0051b97d7651","affectsGlobalScope":true},{"version":"164cbee53b866ab7bcc1e27be9ca9425ad6ae546d428053c1390f39247ae8124","affectsGlobalScope":true},{"version":"2ac9266cd6e60ba9e15163fc3ac7c1f1c41aa11756d19bec08b4062b86c9f912","affectsGlobalScope":true},{"version":"8833f137d183571bcfb39b82446abb9d1be5587de2db3e67e69e879e3c36440a","affectsGlobalScope":true},{"version":"2e543a7bcebb6b524651629de4ed05a093f30a979531c1900c7f95c3321b5a53","affectsGlobalScope":true},{"version":"110d2fbadd2fd7713a988779de06f5981e89202f470b1c6f03bcc4676e031942","affectsGlobalScope":true},{"version":"1799ba6f2943e16d986921c8d94ccb53a9d3af930be8404a05b7a78157396502","affectsGlobalScope":true},{"version":"ed0d1670088a608eaae7baebf7c3b0ad740df1f6a3fbf2e9918b4d2184b10418","affectsGlobalScope":true},{"version":"3b6e856ed84b49d4d2da000fd7c968cbb2f2f3bcb45aa5c516905bb25297a04f","affectsGlobalScope":true},{"version":"1fb4fdabc388cf946705fafccb600b2acaf44fa96f7418f5ff4cba8c5acf4a1a","affectsGlobalScope":true},{"version":"9737e958668cf4d3877bde85c838d74a6f2399c55aea728330d6757f886fbd47","affectsGlobalScope":true},{"version":"60d09949859657258a1e204e116bf863076e643acca65b2529b555089a713ac6","affectsGlobalScope":true},{"version":"ed92cc55553d5625fb29aa7a56ef7dafef214ba67569a5ad2090ff1210b7a7ee","affectsGlobalScope":true},{"version":"7d39efcf0a7e218d29702ad1ecfc1a819b5d19ead4e297edc51e1e4f48b01f70","affectsGlobalScope":true},{"version":"9dcad7a9b495bd4fe2342e9caf2d8518bbb25d3007236954f599a30b8aebf4e6","affectsGlobalScope":true},{"version":"ba415c77c9b4b8eb8e7f929d6674cb841be66a50941dbf53c46174725f3feea2","affectsGlobalScope":true},{"version":"3813efb78d2a394fadaba7ec5870bae3a18897b3fdf722447fb1870eb3469eda","affectsGlobalScope":true},{"version":"c43434a006e580386c955294ed82120a7010e2e351c1352cc81100bc5b59d673","affectsGlobalScope":true},{"version":"ba14e8fd121b7b8ca07806f8902dedb6a78aa304cf3f29fb4d550c5174cabad8","affectsGlobalScope":true},{"version":"44ce2c9c3eab14339cf368213acd36f968652894a9c1a1db8f7980c5dfe0b062","affectsGlobalScope":true},{"version":"6a10e07ceb379fe60a841bd258ebeab84b0d86ee58a142740572dbee5131ccc2","affectsGlobalScope":true},{"version":"0258b20790ed0fd4fb112e5340d489f70f5ff353020926b395dc32e09f22a422","affectsGlobalScope":true},{"version":"389ff949fa1795b75576f43283ba08eda9a6298d41848193e907a337f009cc20","affectsGlobalScope":true},{"version":"8743407239e7e664b367343052be4a208d2bae2dbf09de62602c7045b642608f","affectsGlobalScope":true},{"version":"175d7f03c2404042fe66919ab8bdb08a734d3a91bfe9702d1d8e818555dfc33c","affectsGlobalScope":true},{"version":"bc343f02b56a1d98c7a6af5fc7518d79da9fd1f49cae4b1b97bf68de638d92e7","affectsGlobalScope":true},{"version":"8d41dfe2645789058d07c73cc6257d72784dcce2d5007131800b7809aa491349","affectsGlobalScope":true},{"version":"5f7fb4204ce347e8635b171956cde3ecdcbb9071d67ce97363e07dd7536873c6","affectsGlobalScope":true},{"version":"b0fa1aeb23b6a2fdeb0c28deba04ad1ce8685905535cbe0e4b4dcd9eab7fde95","affectsGlobalScope":true},{"version":"6882126573093318e433659fd07b37cd5f2bb7195bb77db8966022a6fb1a67c5","affectsGlobalScope":true},{"version":"e597e2399a2f5c999202e1bdfa1b0f5900f151b36b76f2d908ab74f2b4953dd4","affectsGlobalScope":true},{"version":"16175ea0e4b28f86d0f274f810c18afc24640c3580be3af033a6022cc8befb78","affectsGlobalScope":true},{"version":"33091af3f990628ac5d4abfa09acc5d2e6dbdf65788ff54ae929818debbe4206","affectsGlobalScope":true},{"version":"52afb2eb854875fef550c60856e55cd02f0961b3ac7367589ca5767f3c090251","affectsGlobalScope":true},{"version":"f6a38297cf4932bad57637935c7567e5ebaba358d9d1ba05e93f09532b6e3038","affectsGlobalScope":true},{"version":"d1125b8078558f27454cd19c2fa25ffa1ad6b57afdc2e6cc9b0b4bf631aa1bfe","affectsGlobalScope":true},{"version":"8fa8468c1e03c7a9b7daa7d94b2be183a85a85719b617c033a2ebe220db0e31f","affectsGlobalScope":true},{"version":"6e4143a7da65fb171693aaeabdce2ab45918b64f4376ffec7be9bcec3d98bfaa","affectsGlobalScope":true},{"version":"9c0e40e6918830abc0658621a95cc34162f1e0a77f6b1fab54d23aff5c53d52e","affectsGlobalScope":true},{"version":"c45ecc25519765c0caa2fad87debeb760c5ff70a844b63b2af0efed9aba4bb55","affectsGlobalScope":true},{"version":"a62a6c54df2d5956369bcffbd67caa50647943393da501fe7edaa9a031f837d3","affectsGlobalScope":true},{"version":"087c00e2de471a80266474208ff6e1fe21db931e38390f4b64b84dd224a0a8c1","affectsGlobalScope":true},{"version":"1dac2ebf5e083eccf421beae2c3baf40694af7c2074f145e356132e829e7191d","affectsGlobalScope":true},{"version":"9303b0bfa9833399a6fcfc142548fdf801c0f8e493996c292e7fe795178bd44c","affectsGlobalScope":true},{"version":"0050c919a6db04eb1161549c0b9883f07e341465f979db510381010884820c69","affectsGlobalScope":true},{"version":"22c5c4e94f975ecadd5623a1d0d315795ce03dcf40637ce22410056409824444","affectsGlobalScope":true},{"version":"dfe39326c357ad5c2793071529c2fa17016b1f33aaf2ff68f145f2bf547ba1a7","affectsGlobalScope":true},{"version":"1f1ff632b3cbe190232e49e5daa3ba6030b8b10609710ad02a55aa23518e8a13","affectsGlobalScope":true},{"version":"ae233becc2c6250ba65fc356d4c3994392dfbc984e0e6b7ae6724cef3301b290","affectsGlobalScope":true},{"version":"d67258278b25a79116f4ddfb8ffa41f305ba60187f460124f9fad60055029eeb","affectsGlobalScope":true},{"version":"9c6f731e814169176fa001087b1b7f83d97526b2bcfda179a01f36868f25f7d0","affectsGlobalScope":true},{"version":"711fd71a090f85586b588ab0ab0ccd4ed9c71395bd5fcae42ac3193a119272cd","affectsGlobalScope":true},{"version":"761e182f7fcbdf5fcb0f08d9c8586a4a28f532499c7d3eae39ede2642d0894db","affectsGlobalScope":true},{"version":"3e8a96f68d24b318bc30a63344f7d4bd0d4558df1f5d2d569ab8e7b58f8d8466","affectsGlobalScope":true},"bcaa31b0ab53f1bb0ab217932b46ef1be570c5e0b71cac149d21a284b468080b",{"version":"60734813ec2a2c8836855bc769d25c306e489479e2f074cfcb7096dbb707acf4","affectsGlobalScope":true},{"version":"82692b9573eb0ecee384066b99cced8430e70aad94672986a09c98e7ca51f3d8","affectsGlobalScope":true},{"version":"27ded4b63da62f8e71b37114553fb5a493dfa68e915a278ba483dbf3648ca261","affectsGlobalScope":true},{"version":"ccd4c143316d8784615624fb86c7fc5866321f26c64597a6b8762b46a4c6ae54","affectsGlobalScope":true},"05900558993ef9ceba8fd5026c9a86b106c7c64e61a5d3c4d17834f0980ed77d",{"version":"daddf23e73f07e9b9edd8c7fe48564f0af6f966a21fd59ac2267290d6eb6f357","affectsGlobalScope":true},{"version":"4b9290a110a4332145785b310afcceb4e31d0a32cfc2f686446c25bacc121f56","affectsGlobalScope":true},{"version":"5686baf6e3c4c244f2e2daaa306986619ce967cf7cf58a80e87f6b8fe4351388","affectsGlobalScope":true},{"version":"4bcfbab841de41b0a983a2312e684c0dfbeaa1e61fa801c56c85bb6c0b14b1e6","affectsGlobalScope":true},{"version":"192b3183b58c2acb2a5e226b7d96f72a2aa929f0b627efec44de8ca29fbff647","affectsGlobalScope":true},{"version":"602318cc8dedef64cf985adfaf00e9e2d852b5bf0d2f2312a6dacb5f420a1ca3","affectsGlobalScope":true},"dedd6fd61ee19f383ec783bbf5bbb032d1aa8ed32a0c84e7fe1f308a3e81486d","2c71854c615364441dfe9ad5b7fd8537ab0d006cf1440b38675d489868a9f7dd","7ff46415602510ad30b3c02475a4d2368d7b570d2be50069da74526d482f91e2","f11046b75914ea9f73d1a89098b55639f253a7cda2924e16fe671cab923a347f","0579d48a3bc44526f453c01fb49238edb2991f39810f5ed35dcefd9be9928c9a",{"version":"ee63715a71765c18fb4e2427d78816d76a62353925cc01a31faadc715f9e15ab","affectsGlobalScope":true},{"version":"6c3b493e742f2028e6863970af2897be01afdd1a4ddcbce5d9bac77b4ace448d","affectsGlobalScope":true},{"version":"d52b5bfda14542e726cf7dffc4b3385f17c852cf578d28eb1b490934130be537","affectsGlobalScope":true},{"version":"44509a4b8ddf0b4b68698646598f5a8ec6ca919b58fc505cf1baf1fa911a68bf","affectsGlobalScope":true},{"version":"ab17071afb9e1f3079e483c2f27c7a698bdc3ead31a55aa1f9f5e5f61cde17a4","affectsGlobalScope":true},{"version":"af7a4f32e8aa46d3a0bfb92be1a92319e0d9beadfafb4dea6409a31845480efd","affectsGlobalScope":true},{"version":"473855402b596349de2fa9621071e1c3e30448a74eefc0a6d69f335f61752903","affectsGlobalScope":true},"c71c29ea5508caeae790be40605f15f4de809f06b52f504a08306df3d0dbfce1",{"version":"4c7b8313ae8e56ed2b1e3496ab331d02bfab068207f41d004af8314d5e28a475","affectsGlobalScope":true},{"version":"7a21420cbbffff8021d5ebffcb4a24c2074e75f0d9859a0dee17e030e7cacbca","affectsGlobalScope":true},"d58adbd2db9bafa1f9024d34be166813dc21d091a2c10142692c32b890952d1d",{"version":"3473b148a48e8ac4d33972de24b5cef8b1c200fb9367e92837cb1d6dc831a3e4","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"alwaysStrict":true,"esModuleInterop":true,"etsAnnotationsEnable":true,"experimentalDecorators":true,"importsNotUsedAsValues":0,"module":6,"noImplicitAny":false,"noUnusedLocals":false,"noUnusedParameters":false,"skipLibCheck":false,"sourceMap":true,"target":8,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[299,310,460],[49,50,73,168,169,170],[46,48,49,50,51,55,71,73,166,170],[46,48,49,73,170,191],[46,124,193,194],[46],[105,107],[104],[109,119,166],[46,50,72,93,107,124,196,197,198],[48,105,107,152],[205],[123,124],[46,87,92,93,94,95,96,97,98,99,103],[48,125],[48,64,162,201],[112],[151,201,204,213],[150,165,208,209,210,211,212,213],[46,156,157],[217],[46,217,219],[50,57,73,114,115,116,117,123,124,125,148,149,151,152,153,154,155,156,157,158,159,160,161,162,170],[72],[106],[48],[46,48,88],[109,158],[46,223,224],[108],[48,226],[46,48],[227],[46,48,226,227],[166,204,227,228],[125,297],[46,112,233,234,235],[48,159,201,204],[163,287],[48,64,107,154],[65,87,110,111,166],[48,64,105,108,125,166],[48,105,149,201,204],[46,48,50,112,116,202,203],[48,160,161,166,201],[46,48,124,174,176],[281],[48,282],[163,282],[152],[46,240],[46,226],[48,64,166,313],[142],[392],[392,396],[402],[46,142,166,431],[46,48,408],[46,113],[142,392],[46,65],[46,146],[65],[316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391],[133,134,135,136,137,138,139,140,141],[46,125],[110],[46,65,75,76,77,127,128,129,130,142,143,144,145,147,163,164],[46,166],[393],[142,165],[46,48,72],[46,48,72,78,79,80,81,82,83,84,85,86,88,89,90],[46,245,246],[46,48,54,58,65,66,67,69],[46,72,84],[46,72,249],[46,251,252],[46,254,255,256],[46,105,112,259,260],[46,262],[260],[46,264,265],[46,118],[46,47,57],[46,48,65],[46,59,430],[46,56,268],[46,270,271,272,273,274,275,276],[59,61,65,131],[485,486,487,488,489],[131,132],[46,65,131],[46,59,63,64],[46,173,178,180,181,182,183,185,186,188,191],[46,125,173,178,179,180,181,182,183,185,191],[46,179,186,188],[46,57,137,139],[46,124],[46,193],[46,60,61,62],[46,600],[46,48,174,176],[46,65,601,602,603],[46,57,64,65,74,87,106,142,165],[46,48,57,65],[64,72],[46,47,118,119,168,169],[118,119,167],[46,51,54,55,56,57,68,69,70],[98],[93],[72,199],[90,107,124],[50],[92],[46,48,97,106,120,121,122,124],[92,93,94],[48,73,112,148],[148,150],[150,208,209,212],[156],[88,241],[46,57,63,88,110,117,123],[125],[86,90,107,124],[72,87],[46,48,73,148],[65,72],[208,210],[50,65,148],[87,104],[100,101,102],[286],[46,48,73,91,109,112,113,148],[46,48,50,65,73,74,89,90,91,105,106,107,109,110,112,113,114,115,116,124,166],[46,48,50,73,91,106,112,113,114,115,148],[48,73,112,116,148],[210,211],[148],[46,112,148,312],[133,137,165],[135,138,165],[46,133,134,136,165],[61,131,132],[135,137],[133],[137,138,165],[53,54,68],[52,53],[54,69,70],[46,68],[69],[54,56],[56],[78,85,87,88],[61,78,87],[87,88,90],[62],[78,86,87,89],[72,88],[87],[87,90],[266],[486,487,489],[485,486,487,488],[46,486],[173,177],[61,65,177,184,189],[65,177,178,179,180,183,184,185,189,190],[184,189],[181],[182],[184],[184,187,189,191],[48,112],[48,175,177],[128],[132,137],[65,124,127,128,133,136,146,147,164,165,337,338,402,426,432,480,481,482],[490],[166],[46,62,65,132,432],[463,464,465,466,467,468,469,471,472,473,474,475,476,477,478,479,483,484,491,492,493,494,495,496,497,498,499,500,501,502,503,505,506,507,508,509,510,511,512,513,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,589,590,591,592,594,595,596,597,598,599,605,606,607,608,609,610,611,613,614,617],[46,48,612],[316],[588],[593],[61,133],[604],[48,68,74,87,91,104,105,106,107,108,109,110,111,112,113,120,121,122,163,167,171,172,175,192,195,199,200,201,204,205,206,207,214,215,216,217,218,219,220,221,222,225,226,227,228,229,230,231,232,236,237,238,239,241,242,243,244,247,248,250,253,257,258,261,263,266,267,269,277,278,279,280,281,282,283,284,285,288,289,290,291,292,293,294,295,296,298],[62,75,76,77,127,128,129,130,142,143,144,145,147,165,166,202,203,311,314,315,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459],[300,301,302,303,304,305,306,307,308,309]],"referencedMap":[[461,1],[171,2],[167,3],[192,4],[195,5],[311,6],[108,7],[105,8],[120,9],[199,10],[200,11],[206,12],[294,13],[104,14],[207,15],[296,16],[113,17],[214,18],[215,19],[216,20],[218,21],[220,22],[163,23],[111,24],[107,25],[267,6],[74,26],[222,27],[290,28],[280,12],[121,7],[225,29],[201,30],[227,31],[228,32],[231,33],[229,34],[232,35],[230,35],[298,36],[236,37],[291,38],[237,6],[288,39],[238,40],[239,12],[112,41],[109,42],[205,43],[204,44],[292,45],[175,46],[282,47],[283,48],[281,6],[285,49],[284,50],[241,51],[242,52],[314,53],[395,54],[396,55],[398,56],[403,57],[448,58],[409,59],[449,60],[453,60],[454,6],[413,54],[458,61],[393,55],[457,55],[420,61],[421,61],[145,62],[147,63],[62,64],[77,6],[392,65],[142,66],[127,67],[425,68],[165,69],[202,70],[315,6],[394,71],[428,6],[459,60],[423,72],[243,73],[87,74],[244,6],[247,75],[68,76],[248,77],[250,78],[253,79],[257,80],[258,6],[261,81],[263,82],[293,83],[266,84],[119,85],[118,86],[146,87],[429,6],[431,88],[269,89],[277,90],[300,6],[132,91],[430,6],[490,92],[588,93],[482,94],[305,6],[301,6],[308,6],[76,6],[65,95],[164,62],[189,96],[184,97],[190,98],[433,99],[435,32],[602,100],[279,101],[436,6],[128,6],[63,102],[129,6],[64,6],[437,62],[438,62],[601,103],[600,6],[439,6],[203,70],[177,104],[604,105],[166,106],[434,107],[50,26],[73,108],[170,109],[168,110],[49,26],[71,111],[99,112],[198,113],[196,114],[152,115],[116,116],[96,117],[123,118],[95,119],[162,120],[151,121],[213,122],[157,123],[240,124],[124,125],[158,126],[117,6],[148,127],[197,128],[153,129],[233,26],[234,64],[235,130],[211,131],[159,132],[97,133],[103,134],[287,135],[154,136],[125,137],[149,138],[160,139],[212,140],[155,141],[313,142],[138,143],[136,144],[137,145],[133,146],[141,147],[139,143],[134,148],[140,149],[69,150],[54,151],[66,152],[67,153],[70,154],[255,155],[268,156],[89,157],[88,158],[84,159],[245,160],[86,157],[90,161],[259,162],[246,160],[82,163],[249,24],[81,164],[265,165],[47,6],[488,166],[489,167],[487,168],[178,169],[185,170],[191,171],[181,172],[182,173],[187,174],[186,175],[188,176],[174,177],[176,178],[463,26],[464,179],[465,179],[474,180],[483,181],[491,182],[493,54],[496,179],[502,32],[508,183],[510,26],[521,184],[615,185],[613,186],[538,70],[540,70],[542,54],[545,148],[548,6],[583,187],[589,188],[594,189],[611,32],[598,190],[599,6],[605,191],[597,57],[126,70],[299,192],[460,193],[310,194]],"exportedModulesMap":[[461,1],[171,2],[167,3],[192,4],[195,5],[311,6],[108,7],[105,8],[120,9],[199,10],[200,11],[206,12],[294,13],[104,14],[207,15],[296,16],[113,17],[214,18],[215,19],[216,20],[218,21],[220,22],[163,23],[111,24],[107,25],[267,6],[74,26],[222,27],[290,28],[280,12],[121,7],[225,29],[201,30],[227,31],[228,32],[231,33],[229,34],[232,35],[230,35],[298,36],[236,37],[291,38],[237,6],[288,39],[238,40],[239,12],[112,41],[109,42],[205,43],[204,44],[292,45],[175,46],[282,47],[283,48],[281,6],[285,49],[284,50],[241,51],[242,52],[314,53],[395,54],[396,55],[398,56],[403,57],[448,58],[409,59],[449,60],[453,60],[454,6],[413,54],[458,61],[393,55],[457,55],[420,61],[421,61],[145,62],[147,63],[62,64],[77,6],[392,65],[142,66],[127,67],[425,68],[165,69],[202,70],[315,6],[394,71],[428,6],[459,60],[423,72],[243,73],[87,74],[244,6],[247,75],[68,76],[248,77],[250,78],[253,79],[257,80],[258,6],[261,81],[263,82],[293,83],[266,84],[119,85],[118,86],[146,87],[429,6],[431,88],[269,89],[277,90],[300,6],[132,91],[430,6],[490,92],[588,93],[482,94],[305,6],[301,6],[308,6],[76,6],[65,95],[164,62],[189,96],[184,97],[190,98],[433,99],[435,32],[602,100],[279,101],[436,6],[128,6],[63,102],[129,6],[64,6],[437,62],[438,62],[601,103],[600,6],[439,6],[203,70],[177,104],[604,105],[166,106],[434,107],[50,26],[73,108],[170,109],[168,110],[49,26],[71,111],[99,112],[198,113],[196,114],[152,115],[116,116],[96,117],[123,118],[95,119],[162,120],[151,121],[213,122],[157,123],[240,124],[124,125],[158,126],[117,6],[148,127],[197,128],[153,129],[233,26],[234,64],[235,130],[211,131],[159,132],[97,133],[103,134],[287,135],[154,136],[125,137],[149,138],[160,139],[212,140],[155,141],[313,142],[138,143],[136,144],[137,145],[133,146],[141,147],[139,143],[134,148],[140,149],[69,150],[54,151],[66,152],[67,153],[70,154],[255,155],[268,156],[89,157],[88,158],[84,159],[245,160],[86,157],[90,161],[259,162],[246,160],[82,163],[249,24],[81,164],[265,165],[47,6],[488,166],[489,167],[487,168],[178,169],[185,170],[191,171],[181,172],[182,173],[187,174],[186,175],[188,176],[174,177],[176,178],[463,26],[464,179],[465,179],[474,180],[483,181],[491,182],[493,54],[496,179],[502,32],[508,183],[510,26],[521,184],[615,185],[613,186],[538,70],[540,70],[542,54],[545,148],[548,6],[583,187],[589,188],[594,189],[611,32],[598,190],[599,6],[605,191],[597,57],[126,70],[299,192],[460,193],[310,194]],"semanticDiagnosticsPerFile":[[461,[{"file":"../../../../../../src/main/ets/entryability/entryability.ets","start":345,"length":36,"messageText":"Function may throw error, caller should handle it with 'try-catch' or declare '@throws'.","category":0,"code":28040}]],462,171,172,167,192,289,195,311,143,108,105,120,199,200,206,294,122,104,207,296,113,214,215,216,218,217,220,219,163,111,107,106,110,267,221,74,222,290,280,121,225,201,227,228,231,229,232,230,298,236,91,291,237,288,238,239,112,109,205,204,292,48,175,226,282,283,281,285,284,241,408,242,312,314,395,455,396,398,399,400,401,403,404,452,405,406,407,448,409,449,410,453,454,411,412,413,414,458,415,416,417,393,457,418,419,420,421,422,446,445,447,456,145,130,147,62,77,392,142,127,424,451,426,425,402,165,202,315,394,450,428,459,423,397,46,243,295,87,244,247,68,248,250,253,257,258,261,263,293,266,427,119,118,146,480,429,431,269,277,300,75,59,131,132,430,490,588,482,302,303,304,305,306,307,301,309,593,308,432,144,76,65,481,164,189,184,190,433,435,602,279,436,128,63,129,64,437,438,601,600,439,203,177,603,604,166,434,612,440,441,442,278,443,444,50,73,170,168,169,49,51,71,55,98,99,198,196,152,116,93,96,123,95,162,92,151,209,210,213,208,157,156,57,240,124,270,271,272,273,150,158,223,117,148,197,153,297,224,274,275,233,234,276,235,100,211,159,94,97,101,103,102,287,154,125,149,115,160,161,114,212,155,313,317,387,318,138,319,320,322,321,323,324,316,136,388,135,325,326,327,328,329,137,330,133,332,333,331,334,335,336,337,339,340,343,342,341,344,345,347,346,348,349,350,351,141,139,352,390,353,354,355,356,357,358,359,360,361,362,134,363,364,365,366,367,368,369,370,371,372,373,374,391,375,338,389,376,377,379,380,378,381,382,383,384,385,386,140,69,54,66,67,254,53,56,70,255,52,58,268,256,89,88,83,84,252,245,251,72,86,90,259,246,78,262,79,80,82,249,81,260,85,265,264,47,60,61,488,489,485,487,486,178,179,185,180,191,181,182,187,186,188,183,173,193,194,174,176,286,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,483,484,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,517,518,519,516,520,521,522,523,524,615,580,616,613,525,526,527,528,529,530,531,533,532,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,609,559,560,561,562,563,564,565,566,567,568,569,570,571,572,608,573,574,575,576,577,578,614,579,582,581,584,583,585,586,587,589,590,591,592,594,595,596,611,598,599,610,605,606,597,607,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,8,45,42,43,44,1,126,299,460,310],"arktsLinterDiagnosticsPerFile":[461,462,171,172,167,192,289,195,311,143,108,105,120,199,200,206,294,122,104,207,296,113,214,215,216,218,217,220,219,163,111,107,106,110,267,221,74,222,290,280,121,225,201,227,228,231,229,232,230,298,236,91,291,237,288,238,239,112,109,205,204,292,48,175,226,282,283,281,285,284,241,408,242,312,314,395,455,396,398,399,400,401,403,404,452,405,406,407,448,409,449,410,453,454,411,412,413,414,458,415,416,417,393,457,418,419,420,421,422,446,445,447,456,145,130,147,62,77,392,142,127,424,451,426,425,402,165,202,315,394,450,428,459,423,397,46,243,295,87,244,247,68,248,250,253,257,258,261,263,293,266,427,119,118,146,480,429,431,269,277,300,75,59,131,132,430,490,588,482,302,303,304,305,306,307,301,309,593,308,432,144,76,65,481,164,189,184,190,433,435,602,279,436,128,63,129,64,437,438,601,600,439,203,177,603,604,166,434,612,440,441,442,278,443,444,50,73,170,168,169,49,51,71,55,98,99,198,196,152,116,93,96,123,95,162,92,151,209,210,213,208,157,156,57,240,124,270,271,272,273,150,158,223,117,148,197,153,297,224,274,275,233,234,276,235,100,211,159,94,97,101,103,102,287,154,125,149,115,160,161,114,212,155,313,317,387,318,138,319,320,322,321,323,324,316,136,388,135,325,326,327,328,329,137,330,133,332,333,331,334,335,336,337,339,340,343,342,341,344,345,347,346,348,349,350,351,141,139,352,390,353,354,355,356,357,358,359,360,361,362,134,363,364,365,366,367,368,369,370,371,372,373,374,391,375,338,389,376,377,379,380,378,381,382,383,384,385,386,140,69,54,66,67,254,53,56,70,255,52,58,268,256,89,88,83,84,252,245,251,72,86,90,259,246,78,262,79,80,82,249,81,260,85,265,264,47,60,61,488,489,485,487,486,178,179,185,180,191,181,182,187,186,188,183,173,193,194,174,176,286,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,483,484,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,517,518,519,516,520,521,522,523,524,615,580,616,613,525,526,527,528,529,530,531,533,532,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,609,559,560,561,562,563,564,565,566,567,568,569,570,571,572,608,573,574,575,576,577,578,614,579,582,581,584,583,585,586,587,589,590,591,592,594,595,596,611,598,599,610,605,606,597,607,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,8,45,42,43,44,1,126],"affectedFilesPendingEmit":[[461,1],[462,1],[171,1],[172,1],[167,1],[192,1],[289,1],[195,1],[311,1],[143,1],[108,1],[105,1],[120,1],[199,1],[200,1],[206,1],[294,1],[122,1],[104,1],[207,1],[296,1],[113,1],[214,1],[215,1],[216,1],[218,1],[217,1],[220,1],[219,1],[163,1],[111,1],[107,1],[106,1],[110,1],[267,1],[221,1],[74,1],[222,1],[290,1],[280,1],[121,1],[225,1],[201,1],[227,1],[228,1],[231,1],[229,1],[232,1],[230,1],[298,1],[236,1],[91,1],[291,1],[237,1],[288,1],[238,1],[239,1],[112,1],[109,1],[205,1],[204,1],[292,1],[48,1],[175,1],[226,1],[282,1],[283,1],[281,1],[285,1],[284,1],[241,1],[408,1],[242,1],[312,1],[314,1],[395,1],[455,1],[396,1],[398,1],[399,1],[400,1],[401,1],[403,1],[404,1],[452,1],[405,1],[406,1],[407,1],[448,1],[409,1],[449,1],[410,1],[453,1],[454,1],[411,1],[412,1],[413,1],[414,1],[458,1],[415,1],[416,1],[417,1],[393,1],[457,1],[418,1],[419,1],[420,1],[421,1],[422,1],[446,1],[445,1],[447,1],[456,1],[145,1],[130,1],[147,1],[62,1],[77,1],[392,1],[142,1],[127,1],[424,1],[451,1],[426,1],[425,1],[402,1],[165,1],[202,1],[315,1],[394,1],[450,1],[428,1],[459,1],[423,1],[397,1],[46,1],[243,1],[295,1],[87,1],[244,1],[247,1],[68,1],[248,1],[250,1],[253,1],[257,1],[258,1],[261,1],[263,1],[293,1],[266,1],[427,1],[119,1],[118,1],[146,1],[480,1],[429,1],[431,1],[269,1],[277,1],[300,1],[75,1],[59,1],[131,1],[132,1],[430,1],[490,1],[588,1],[482,1],[302,1],[303,1],[304,1],[305,1],[306,1],[307,1],[301,1],[309,1],[593,1],[308,1],[432,1],[144,1],[76,1],[65,1],[481,1],[164,1],[189,1],[184,1],[190,1],[433,1],[435,1],[602,1],[279,1],[436,1],[128,1],[63,1],[129,1],[64,1],[437,1],[438,1],[601,1],[600,1],[439,1],[203,1],[177,1],[603,1],[604,1],[166,1],[434,1],[612,1],[440,1],[441,1],[442,1],[278,1],[443,1],[444,1],[50,1],[73,1],[170,1],[168,1],[169,1],[49,1],[51,1],[71,1],[55,1],[98,1],[99,1],[198,1],[196,1],[152,1],[116,1],[93,1],[96,1],[123,1],[95,1],[162,1],[92,1],[151,1],[209,1],[210,1],[213,1],[208,1],[157,1],[156,1],[57,1],[240,1],[124,1],[270,1],[271,1],[272,1],[273,1],[150,1],[158,1],[223,1],[117,1],[148,1],[197,1],[153,1],[297,1],[224,1],[274,1],[275,1],[233,1],[234,1],[276,1],[235,1],[100,1],[211,1],[159,1],[94,1],[97,1],[101,1],[103,1],[102,1],[287,1],[154,1],[125,1],[149,1],[115,1],[160,1],[161,1],[114,1],[212,1],[155,1],[313,1],[317,1],[387,1],[318,1],[138,1],[319,1],[320,1],[322,1],[321,1],[323,1],[324,1],[316,1],[136,1],[388,1],[135,1],[325,1],[326,1],[327,1],[328,1],[329,1],[137,1],[330,1],[133,1],[332,1],[333,1],[331,1],[334,1],[335,1],[336,1],[337,1],[339,1],[340,1],[343,1],[342,1],[341,1],[344,1],[345,1],[347,1],[346,1],[348,1],[349,1],[350,1],[351,1],[141,1],[139,1],[352,1],[390,1],[353,1],[354,1],[355,1],[356,1],[357,1],[358,1],[359,1],[360,1],[361,1],[362,1],[134,1],[363,1],[364,1],[365,1],[366,1],[367,1],[368,1],[369,1],[370,1],[371,1],[372,1],[373,1],[374,1],[391,1],[375,1],[338,1],[389,1],[376,1],[377,1],[379,1],[380,1],[378,1],[381,1],[382,1],[383,1],[384,1],[385,1],[386,1],[140,1],[69,1],[54,1],[66,1],[67,1],[254,1],[53,1],[56,1],[70,1],[255,1],[52,1],[58,1],[268,1],[256,1],[89,1],[88,1],[83,1],[84,1],[252,1],[245,1],[251,1],[72,1],[86,1],[90,1],[259,1],[246,1],[78,1],[262,1],[79,1],[80,1],[82,1],[249,1],[81,1],[260,1],[85,1],[265,1],[264,1],[47,1],[60,1],[61,1],[488,1],[489,1],[485,1],[487,1],[486,1],[178,1],[179,1],[185,1],[180,1],[191,1],[181,1],[182,1],[187,1],[186,1],[188,1],[183,1],[173,1],[193,1],[194,1],[174,1],[176,1],[286,1],[463,1],[464,1],[465,1],[466,1],[467,1],[468,1],[469,1],[470,1],[471,1],[472,1],[473,1],[474,1],[475,1],[476,1],[477,1],[478,1],[479,1],[483,1],[484,1],[491,1],[492,1],[493,1],[494,1],[495,1],[496,1],[497,1],[498,1],[499,1],[500,1],[501,1],[502,1],[503,1],[504,1],[505,1],[506,1],[507,1],[508,1],[509,1],[510,1],[511,1],[512,1],[513,1],[514,1],[515,1],[517,1],[518,1],[519,1],[516,1],[520,1],[521,1],[522,1],[523,1],[524,1],[615,1],[580,1],[616,1],[613,1],[525,1],[526,1],[527,1],[528,1],[529,1],[530,1],[531,1],[533,1],[532,1],[534,1],[535,1],[536,1],[537,1],[538,1],[539,1],[540,1],[541,1],[542,1],[543,1],[544,1],[545,1],[546,1],[547,1],[548,1],[549,1],[550,1],[551,1],[552,1],[553,1],[554,1],[555,1],[556,1],[557,1],[558,1],[609,1],[559,1],[560,1],[561,1],[562,1],[563,1],[564,1],[565,1],[566,1],[567,1],[568,1],[569,1],[570,1],[571,1],[572,1],[608,1],[573,1],[574,1],[575,1],[576,1],[577,1],[578,1],[614,1],[579,1],[582,1],[581,1],[584,1],[583,1],[585,1],[586,1],[587,1],[589,1],[590,1],[591,1],[592,1],[594,1],[595,1],[596,1],[611,1],[598,1],[599,1],[610,1],[605,1],[606,1],[597,1],[607,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[126,1],[299,1],[460,1],[310,1]],"arkTSVersion":"ArkTS_1_1","compatibleSdkVersion":20,"constEnumRelateCache":{"/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/kits/@kit.arkui.d.ts":{"/work/openharmony/prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uicontext.d.ts":"e6f8f9c77868e7ed2756dc0c5013846287f6702939ead800ff2802898edb5ab3"}}},"version":"4.9.5"} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo.linter b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo.linter new file mode 100644 index 0000000000000000000000000000000000000000..a288c1a87b08dade42ddb730d4fec7ccdad19d86 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo.linter @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es5.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.base.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/data/rdb/resultset.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.want.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/startabilityparameter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/abilityresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/app/appversioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/moduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/customizedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/applicationinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/app/processinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/elementname.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/basecontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/permissiondef.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.colorspacemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/global/rawfiledescriptor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/global/resource.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.drawabledescriptor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.resourcemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.rpc.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimedia.image.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundleinstaller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/abilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/hapmoduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/app/context.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/elementname.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/connectoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogrequest.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.font.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.mediaquery.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.inspector.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/metadata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/permissiondef.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/pluginbundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/sharedbundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/recoverableapplicationinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/appprovisioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/bundleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/skill.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/extensionabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/applicationinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/abilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/hapmoduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.openlinkoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/appstatedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilitystatedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/processdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/applicationstateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/appforegroundstateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/processinformation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityfirstframestatedata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityfirstframestateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/multiappmode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/runningappclone.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/runningmultiinstanceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/runningmultiappinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilityconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.configurationconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.configuration.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.ability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.contextconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.completionhandler.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.startoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.atomicserviceoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiserviceproxy.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiserviceextensionconnectcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilitystartcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/eventhub.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.rdb.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.dataability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilitylifecyclecallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.environmentcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.applicationstatechangecallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/applicationcontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/context.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiabilitycontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/component/navigation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.observer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.promptaction.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.router.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentutils.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.common2d.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.drawing.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/graphics.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rendernode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/content.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/componentcontent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/framenode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/buildernode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/nodecontroller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/xcomponentnode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/nodecontent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.node.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.measure.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.componentsnapshot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.unifieddatachannel.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.dragcontroller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/extensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/customdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilitystagecontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/formextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/serviceextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/vpnextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autostartupinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autostartupcallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/embeddableuiabilitycontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/photoeditorextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiserviceextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/uiservicehostproxy.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/appserviceextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalinput.pointer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uicontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.featureability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/dataabilityoperation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/dataabilityresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/ability/dataabilityhelper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.ability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.errorcode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationuserinput.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/wantagent/triggerinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantagent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/wantagent/wantagentinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.wantagent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationactionbutton.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationcommondef.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationflags.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationslot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsorting.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationtemplate.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationcontent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsubscribeinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsortingmap.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationsubscriber.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notification.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.notificationsubscribe.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/notification/notificationrequest.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.particleability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/permissions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/security/permissionrequestresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.abilityaccessctrl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityrunninginfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/extensionrunninginfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/abilityforegroundstateobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilitymanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.abilitystage.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.extensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.uiextension.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiextensionhost.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiextensioncontentsession.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.actionextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.apprecovery.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofilltype.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillpopupconfig.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillrect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/pagenodeinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/viewdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/autofillrequest.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autofillextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autofillmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.autostartupmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocessargs.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocess.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocessoptions.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.childprocessmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.datauriutils.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.dialogsession.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/errorobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/loopobserver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.errormanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.wantconstant.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentcontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentdriver.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentexecutor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintentdecorator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.insightintententryexecutor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missionlistener.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missionsnapshot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.missionmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.quickfixmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.serviceextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.shareextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/businessabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.businessabilityrouter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.uripermissionmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appcontrol.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundlemonitor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/bundleresourceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/launcherabilityresourceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.bundleresourcemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.defaultappmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/remoteabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.distributedbundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/dispatchinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/bundlepackinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.freeinstall.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/bundlestatuscallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/launcherabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/shortcutinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.innerbundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.installer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/launcherabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/shortcutinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.launcherbundlemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundlemanager/overlaymoduleinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.overlay.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationresult.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/continuation/continuationextraparams.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.continuation.continuationmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.continuemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/bundle/remoteabilityinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedbundle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuableinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuecallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuedeviceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/continuemissioninfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missioncallbacks.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missiondeviceinfo.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/missionparameter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.distributedmissionmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.package.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.privacymanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.embeddeduiextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startuplistener.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupconfig.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupconfigentry.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startuptask.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.appstartup.startupmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/arkts/@arkts.lang.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/sendablecontext.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.sendablecontextmanager.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.ability.screenlockfilemanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.embeddableuiability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.photoeditorextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.uiserviceextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.shortcutmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.application.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.bundle.appdomainverify.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.appserviceextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/kioskstatus.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.ability.kioskmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/kits/@kit.abilitykit.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.faultlogger.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.hiappevent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hichecker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hidebug.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hilog.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hisysevent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hitracechain.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hitracemeter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.loglibrary.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.hiviewdfx.jsleakwatcher.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/kits/@kit.performanceanalysiskit.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.animation.windowanimationmanager.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.want.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/application/windowextensioncontext.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.application.windowextensionability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicservicenavigation.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/commonmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/alphabetindexermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/blankmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/buttonmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/calendarpickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/checkboxmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/checkboxgroupmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/columnmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/columnsplitmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/countermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/datapanelmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/datepickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/dividermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/formcomponentmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gaugemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gridmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gridcolmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/griditemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/gridrowmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/hyperlinkmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/imageanimatormodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/imagemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/symbolglyphmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/imagespanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/linemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/listmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/listitemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/listitemgroupmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/loadingprogressmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/marqueemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/menumodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/menuitemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navdestinationmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navigationmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navigatormodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/navroutermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/panelmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/pathmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/patternlockmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/polygonmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/polylinemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/progressmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/qrcodemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/radiomodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/ratingmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rectmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/refreshmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/richeditormodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rowmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/rowsplitmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/scrollmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/searchmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/selectmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/shapemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/sidebarcontainermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/slidermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/spanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/stackmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/stepperitemmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/swipermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/tabsmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textareamodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textclockmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textinputmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/textpickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/texttimermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/timepickermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/togglemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/videomodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/waterflowmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/attributeupdater.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/containerspanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/symbolspanmodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/particlemodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/arkui/steppermodifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.modifier.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.subheader.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicservicesearch.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.arcbutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.chip.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.navpushpathhelper.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.chipgroup.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.composelistitem.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.composetitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.counter.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.theme.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.dialog.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.dialogv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.editabletitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.exceptionprompt.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.filter.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.app.form.formbindingdata.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.formmenu.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.gridobjectsortcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.popup.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.progressbutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.progressbuttonv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.segmentbutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.selectionmenu.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.selecttitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.splitlayout.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.swiperefresher.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.tabtitlebar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.toolbar.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.toolbarv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.treeview.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.interstitialdialogaction.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.performancemonitor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.statemanagement.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.shape.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.curves.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicserviceweb.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.devicestatus.draginteraction.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.hdrcapability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.display.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.matrix4.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.pipwindow.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.window.floatingball.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.plugincomponent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.prompt.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screen.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.screenshot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.uiappearance.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.app.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.configuration.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.mediaquery.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.prompt.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@system.router.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arclist.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arcalphabetindexer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arcscrollbar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.foldsplitcontainer.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.fullscreenlaunchcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.atomicservicetabs.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.prefetcher.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.downloadfilebutton.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.innerfullscreenlaunchcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.multinavigation.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.arcslider.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.arcswiper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.subheaderv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.arkui.advanced.segmentbuttonv2.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.atomicservice.halfscreenlaunchcomponent.d.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/kits/@kit.arkui.d.ts","../../../../../../src/main/ets/entryability/entryability.ets","../../../../../../src/main/ets/pages/index.ets","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ability_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/action_sheet.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/alert_dialog.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/alphabet_indexer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/animator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/badge.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/blank.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/bundlestatuscallback.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/button.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/calendar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/calendar_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/canvas.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/checkbox.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/checkboxgroup.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/circle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/column.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/column_split.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.data.uniformtypedescriptor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.multimodalinput.intentioncode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.uieffect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/common_ts_ets_api.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scenepostprocesssettings.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scenetypes.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/sceneresources.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/graphics3d/scenenodes.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/component3d.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/container_span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/content_slot.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/context_menu.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/counter.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/custom_dialog_controller.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/data_panel.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/date_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/divider.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/effect_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ellipse.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/embedded_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/enums.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/featureability.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/flex.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/flow_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/focus.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/folder_stack.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/for_each.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/form_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/form_link.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/gauge.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/gesture.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/global.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/griditem.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid_col.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid_container.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/grid_row.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/hyperlink.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image_animator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image_common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/image_span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/lazy_for_each.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/lazy_grid_layout.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/line.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/list.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/list_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/list_item_group.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/loading_progress.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/matrix2d.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/marquee.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/media_cached_image.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/menu.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/menu_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/menu_item_group.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_destination.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/nav_router.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigation.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/navigator.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/node_container.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/page_transition.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/panel.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/particle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/paste_button.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/path.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/pattern_lock.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/plugin_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/polygon.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/polyline.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/progress.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/qrcode.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/radio.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rating.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rect.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/refresh.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/relative_container.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/repeat.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rich_editor.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/rich_text.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/root_scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/row.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/row_split.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/save_button.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/screen.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/scroll.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/scroll_bar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/search.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/security_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/select.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/shape.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/slider.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/stack.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/state_management.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/stepper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/stepper_item.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/swiper.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/indicatorcomponent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/symbolglyph.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/symbol_span.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/tabs.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/tab_content.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_area.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_clock.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.graphics.text.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_common.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_input.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/text_timer.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.intl.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/time_picker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/toggle.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/toolbar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/with_theme.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/units.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/video.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cryptoframework.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.security.cert.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.print.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.neterrorlist.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.web.webview.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/web.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/window_scene.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/xcomponent.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/sidebar.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/remote_window.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/water_flow.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/api/@ohos.worker.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/isolated_component.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/styled_string.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/index-full.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/inspector.d.ts","../../../../../../../../../../../../../../../prebuilts/ohos-sdk/linux/20/ets/build-tools/ets-loader/declarations/location_button.d.ts"],"fileInfos":[{"version":"be8b901880718680b6c067fd8083bd5b04cde401c1e1123823e3068bb2e0d282","affectsGlobalScope":true},"e8d2e50f9e8fdd312d31f97571b4c7295b8f29f7f8363498edae2a9eb113ee36","4b1854aec637e8e041eff02899e16fd3c0c78685c622336aadfd67e6604bbe1b","d6f7d47355a0167969e9a8eedfb0994f21e038d360965ec06c30f6871038900b","4735756aff7c5857de387f321633f272e2daba4950c427ab200de954340c7c13","13dfb22c1b46f9858b19fc7df54674146f3d174ccd35f0e02e8d05a3026b9ba8","33d21bcca0f7b054d0d0d402125f547c9ac77782c2df301de314143f08e81406","80510205fb587019e1ad42bfbc046d4f55f3c5a1c8b3debca7d6fe0adc93959f",{"version":"276144a8254bed55adae6f0646c37a2cd11575ac2cbc679bf7ac0419c443fd58","affectsGlobalScope":true},{"version":"3523038578cadf637fdce58f06018e144fd5b26c12e3f9c1cef14cdf92ca3d20","affectsGlobalScope":true},{"version":"28065193ddf88bf697915b9236d2d00a27e85726563e88474f166790376e10d8","affectsGlobalScope":true},{"version":"511c964513d7c2f72556554cdeb960b4f0445990d11080297a97cc7b5fa1bb68","affectsGlobalScope":true},{"version":"725daac09ec6eb9086c2bea6bbdf6d6ab2a6f49d686656c6021a4da0415fe31f","affectsGlobalScope":true},{"version":"21574b67bbedcb39a6efa00ca47e5b9402946a4d4e890abd5b51d3fd371819ba","affectsGlobalScope":true},{"version":"2415a2b1a4a521594b9837316ae3950b0c0c2f8b689defd358986bf3e263e904","affectsGlobalScope":true},{"version":"e5d8d715990d96a37f3521a3f1460679507b261eec1b42dc84d4de835997b794","affectsGlobalScope":true},{"version":"93fa2a84417c65ab8ed121a0b84536312e00a11cbf45b0006a75324d00b176d2","affectsGlobalScope":true},{"version":"a003a6051b48dc64eaa8ad83789e4c2a540f3482bed821053b6770969bd598fb","affectsGlobalScope":true},{"version":"e90857fa86cecc3bc964a2d7db9d95a0c406bebfadeb4853a01a0079936f12f7","affectsGlobalScope":true},{"version":"8bbb03589e48f10b49996064f35256e858d205dcb364428fb4cc045061b1d786","affectsGlobalScope":true},{"version":"5044747370afee4b4c247e8a14c2969d245bbcf8396295dc5a60c659d796a71f","affectsGlobalScope":true},{"version":"8e4921934f4bec04df1bee5762a8f4ad9213f0dab33ea10c5bb1ba1201070c6a","affectsGlobalScope":true},{"version":"a894424c7058bcc77c1a3c92fe289c0ff93792e583e064c683d021879479f7b8","affectsGlobalScope":true},{"version":"8f03386d697248c5d356fd53f2729b920ea124cd1414a6c22de03c5d24729277","affectsGlobalScope":true},{"version":"21ac76354ecc1324ee2e31ac5fcebfa91b1b6beb3e8c3fe6f3988538e9629c73","affectsGlobalScope":true},{"version":"ecc058373716a6bb19a4492ac553b61e3ebc0eb657407b6ea62337316885b64b","affectsGlobalScope":true},{"version":"fe7acdc1039eca904399190766d1c8766b7d2621413f972c8542dddd69612097","affectsGlobalScope":true},{"version":"c25aa843b930662d62f0e853dd1f347d08b66cdec09bd760151d4ba6ce220fe6","affectsGlobalScope":true},{"version":"3e47477f297e4fa0d556c40a872c2c45bddefa487fd054bf1f80bceb527a682b","affectsGlobalScope":true},{"version":"a902be9f4116b449dbac07ffe3f4d69abb664f8eddfaeb892225612469213788","affectsGlobalScope":true},{"version":"155d8d1e367e05af5e5708a860825785f00eabae01744cf7bc569664301415a4","affectsGlobalScope":true},{"version":"5b30b81cdeb239772daf44e6c0d5bf6adec9dbf8d534ed25c9a0e8a43b9abfff","affectsGlobalScope":true},{"version":"cdb77abf1220d79a20508bbcfddf21f0437ea8ef5939ba46f999c4987061baab","affectsGlobalScope":true},{"version":"62e02a2f5889850ed658dfde861b2ba84fb22f3663ea3b2e2f7fb3dcd1813431","affectsGlobalScope":true},{"version":"357921f26d612a4c5ac9896340e6a2beffcaf889ff5cdfcc742e9af804d1a448","affectsGlobalScope":true},{"version":"d836a4258d6b5ee12054b802002d7c9c5eb6a1adb6a654f0ee9429cbda03e1a0","affectsGlobalScope":true},{"version":"c021bff90eb33d29edfde16c9b861097bbf99aa290726d0d0ac65330aa7be85a","affectsGlobalScope":true},{"version":"1c4e64dc374ea5922d7632a52b167187ba7c7e35b34d3c1e22625be66ca1576d","affectsGlobalScope":true},{"version":"cd1bebc4db8fb52c5618ecad3f511f62c78921451c198220c5b2ee5610b4d7b9","affectsGlobalScope":true},{"version":"fb60e7c9de1306648f865b4c8ef76b7376731af3955b69551004ad3848fb8f4c","affectsGlobalScope":true},{"version":"18d23591bba5678cf57ef139e1a3daad8017b26ad6612c8c34d6fa39044b245f","affectsGlobalScope":true},{"version":"868df11ccdabb6de564f70b68aa6b379a243ef32c8f6ee6dc71056a3dd54578a","affectsGlobalScope":true},{"version":"cebef4c7f9b6afb02cd08e7288fab05d0be3e3c898c720775b8aa286e9f7cfed","affectsGlobalScope":true},{"version":"7e3c49afe9bf537f68ce2487d7996c6e5c2350c0f250939726add1efcb1bcf01","affectsGlobalScope":true},{"version":"c7673e88666f933b0d007e82e42b60e85cf606ec247033e8ee5ab5940e4be206","affectsGlobalScope":true},"114a0d4df9d1ee7fe823424460088ad620decc4359516e6143f9a1f49d4ad1a3","1b48b2e2be1f20ff327943afb2b33e4724bc63587f23bd7edc4209c415a9041c","734f6e14694c64bd97f1043a47397565d098937d35301b18c8670612a4e159cf","8e0622fd44e6fc146b3b431cd5433449bcc7660b555e6e6175926a5665353ad4","0cc5c94908b284934cc25e6bd28a612650b9644d64ce21248732f8ad95625cd5","0fe10efa53a287daaccba7fa70bbf20820ead1cd0c011ad59248f04cea5f3534","6534aeb84fdb78bdf07dd551c70e5f859c28a08b00507446b1043c20526feb9d","59528c8bb0cd15a4e2b544547cd324bb3a1153ebd52beb99c1f36f5437bca908","7542f446bc5bc9148a8443618064cdd94ba23293716dc839ea17e79dee318b45","3a5f3b923aa0dbf9d743ee99961763d38576b11ba81dbcd1b90c046f52d6071e","53b8801feda0f792b5959291f0e760ed1e013a78fb4e22072b663a76eb47a368","a8e07c1a2f8475fbab17dda22a5f51e2d26fbc39603cf3b18f9c0ae2b519e55e","b165c286dd5008c086949aafc593a6e216d96b17421c007af34b09741e132460","2167184e6d17755ab77268889020dfaef0c1de1a93f85ac7f91499a9f65d9029","1598ee8f3142f70e7f16845796722d65d483fc39b657f465a8c0bdef4585dc42","ff3b80b87f5c428ff03782f0036d2056e1f371b828f5fd1397064730c35c1c2a","41ceb60605d3dfa3d0be98d489f0fecc0a98bcc198b1b69733834ae4d94c3ccf","b16c3a6ac93cad023707a13e62ea05309b949966d56892827601d8065e8956da","1b27e1284efe00273d0cf76c3f500e96c5ad288dee06e1ef06dec81c40fff4ba","8e4f57a67be7ada1d4e649183d0fc2a136a11d7b96ed2a812a89465901f2fd82","e440c7066c19e60990f65eee96ecd5fe22cebf754376c0732a29ee4a11cfd2a4","79465a9b77dadae7e2af7d9ff548207d4ee6e44989e07cc75124661e4abe84ee","8a5e6d322a0e6f82ad799a856f16de541e091b795eb1b4f05e159b8c6bfd2077","f5c03ad15eee48dedd7bdef771d50369c70fa70b10523ab777e925a4c90dbbeb","e79dae84c8e3d36f8f47f2da99a824ebee5674af266cbf274355e1b058fb219b","8c804ac09102ae81cb3a5bd3698b0bbea4ee98bcf1c67ea28daf963e01743cc1","41c21e94cc18d83501abacdaf56f29ffa89e64a6dd5449580a53f7c834d487fc","5d1e8f9c86780f23962980d995e80f70cb90173100c4f3f1280c651c6dc22094","2238892eef3efdeaa60f96d62943897ca8c945dd6fb230ce71d2d9ce1989c30d","a0577605aac5da0b747b491593a469584f0005416e52dce21fbb970abcd115e2","0c56efabf3d886334e097e749e84bec2a40ab265089fb445e8cb88c47ef2e2b4","95fdeb811613fe4b7db3766ace5232f7b0830a84bc4eeb5db6fa7c327d1fbbfe","0885aa6e52133b13da14bd23c6e2923eb41f6587004d566b7fdcd643003f85dd","ceea5165733d80827e7a55d977c12e856d74e21aa5f0ff1feb49cbb9588bb540","050fe93cdb38916adc9b7d95d0085276f551b14e9482d6424fb4c72351e1d12b","678c852113057aeb50ed1fc344151e3e4b8e903e2d85c1a1806242c40d5ebe51","7f4971301fde2c2cf2175270ff152ad699d50fa7f3dbd47279efe5f3ca476c17","135143374c0c1346c5a1ffe1a3ed6152ea47369776f4e05e2b093f9660c5a11a","845873c4c1a98f3d9f84ae7bf5976211eadb60a1f6877ecfcd6760efe48b7e51","5c5627008db0c037c148380ab9ed21004ad2e33df3c693a5f750a84fdb182c34","90e2871e53f616739841e476f3054c5ae40255095aa2e7459222c4dc15e838b0","7a99dd486eb23a0fc3f0151fc53192497924d6470523d81d3b65d7151dae2b38","6498f86f7d7ee781d6ce43ff336bf4ad3b9c16bc727fdee114580a60ef3ad397","b2b5603060e1d6b2982cb5670e4c9f2864b185276e63bbc903d3a9c17ecdbfb0","783616dbe6f5eb8691d1c390e7b089cbadafa32bd00b0c70c04d41407a761d69","1ee4140494ebdaa4971b592cb59603953c4f613a6707069292e04006a41eb4dd","0cc349911f34825338f1c395dc96b64716cf25bcf5b5102d97385dcbb5590b5a","7e56809720e87c8bb10cedd0610fdd18c15b5575a62180b62e49c8b3720a9928","d720df61b68e1ac759fb8ee19a85b2d64d5fadc4f0f4a8c8e7b55df67a3f1775","acba4d1a0998ac6561b9a1aa15c6b1125f769f046cb38d325856a40b768cdaca","0e40c1a6790e0addbb90805e725440079712c91dd578c70fb6129d18f7fa9a9b","21930bd35ce5693ef61bd468014596dfaa5bd6b6c2d4f59f60844fac0eee384d","885699c517b8059b5a310e6c1e1365a1af0f37c89306fdb194e858bb6ad556fe","ecde85c883c841fb8069b1b1ab7d43ea56d55a66a8f123b1a73c6c139753df7a","9b4db77a88701419da97fabd73df38974efa8903e7ece164191f7b37b058eb22","0c17da2a16320aad741f4417bbf9f1d190e46de0c4ce7b03b339af7619f67beb","301779b2a8d0ceda5365e955f8828f65aa8f624789dcbd936e383015b48bab7f","e4b22054a008f8dc65d6a45ea27dcbf9a5aa3f484fd3fcdb86f36d8f38d5f48b","754e6ab5ab5dc6adf6e60c3a1d84257d226b672ae1e85b49253374dbcb5208f6","a6bdf6b79fdb3e0d9071c4b881f3ddfcf989db936115ea0940c5274ec9bda234","59076a01123585639ac35ad1ba8fd1acceee2335fe1ffcbf032d38925e47bce1","16820b43a1c139ef435c5dad03ec2a7f91c6e0fed732691ecba152ed1b44cd52","2478abad18abd3df6315d031c62f01f83a91caa634f35b17465df224608a8ac0","7c8b714b73a86f44112ff9c9ce9ba4d57b55e5b16853ceb31b757aff6cd5d237","0c98893d17a23b9b9a68328528d408ac9141b4d4e3fb5b2b38e6895c4f98aaed","a06221608f5d45845214ee4991743c1e7a6c91fa2addd3665d618abd1f940be1","1e60fd5cd37c33d064917e9b6202739ed7ad2b655c8db4c030aaf08cc1de5589","a3b1605aa96882b0e5766013858d9dd73df8423fcf0d8aa635a12bed07452f09","ee67d9b87041e39ed225a1c5e815d839985dfc9b6e12af1c96adef07b37251c7","c585cd71cd521f4373ff211223d2487faf3a467037b8e6ab0fa112551492b4c8","105a88bf7880674f76b13a3100c47f22f72b2cbe30f42115bac1d45a772bd4a4","c1bad72c3cd45e059aeb4dbf63540a69ffb58baac68f24d788f763f65aaedc59","77257e293740a1da7851793e3c7891ff9866a2c12ab6de588b5cbfd7e114763e","a513dc04b4779feec9e641a5218d9ba373779af667afc2147c81598ad7e58353","cfb4b1935c9fe3cde417d2732467e6a6a3568d18dec7ae4e7a66986d1993af7d","486609fe99f6a3f875a7ec02440f1442f9f70d1b960b25e487d7172fff2145e0","7067a4950c4dfa1282ac4b2af9ea9d6f654ab9ca4874030b0ce08eba113bb788","158d2327507e87febe9d9c300240930378b1abab2b6e6ca8defc9033f6c00803","f8e0de937ef0c85b9b885a4ac3349b8340d021192e214df4781c0926091f19f1","d998ebc2f8883409c3c1644f8bafaf4a0395a6862bb62fa47ffe43b014e72305",{"version":"9ee9891b3c8989c9dc4f9c739cc1480d7570db26343b75a86aa838090269ef23","affectsGlobalScope":true},"43ab492109878d087709e2af999e8ab035a40bd3468d873bac62f2d10e9ab814","353376bae901ae62a7996a45c3b0a7564ce5aab73ee5db49cb96aaa5d539362c","ec48c0499e9491a2b3549d02c1847bec623fe5bc88660c0a0f6466b52333c22c","dbb741bd0585ce01508978a4545f4a8cbe162845a0978ffe708c4edbe80396a6","f83ee958f4e51ff58ec869784ca5403f66e111488d80ad8ed55e43fe96e79546","e3f8c5af5ba2428b01ede95d218ba1dda5dbdfa3af477ecfb890cdca5977f6f1","996753b4604c6af1d5466837880a515708754683fa0569fc87305fc941bd103d","28a0e9a5d3d7580d8f895175542c3dd4340b9bde92a2b6f3e878d9206820e40f","16d269cca8715b0ca8b907859f6cce45f230f1b55a6429f267e4c5a8aa7f9d17","d7ad828b513b07e5194c7be5fd1fd8339150725298331b30ce0a4f93664bed55","fbcc37c2436bead20140d294ca70ca3410caf7117da4f602bd99658b88e43bb5","41640189084bcc53ee3ed1f302205899608319ec9fb26099b7f2f8206e64e2ba","5799a9c76c05db3522391375e5acda31de9e8066f92863c68d7a1cfd9614b665","53a5c6a0ecdf633bea0a5ffdaeb9425b01c350ece3ef11b53301eb08bd9dbbf8","60eb05d3ac100e163b0256a2fa81373d20c442b298b314f67087d7d4e7ef0da9","a480bb40ed9139c1886999772d83f2d46d4cbf86449af3c606dcca1dbc38d087","a8516b44218cb7e5e4badfc63301100b03412ad0f32b36bc29dd5f957874a783","2fd4536b789dffa504fa1060d29618e0898f63635fc5b6ac8f8eaacc0e01a435","c43074bae9acb448990469dee5260ae37f49142def0904191a4eb413c8be8d13","f8c3d909d650cbb9c951d8192eb9b1d107c431bf7813c2c02f55d1a19a757d92","9b2ca987a7467f455d8c400bb707e88ed04946cc7b7fe35fa1f3aa5857f680e0","ef2a7b4201827194eb706b950ef40889d0870f402e610cb096d86f0bb2d3bfda","16e1cd7282285183d0dd67a4a3b6ce7e9864de9c3aea1c4fe0d2496517521c50","a18f4f7162afbefb920ab97eb79c886badef0c12e2c0adc1778e5236301b33c5","01ca87c03d55631fd380b00103cc9b711a3aa9dd0f245bd077aa773fdd6adced","e15a16903c5239648c795bc68acdc833f6ae58daf7cbabad085e372ad2396a45","610031cec5c2530332b133b5a64418f3682652d1cc5adc120aee11edd8238254","b93b13225a47159c26011fc4cd2d0be60d4986be127c887de1b17fa8a0e40337","6e9801e6ddf7c3eeeda628c984737cadcfa7d075866ec59d0a66d0443aa3fd58","91a141deb1ae9e934627a5cc2f48861ad3a4162b16396867b8f6e533e760648a","123d55661bf39c9f88362f3f25c834e7fedf1538244b410293078e8c02c0c829","25d084c26f6956c51674a81f67ec88a0d6393e2582199243f06435ee0c2a88bb","bc6faa40ca044b14b715e85fef1ae84e35bd773a5aaad6b78f48d73da135e7b3","efbba0f807788d67fae730c94c5c0f412e099c4a62dbd28ba3fbead308e2b891","ac4eb8ccb507661633b9e0b700283d7d9ef214c01beae76fe329def1740f8655","67819e5de1ef35de58abe6fcd4b48d4a9cbc9e7d3d72bdbef84366e06f8eacbd","743615d8959d057c5fea280d5ba008c941d57459458e43daf426469f859e0c29","7adcf9ed168575450c990db43af6cbc6b1f9ca4e8222d3798bce2c96614ce7ce","e6f8f9c77868e7ed2756dc0c5013846287f6702939ead800ff2802898edb5ab3","cf3394c5b596894b30eeb4c6efbfe7d43760deb61341e979851a42a8d5659fe9","d680d4fbc41e96559a28e9125ad4d59ff396bd63631a684ca37d37908868ca6e","383f35282369bbe076f1203bb8db614279bcdf69d3997a7ed8cd02b885aabcc9","64322c0908a6e5cce21f118b77e1bfa46ea39abb05fea77bb9369705e3b8cf47","97e9592d53be761c186124ada0363ffcf29efd028772f317e252e31edee3f84d","d09cc9b02290489a11a10dc890f257339d1f44ee18f878a5cce93d4dc7afa02b","93dcf8bc5ab37927c8124c865a0785d538043fcdd26c85155ecfc3315ba38d18","550ac65c6accb7503d008c202c543d2e45dd485489185bee532e5832394be213","5fcf84eded0ee0f179690488c5c588c6739cd85faf173f0bb91c42b09cf9b291","de3f6f674302dc918c2d55dee449b5592b3b488fcf4712f2b6f6bd396eb9dc4d","e1fedabb13b9e83a711428cdb06b87f2eda423420cfac8c53ad7be8a569090e1","0d6fe2b77fbf134cfabfcca2c7d7bcbe5825f61aff487e6726584f4ba604b0c9","3bd6d1ebcd351252822879e08c5613956c428361cf77b9239f0c06b5c9f53554","a29822911a18f2ca475fd5ca72d74d2d3a4ec017171a7a1c0611919cf366e312","8dada6b127999d59a993ddbe4b856ff1698eb3e4ce9a5972b865073cd0f197a4","e455cc3d08750d3c3a9487c40797be8126bcb1feb1c28f01861285fd48978f89","5240b6959850f4ec58875d2a1db2633faa6f8ed35e75c2d0de64a524c7fcafc8","9a6a4a914c327ba4bc10b3ac7a1a0c5338138e32de6ed07ca5a29822a078fd4c","2f14a1db6fad4179c0225ba3bb2c5c928a483a6611bdfb7a63085258e0fe64e6","07711ae4c5fe6e2de94b7d306b2b6fcfb9c9113296089fe8c87b62f4593f5c3b","2e7e717ed6c912ad95ce23bb673d322760dbce616f43ceb9ac4bb6f7bc67a8de","544c3b6f3c93eb5dc022069ea98f78bbef8795031375d4b133cd2598234e08fd","967aab48934337426ac2c4471f0377aa74f5299c141fc1f6711d06ed09530861","f9a79b7f7b570277f70adca994260509d640ac2addcdaeafbe4a538f9dcbfd09","d8c1480dd116695f48dee789bf2b70a05ed5241d1d7834110f53747c5c9ff022","cf83ce8b02b9f4860743ebe72aee1e1b19167be791a55a88d67333edf32c12f2","565b1449b1dc37539d4ba2e0193a4a73c59cd072d035bdd4e3637410810161dc","5790411f7d7d27d3abf7370a399f4f4e7b23195bc2d2e125074c794d31454a16","a1bd47140ce25587992c80684a40da4196be462de1108238c831a20331f4b118","cb46296e32cd5079447688d3eae970509209f6bdeebcd5fa3c51e68fcff1b3a4","10b8255e393b59cbc7d4941d2c2d433b05f836fa51986f5ad6c0614bb00d77a2","33863627013943f5eae09fed79a6c20f29f51480de274d7eccb82ad16c1430d8","333cf561f902209e0c65334d4321a9932980f5fb626fe6565d41b63add1b1e3e","d276350becf2c472e770baba0a53f78587c0ef6fae03263a53358cba9e054b0f","ef7a639115957399d079b58d91bbce24e3a4e9bdc3fb11991cdfee14aa08f3e0","a53902b5aaf0d627fd7583337716a35af64b30361720175efd3d7b5d200e18ca","e86b3ed41e0f5ebe7a708dfed10352b80f58b840b54c2ea4253ec5f188560919","63242dbb1afa86b412c2c943a40d14a629b72fb141050ffb7bda08428e7e0bb8","384b2bf0df62f10d3dbd1d8d10bd100dd4bc79604f6553f537ba4b4f13dd3e4e","ff7425092ac5f3133521b144d37291444913e5fce6213b83459d286a2350d70f","88c2298e44e20c3136ce548e1c86b0c03e4fbd7653c2d96a0c284c48892c59f9","094436082008689d4b2d33bbef344e5c0fc72d706e4ffc5328f635e7396348f6","c319a1856a796fe3ca62edebed75504fea71bf75902897f1267c9989ca837b48","12f982ee9f348f7726f00745345ebc864bdd7411c44daf492483cd3346b1f2dd","1cf80da27152935181cf2dc6758301d3f19c16560a0f4b3b514d8f25034ab31e","ab34b423206e93f99b9db476b1f362b864044e5f9ed88d71dffa372815e8f94d","6cef8e9e926eeb88383106098ef3b654e3807068a716a43d684a1dc51bdaff43","d5af63e09643c2229940268038c812a9808bab6c2a06abb675043595b2a6922e","047277fabf0c7c861f064b2ab2d121e9281793c2a2faa22c811611e1c8fee470","44b6a75d86db6e0bdd3f0d01a6d66b1d5d62ba2d82f0a275af60fb7275017635","c95377bfded73bac96169bfd8d4d3dfb7bccdd1673148638efced75dd783a9eb","0a73da2f9a2360bd7514d3a07ea97064a3bcb0433ff6434698028671054e12a8","cfffd4fe37ec1640e8cf1f184e53cb5b9159f354de8cd2caddc1ae961004ead8","17a4c0fc8fcea72c48e8026612a64790188f1cd116547d02bae0fc0d78542cd4","6785f974f4335c881eb81d872e8abea8a13bd23f9778bc4567bb7b28cd17b646","f6205ac45949bb1745a0a645cd993e339713e22ea4817b4bbeb3a86c424cf25f","d69e798de3f0d6fd83cd3aed9f46386b4d5d68657eaf84464ab36203e11aa48e","4751093bf8fe095237caa95568fc75622e08808ad7f17f4dd30753bbf843f273","9301cf2b421dcedabbfc3add38af2ed5bb8fa4362f0aade9499987b51fd338b6","715625042ff68948b6a6d55d533351702d0a7b79f21a0f16686ef7bf07e33fdb","738dc8ac3328660d80501336452c51392df2cd6df9fb9ec0090c6d32eb19e8f7","522a743447fcf539140079f42fe00faa40abbcb2c36453bef3ac67406e7eaac4","7711bcbe27892aeb39f0b048e840b87243a3e1d7977827ebd4320343bc4c2c21","5981129a9699302da81caa5c90f5612df3945776378f3a5be3ace5e1641b20f5","52db5751a49819c0110c0af57564c2081cce12312f2bac482e7190dff3fbe64e","070bb8456cf9a8f65eb6ea1c3a390afb2f5426552c0c6662c6ab984d0820406d","c2bc89af9147c56102e1aacdea4da8afe41fd3ab5a5123e052ba7add52a11b69","b071c15b3f17b96864024801d8bb40592b882ee6af02aed5cb4de4e8ce3c3ad5","0c4e5ec8d9b5b5b1f14ff00b63984b812594a56d458204f01edb2fc4981d8dea","e489bdc329be98b8f68a923e4b554f8bd616b2558982c77d09fb6784091b068a","eb8f901c9ef0a01033e46fdfd1a6188d598868667d7a5cf51f9d3b24dfcdc1ab","fc4748ef48770134380c37b3d96751dadc85311470c7094f0d6f6dfeb6e36293","4fae2eee74e0143252ffc4aa9678b4c68096a7269fab33fa93449dd31f101094","54768cbe156ed3d648ffdcb2165c5424efa0ead8bb470fa78c6e7c8e46858bcd","f64cb8e33998dfbff5d2494e3ad26be84106014961d66b6c6b1c136bb269766f","ee07163b003a31858773a6fd3a1b19e10f0550560b9dd3add4a25d0196ceb22d","87154fc805ab0d25d3de72c35ba3c741e559cfca34245a95d22e7f3500a6bf3f","1f204854548b39f8a2c686d0ae4894bfcf4efb91627090b4be8dec70280e1c90","6b76137c1f2eb9aedbb83ae0b600e11181e461e6d09a98197f1379a55c3c8ecf","767d932bf78d1e613bfb4307e698e54dad618a3f2b0f119a983d64d503695cb0","a2ef18090b3a99985ab85c21941e34f72875c607fde4df186bf1f010ecd3f186","96982678047b3030ac02779085f0f4da756722fe3dd1abf73ac2f7abfd28b7ac","c018a7d6ec5c55b591483b4681bbc6d3b5e1a8823990c8b5722cf5dc4ae46c61","5e80c90b49d9c0dfea5b87af19bfdc399275f82a907c21c2deb95e3119af88fd","e54adf25101863a2bff7e5278ce0bd39740c1a982d7e7a593ed78befd41f4f47","6af65b44f9b47c1fa444f3ea1b3f71adbbe00fbdba936f36181bd80e12d81bf0","e004ea566e419175d5d70e18f31791a6f66d6357a168bff60fb156f56240eba5","09d63d3f38dcff440e6fbc80ca1cca61dc02d12670eb9f44f69ed804096bec80","e4a6cac57a47a95c539288c91fef8b073f54b38260f1dc3a0b14949d6500d47d","2edf0c9c6315ad9857ac17468220e8728978ef4e35b65f723c0dfceee66d6bc1","947263880cef2ef9f6d6a6baa95e883c82a514b452e99316e1dd6f5ca1cff8e5","564029090deef87174fa7697d120f35503be38598c7cb568d3d43de22d9fc9c1","cc6a6f4152be9dded455a9529a3cdad4fab7edcb8a884b2de75ad63214cccc98","c73df8fb77e12bbcfdb804d894227eb69f6b4fd829a9930ae23dd28fc799c798","01decde48036019bee78cb63108faf884b4efc80bb042c719ddd9c3c5c038dba","11b74426ed7c26be01c43cb065d6758ceef4cc3443f5439271793c38a652d411","083952a1513abb0eed9269144a9c384083c252688c1e01cd3b4c81f077377183","7c2a38194e145f88e0920e549511bdc41230fcfa52b1a56658cbaf4652a008c6","febf0f0cf0ffb1ac0ac465078bd0bf970c6f3e3ef2c1581f65aabf6b6168fefc","b47c7685ee6994b986a01f801b2d21201c90b16f67dfe64a2615dadb72c74181","95b713da82331dffe540ec684f727ede96fa54b5d495a87effaed254066ed398","431bd43eaf61359704826212496b643541e942c2d04dbd6d9c7f02e14bdc6dd0","c9785ffe38a87862a21fb8ec28ffeca0f43e487b7b10e1339c4cb2c94b04d9ee","dd2395e38a3e0784626f8b55868b483294451880a82100c7f7384f27b0b9a7f5","6684c914fa84771ebbe49e855c3013cb2c3ef317fd43fd20e16a3303b9286952","4e9bf661056b55f2040870294da1b4be5a621e8db6bc1bf8a5b7162ba2c9c513","26c1335fbe7de0bc2805a481b2ac82e58ef4c0166966c87f5c812ece1858acc0","2137c69ca6cf9e6482bb6d6909f08da62e031d18824795bfb98af901832ab21c","3c9eb94208017f40160b628eb8dffd7e20b2331318d064741e5cef5d82a20c00","861003cb523b7a2e4eb8eaad7a82b5b0235e4d7b53a09f355027b7330c7cc195","133ed480efb3f3681fcdfb949200b9cf65e4860df38fb864a890fc0214e2cfa4","6a5ce322d33254f0bb061d384ad7282687325afcd67577b82c63115535639b3d","544675ae1245867a712986d5caaa4d95e1c6c0dea7e8173d79225c94836f197d","342151d9e69d3ab7d873244aebf148bc2b5bef1cf9d0ad8740caa458c8a88e3d","7be9a0481de8b4d7e662a21a1d5fa4eb73f99d0377954ddb8e449c157b6bb268","7b570dd41fd88b817707922b11d62e7d28d0406233c7c0de03ba1c92943cede4","bcf9c2036656cfe5a8da239355dc11b93ff58805f4403173930f138a453de890","28497786e32552eb0aba2b683876ff80527206c1330e9d1f29c593ee4f6d0b52","1ab5b3008ef810348739ded40580a4e08431699223cccd049e914a1b467a7e5b","5c425f34b72ea3a36729e02b98db311a260ada159138661f977e1e0a5ec9e788","463d2e36bf717928352f0dc4ed67e2878dd9eec6738e906e19dc4619d3aee591","19ec69bb72e3b6e4214a11632f8ecb8b51bb11e4321be690c6e1719a777457f2","cfaf707b9d1f4c2e10d6cf13ae5cd1da86d9123f40387d189deb5697b174488a","5707a4e0f082e4f42fbf80040aef3b246834c74cc66dd841fbec9c991ef1381b","1e0f707f5846aac727deb23dfc1bfe8f8763384f7f6af4949a31a78a388c7c12","475459f9a3a3f8d50d92cf52bce42b8e46d99e8bccb50e1ce4498f817444705d","01878ab57b73f085fd5d10f53136dd352481464fcde6c4aba4af1383e3eb7277","4ed97228560a40461cc02ecc6156a292f11864218fc2af813d4dbb07735bdb7f","3807790aa6a582d455313673d4e5caefd7da35c7457f889597911a39f3e3bcc2","e032b562295cb85207bdec5cdb20a9b3be593b57560f3bc647cf9989c4b13613","2c58e9a38a682574bd46121070a9bc1d49b6d84d7e4356c73407447d0515baae","458412be4bc1685d53ccb03d3a3f124ccafb8733b12ccbeab0e3ee260df48c76","6fb453602a5297bc1183afc9ce5bec12410e0fb16a1b41f51eb1904b4c2e606b","4493f7be5364cac2bf9ea5d93e7011490f635970c435ad4eea4ede2b1e1dc776","689c7289b75a804f2ccf8b5c893ca4ad5e871fc255ceb70f19f1a0f801d541fe","4b6b4882af64f69643bdcaddfe76199caec4e16262c148bb78ff9dc646153a98","aaba5287e9e9e213154f94c22ce67bfdb3b294df5e6ec787807cc87719ea567d","32acca3a5b0f58c3852d0a14a03e183972aeebd45f0c830303301deda1997c7b","a7201009d7c4e1947cf14e2e0f7b28382a71d15923c91a4f5f92479ee2e13b8a","570d80abf9c591781e425cdf67bb85a6cde5238cc43909791f2aa85b521cfd1c","06df1301b2b94943cb02b337371e3d070e8011c05f301f3919669f21a5c9909d","1eb62848225aabe250f6033de39d1a347fe14667eab4098bb91e730af57bee85","414b0a25ec34067ea2d14f252010e85f3a4fcaf3b0959cb833f511110f141e81","28d00ecc2dd7fd32034cb0e0b4f100ee31f4d2f4140084c00ec1e8e2f2bf8352","de3e710c23df64ce88709c0a533e9b391139248ebddabcf6fe7492033a108f4d","ae660d72657e7bba6f04c2dd50becfc585f6ccdbf8782de358944535401025ca","5e8e0e9e71339691a133e1f9f3f317e5f4d9fdc655988f561a3b300aa85fb863","33f0835bf957eeceac93cc1956e2d73c2775757916a81dc15a3197e5bf46a5ef","b5f9007616d3076944151f56fe4e61eb3127a14d9c4efda7c8c57c18aff74a8f","e39a1cff7424a5c85f748da77fe12d15c1db5fc406c8d138f97dd8746c242a45","0af6cf0780ce04d207f70357261c2f7c3a83d5a479332376c0c53a378caaf946","2aad3afc028b4e79612431c4bc02985f6ccff51defacd5a22de40c0db06ab293","f330a746552555f198be6228c272b2c9a9e2f44c9de2dc21f910d60b1e162e02","4c130a63d8f747d9983a117623f7c23535eb6d58f226558712777bb37490b6c4","561b665854bed5dcc46cb12cf2e71c900f1721c8ec80ade351d6b9ffecc40370","cba1f7ab4520cdcc8031b98ca7ee693ab5a75af673c4678571ae6659bfa751e1","eb8dc68cf0d3686c114a36b397c2cd57e502ce727b5ac0b3bcd98c379c5eb969","1da2b990f5cd5a315a866191df969216927c3314de00abe49d51d673c6231cc5","dbafe11fa4c83192ef5eeaa3d8500daddd08bcad30fe10eb5e4c832cf1bf9d54","385f6390a15a5a3607f87ffb3b73ec0e502ced2439bcc1aa911d40043f9c70d1","ccf7559a5cb23cd80972446d722876e5dab2d27ab5556df0fd020b15b9e4131e","01d235b20217422fe8e7cb085eb4ce65170b3718c8c81d6fa1e78c347ff9897b","75fc489be65ac52a3a07b707ef2eb56c40f07b66821119baf12e7a484b4f7e91","c360268fb197f568e9d53abcfd9007a7e73d517c335897e34ef42164e5c77ddb","fa4fd914ba600b131024af8651d40ffcd65a5277dadea5489859b4963c643b07","35f678b11b8d4d0892b4ab9930ac4774935c85621e741535c385ee41aad6bc88","0ff1b8b79dcb7f992a7b2da33f4977398d7595f0dc423d864acabbcbd7b64f11","74ed682594846c34c87f314f712a694e5a5e80d451e1f5fb927bbfcec7cd945c","f17bcf0484049122dd54caa6c2b31323eb46c9a93b97b74941aa357126a14be2","8b2577154198feea893913cd0ad31019a7339227541c4e85cea79a345c054060","ec33b93673c808aab6c04feaef188d1fd4baa1981c565743f25a69a1681b58c8","d2f0b25716bcf18895c71306abda91b5c9e5720077522060c5fec9bd1d755c03","8c107d9768a16d54f16190b0d6f33957d4bd41eef4fb7ef6b10fca0e5a39a587","f51a2fa05657ba130768c5c3fe6097c45a6230e256b0b345179c1e6622664432","a753d9f7839ac708864000ccdad7006ed39330a016d4acb9b700bd0b19269b8c","4eb69b0c92bbbb3315797e27bd0dd9c6cd4ec680745d8fdba478303706cc9a8f","5bfecf6a65553c9ce646091b23e4d09c3f04feefd906cbd83bc22e96ef4f79fb","c1a5ad3bb3fcacabf8a7f7d4e779162ce5a49c7387b76fd75d3f140b9c1204fe","21dfb3b2b6fc3843226f11d3d03e97f6544708f8a59ee120c1a47b0d3c83be60","34de4d52b327457b4f84a2473fb70ab29704c5fb96384ef46ed2b31c8bbee32b","4a34059c517df713a0dda19b8822ffa4cc5386a31c0d01e0c120dc3f0df876ec","6fc6d72206de1808f3e7384bd7f335d46470fac06ac92d420aadcc4b1fc356ff","9f430daf20fbd4c160ccfe6fa70734ef54c401822877793f611dae747460fdc5","54001fb8bc9ec220335984bc700db7dbe11f6db80781f542d2a6d5f6dd6ab19f","d15a84d2faaaeffbcff47d3f85885e6a00e0a1256e5bdece9425998838c1968a","9dedf9d48a9abf33b273e10a0766059961a16f1e5cf0b0bec3bd79d433e0f600","8098ab70970c888c7a84ca823469e3abc9977a4f0487548d475c99f51b299c41","3703305a9a02b5d9381a70d652f63df7f3eeec7366315fb9a4e18003e90996f6","74f67b37c367289180f0d18b9d215794679c8e0bb1bdf6e43f8bc66861b49b29","9b1c3688a96c614da8548f9f9be84ed6c2396a20afa0f7c1f8591b04aa8d56c7","c6ef17f19b568cd43bcbc1344ee2482023f2bc5bda12f7378777a06a6e83fa20","f55b2178809affa443e9d19b140a4d68ecdc76009df2e52cc82ed455d6975d1a","1e0e8354b15155e66ad26b5ae2cf5e407e03d29e0e9a1859ddf1d75d85fd6a8f","ac1cae57620d71becdbb1fd4dfcec8381251da5624c42567557d6279e59e56ae","7caa569a7fcaed31c1a6271c09b53ea410acc265a516096fc3adeccf7a6e6fa6","7578b159a52287aff4580af10f311f6466a7d94e736462c9c1ed520378a66619","eb08060f522ce5c18e14aac3ecc2b216b82a90969121e65f908578d890e8cc4e","9be94e2480bf2a3a913d0c5eb021555ccf552d9057abc813a9a845547e114357","f5bfcf427c95ba6b5c8d8b4aac164e7dcdf05e581c2eff5b61f04d18e2154a87","6413f346dc7316eadc8468f81426d4a72edab9670693a0502ca6c6d3d7232bed","1ac177047f332d4f68cb005bf9d74cb96376f16cd07cb9c9f3bb87939ae30ed3","f5af4306d5f7221d4c2ac4bb14d63d18c766bfcac00c887dbc70275d84402445","1925a2dd113d37dfa79075f52e9d9467b97ccf8115a6730a4eb95258846e0940","9674a5cd6204bb3dcac4f4d5d2b604966d1f7b6614e443bd437fc3d9f6498296","136c17a91bebb444868ea9c8dd35e102dfe143b8911078a9fcbebfdc9760061b","ac666699023461cf3984aa17788cf05e18cd6c25ccb14a18f8a9dad47979857d","b88e1ee37a3f13206994af6a3a95b7b85ca981d2ed0e163a1cfccc61f2005b99","098896805971aa87a40b9dc30adac527fd1af711de8f05d176a3bc755b6b6cce","a50c078a7b8a18f4a1e5a9f945397d767abc8b57b1443265b73964c02cb9627b","6fe02cfd8557b5be84285d1a69152e18cb1e1ff868bad43baabab68501ceeacd","31affe042c0f506e84793b099fd177cdd362a87ee9b70d3b2bd6d4b49663ee6a","b49be00dcf47e823a6c5fd0758fd87c136baddff69891a15fc90bb5dc0f9b854","962e3490eafa7facde98920e8016ad46fec7b7954631c9ed411a46252434abd5","b11ebda48bd57987c9d80bbda73ad5a09bfb24819a72c67e276bcbb12d1b1945","5c199d42d9e46d8c54bc2a44d1a94e467c860d4429d732d377b050279a1fb8c5","3ad2eaabe3f599d97b0944d46c9c654621859e5b6cc4b50e9ca6db2b7054dd9c","78ebd6f0f533255e6097ec1f183597517da7b2d5ef66e3a742e101317af331b3","8cf219184cbbb4c4705b22584f42e8d37e252db15c74f0f8f17ff781c290d9b2","e1228a081f701145fae6ea5a8d865729cc02f9cf890dffb6bc658d86c5f1270a","d01ae7728a2ea8144029ed64d05b84de6b29f2b576630a759db11f38077347a2","d347951b31aaabf5f047fce44a32320b3bd2f89285d23fe016093e38534c7146","383bf90ab08d31e488c509abc03f0603021e3830e0defb343a913918b5427c0d","4eba71d4d89abdc4a12cded8ca849c5c90893a6c487fbaad326cc411722e5323","6e720d2d20a095f13ca3fdad775414f06ded3c7aaeff1cc8ba502a53cde07ba3","764180cd5de36462ff483e415bbb010768077de55ab10283551d488254ab3281","ab284957eba695e638f31cfb4473bd23c946a27c415d0bb05dcc97c5afc8a470","811c241b6cdd18b438806f8a025c6c962cb7de2c238766161c2f7eae2e63d4b4","eaaf5e82e87bd72e28988852b815b0d259253e34fca56657fc36278223b0c0fb","b71a8e85fe26ae624b45f2dfc054de7b5a4b5f8778f08041814f02ffb0c02554","3cf41c62922773ac4c5ff20a643e9d841e0a5e4a7f711dc9409a6d411ed04f88","4aa8673d1b1f1697ea8d095f58b0ef3131027fc9f7c95c6f7e11717e6e70b6fe","f958eb29c9bfa5dcae5294149fb4bf8976a4fda269c37720c802f58fc75d704b","911c98e6286a2349cb9d833330e9c6a662e1b854ee7f06b5c2ff8a9c00dc5585","c2b5fa70179123a02eaf0df776a0ea7ae801382036d850cd9cb44cfafb19efce","6d82ecc5a484947f7219bca151cc2d941bd22c4eb5fd6d8c965c34e2ee6da402","5d148f8ccbee85ff390f4269c4da4716339986744a5f49a15c379aa4b34c50a7","f3fa1713741b3f7d07ed6bf57134fcbb6729e78f789a910b7e969403b9840a0f","c73fa9daa7dab6a33832ccf090eccfcced795a9e02d7211d1939815dfafe02b8","cd6ecc25c2b5cecf2848d14a9ff04404d294fd842475693ab761837d0a71737a","10ca2e94f0f6a783dc18964ab393d5c25365549b9ab62d3dca28a24a8d3e1a1d","155c2c713177ececdbd94b6cd3e991c95e088673e1c97557f1a3b94c877e4d12","b01dac1fad496b774c2d17ef2bb2989efd12d897b12edfcd0a75a406677cf638","da921267fc67980e6603f79f55c51ab8793cd9899a4ac65defba724611397c20","36c1f4a87431dc92ac95f17d748002cbe0024303bc8bbad2cae094a91a174233","47d813d0b77a6c8f40475beda0772f4fc82b1d7ee1f373dd97326e4d67b26b38","b9700f37f629fbc158c085458c7921d3e1b3df19db3b449bc7fd11e4c782f2ba","1e754526314112216f50b99614bbc67b878061c6b08d5698980edd1c4432bca9","a068d30a65d12787ed69a2f3fe0497e0f8caeaf993b2e2e8dca896c123b64fe8","f232f6fc61fcfe176575850ebb7228c288af8a86a4a92a2def46739b028df6e0","d8bee0072ffbb66b5af3c4860ce702c59b2e949b2a263b5a13ebcf3ff12c83a5","aba9f73847737989efc9e08f2137281f4b47871981275195c53c5073b9001626","246919311b29a3564f9f56c137616d0dacbf1ebca78ccf2cefdc09e8f91c0bdc","0ef7d8fc895a5033bb0175927f72ae39d3c570b406b9cb15a831e8bcb4fbcd87","9072b632ce475cedaced514d52266f5737d82d05d37cfc8d88821f25cb0893a0","57b31d387cafc4e8c7b81abd54f56f8e8bc0ee94d65e9f2c74e054be634a7e32","9d2f05a7e7502e2e604c3f1504d76383d9d18bd43bdb90530132253037c0e231","4863421fd95311f3a6514ef67159f907be1f433a64bc39a69ff8d9d37de09319","270a4ac674a3aa3a6aee30a9b9559f72f8b55f386ee55a21c49c0059803478ae","2be2dc0ddf1826bd260cf4652334af58d1a25e00e3928e208efa256262151995","8b43118599a5bf581e76cd623aa2309a4b94daf272ffcf4dfe9303fa289b682b","5c3e89cb0297d72fb78710e6cdf009edc210ea0d3c8c17d1c717adebb6cc2afd","214a0150bf42defadb2ed009389c8dd5ab960b55a4cf3bb14fee9482303cf92c","5f1569fb153b65b9833ef311f896f1ad0d325186f14fa8b69e6a50096e2a4267","4d39395f280561414d2325e40cc02570bb39db91164f43010256571527f2bdbb","0350b682180b4df1ee105df4dea5937749c0c1e01ec5af5d7b05d7019797e0a2","ab96424ab03f0a0052e1a1ed3fe1d76e385f65e8d2301880f39351aeba002e5d","9077988667b156dba8fe2750dd1e0a72f3d425ba0c980c62bdeea65a947bed2e","d261b14cd53cde4e97bf3084b74f85e6cbf5b3d6321d365c6cc9f20b6955f533","9df7e4655665769f02cdc7fb13a793b757394def93d6c1b9a6d1023e57db71b0","7a3b3185c3ccf4e4f086b5e1711f1092327810d05555c131010dfe2eced8eb1e","acaf5ea0a34374caeaced63bb89ee46a6745830896f6df04198743ad77c48d49","fe0aebac858f851a1521dbdb9f2859aa0ec0f5066f79df99a7813a26f6edfeba","71e1101d434da42bd2304d1c62039c7de1fe79c1ada1f1319620d588672dd407","d9875dd7eec64fc63ae284bb9bf479edfc0670e9b087e61c74318309769cf01d","f5803432e9a599fe904a3469269c87d42b6ca5c12f438f3eff75cfa98d593134","9c9829c9004fa3965794e0633d94b9652459c45dcbc28ac751aaed2d865872c5","6ea5d42e62c598904898ea4aabfac34890a54dd5c238dd543e71bde7c7515fd7","bc882517392e2bc54836058c6183ecd3ecb3e65062353832403b2cbe021a7e03","63c3489e06b1ca16b24c03219784b87edf83309a83708e80ab46026eded153b0","09561316f4833bf62fb84e78c763fd4eb9631913e62157f5ec2b0929b4bd3b22","e0a473fa55a314be3c83449d4b5e28fa58892e01b48f41a9395135f4c396d486","6bb1ce90efa2e0d66caef4bc9c58225b53574c26ab86222f0e94fd18a5577d13","0a559972195611f8100f9bc90e6de882a0057fd83409da3afbe25ed51d8b64ff","ddb5ae9f2c2e2de0526a516508fe1aa4bde0dafc215ed58fdb09ccc1e5939c20","75e073ae15e7dd713b00f6c04bde25e597d27e543ef1952871530ec6bf1ada25","8908956116a8cf5e8f72ee63eb5564282640dca076ce696d818603c6b875fe24","82800515888719f3c713e0bb150338fb1db512da8d3d79138ef485ee25e33a85","0539cd2a9783a16c0618266a8cce6bcdd5b2e71dd4ee800eb0e970c8a1d723c8","b86e4fa6486aeb376d9b46881327eecf888c2843e0bbdd2de63f221784e76a03","6cdc760089a5123897108939d32a7c0955f6c6172cfb8abf8454d273df030ac1","105d8abc05163a4eb6ce51e717bdfa74904ad853ab0484f1cce1212cdc2cc006","7deb1b222b2c7b5e6c90432b328d5c4c9a75cac2698fd438a3ca5ea7071e364e","c467012efbe63006c46f5f7c3fa0ef84278d41ebfcc57f3e655a0abf65b3fb2a","4d83597dddf298a444ac417971b8b0cb94ae132c6813bd191f3314188e635184","248a3ca6051c6b6857164156019d576dc0ff80c2026e8bbd75f3009dea5c3f05","4d2517326e79c2835302c028ccfd41a0348ffbaf529dc75c851f0d06c6b197e8",{"version":"a4a245f63c440ecbf347b0e0409ec38684c43fd1ec4104df5f9405292231d328","affectsGlobalScope":true},{"version":"da854b64a978deb3c2434e6e3e8e40142210e33a6e36e4ef482479577f625d13","affectsGlobalScope":true},{"version":"a2edbb2729d2df138e42998a5804ca54b9e9610a230d2903007a9ad123458da8","affectsGlobalScope":true},{"version":"745de33e37cae24e4b530ca03a8e77942e5d2360281988daa79066d86639461a","affectsGlobalScope":true},{"version":"be6e8ce9d89e6ae797bc5fec1dd2bf1a3e5096819a740e5f7d990ad052953f04","affectsGlobalScope":true},{"version":"31cef656e2ae2836c00be7f7c36dd225c96879b1530ef99595f87667a550dbf0","affectsGlobalScope":true},{"version":"6b6cfa0fa9528f829fa03a2cbcb1a9a325800daed455ef111ff15d8d6be8f39f","affectsGlobalScope":true},{"version":"2dae1085d34be82cceaa9da090d387d6a0ac7587ce93d63aa5e3ae5577338bc3","affectsGlobalScope":true},"214d4176826f0654e1a22cce5c0733e5ca2d138a0fa4d9560b99b7dbac0da15c",{"version":"ffae7fd73a4a74451be1de4ac54f9686aa321d0b5c633014ab336cc0b437b80a","affectsGlobalScope":true},{"version":"904bf520503c38c1ddf3167da34750738fe3cfc88092f62158e3a0e037bf2160","affectsGlobalScope":true},{"version":"35f376ae278243e6afe9c24a12a7f786f398dfe578aba5fde0679c52e5146fc4","affectsGlobalScope":true},{"version":"680672358d2f84fdefc97936432b59025d25112d269406c0a84e51c13b90b195","affectsGlobalScope":true},{"version":"353273db48805fa739de275b52173cb3edf2e553ef86e7813a3f6e4a1d4bddb7","affectsGlobalScope":true},{"version":"51c6c5d5054b6f505dc1a228587d6b817dd366c60284c575773244d1516c3a95","affectsGlobalScope":true},{"version":"1b818842e3d38878689b2c2f3ef055ced422697dc9979976c489a06ff06a65b9","affectsGlobalScope":true},{"version":"77e6217a65f8517f192db4d3d52518c2db0aa9d87876915e68011115a02c5f6b","affectsGlobalScope":true},{"version":"a912df79153642e7c30ae0759358f7066f2502e328682928391bb13eeb20dc98","affectsGlobalScope":true},"49bcb93c8995baac4db5c755b57402656b22897494dafaf34779cc1f14a3d43c","aabcc875047a9ce097df133c01ccba6e6d1a70f9b3ebe16edfbce541b711d278","f844bcad7a95d4f6db6d7c400100085b593891bfef0040d55c334f48e9f227c4",{"version":"181a3c43a7e60d6c6459a1b261e7167448805d42c29459dd879432ca5a3d7a38","affectsGlobalScope":true},{"version":"e6397d4242c72f4ad6e414d3cc3eaf7cf6b540e820f21ba2021597ab53902d19","affectsGlobalScope":true},"32dd1f6fa95589df742f0e5dc59a39617b85691b3d485a55d05949e6a277c341","e512a66403669c219c10d1054162afba9e912f923a0549223219f4f8474d95e9","a7c2ce9db04a8a4825cb13d7e0d5beaa7d4c3a3cab4bd0ef9e2faebee2aae6e5","5f87b9bf2da0531b912400e7cd49a372b915e729251493ed6863e354b88fb672","66c509d1a6aae2aef4f896ab6d44ff3c9fea39ddd5168f05b5e70c080d0d828e","9febc93b9612a5081040535a0cc788716ec7ffc0e182517ad1057647704bc96d",{"version":"cd734a3ceb5b1343e1d92f40813437e25530eb5b7ef5154c90b46dec68e4caeb","affectsGlobalScope":true},{"version":"1d26e6d3045e6aa4c43b1b3058fc150ea0a3a05b82f832ce143cfd0d83713758","affectsGlobalScope":true},{"version":"328c9a08cfd0be25d4b3f33f60b21ffe469885f6b4d868e704fa45b4a355b7ca","affectsGlobalScope":true},{"version":"eecedc013fd6e67e7b2727cdf98fefd8dbfd833686a458157cdb305c576f2ee4","affectsGlobalScope":true},{"version":"009f50b2f451600f3b511c7532555ed02a44b93853325b72dd3b979e8ce6e58c","affectsGlobalScope":true},{"version":"2e11c2fbb7a11c2bbaf75a03876f6d0142cf5987e1deea4b1db88d175e84a8e8","affectsGlobalScope":true},{"version":"f2bf83fd6f73d59d35c157612efcf5636a02bea68dddd457edfe396241506b94","affectsGlobalScope":true},{"version":"a5699c6f98fef02b7cfacd5be3da1ad9c2f1bcb30d72e9a24f263dd6ddd6e75f","affectsGlobalScope":true},{"version":"491ac07cb7139d2c9dd1fb834df8a71a34b3afd1fe7ca2abab060df7b025b974","affectsGlobalScope":true},{"version":"2d11f6aa532595ba237ee02dfa916d8d991f55efae45036f4a031564419941a8","affectsGlobalScope":true},{"version":"07ce1b728bc8a189504941753896e911834ead3c0f4d8106d39b878d59f5768c","affectsGlobalScope":true},{"version":"d84104ff83394662482270c22f3db767397ead8f356c835215ef209f61331000","affectsGlobalScope":true},{"version":"76e578014f6c6f18b511c6214ecbe4540f69da877f98c12c732ae5ef1c8202ec","affectsGlobalScope":true},{"version":"8b0e1e59695dd28adf930fa4f82ee7f34789fa179837f52fcaa4e56478080974","affectsGlobalScope":true},{"version":"ba927c21dc934422ed6799948e4f4f4d97ffed5d53071f1aa1c4180b63720982","affectsGlobalScope":true},{"version":"34e04261f8d46785867afa92ce6ce81f656228b9983927b9106605ea80399f04","affectsGlobalScope":true},{"version":"8be0e01065b88a7ae97de8138d5561ee34b4dd52dd261253652af6e2999d6220","affectsGlobalScope":true},{"version":"b05a34fd6db3bb5f17b9f65a08bc30fe50c5bb9d60eb184f15dd8d9580dfcbbf","affectsGlobalScope":true},{"version":"399edc722872d367cddd6cd495369534cdbd2d30583889e83d3ab183f3446467","affectsGlobalScope":true},{"version":"7262faf4e227893619259508ed54e86a8c28ad9fa2aad1a96f889511fde2003d","affectsGlobalScope":true},{"version":"7a1fdf8e667f526c7a0f3ad9fd8c11ddb3203837294ed277089f7bd2b82753e7","affectsGlobalScope":true},{"version":"c20348336236b9431486b77a9f72ce1d9fa918ea3d135064485a77162799c8c9","affectsGlobalScope":true},{"version":"96212f6329bb7dc85c082830166a2fe923bfbf079e16b023abce3e7bdf5356b5","affectsGlobalScope":true},{"version":"3d87ff64541bbe7143ff9393f41c90ce630f49d5dabfb97aa77dba7f987d4b7b","affectsGlobalScope":true},{"version":"6643af14ed0c659833208ee8a18f811cd262d8ded336578b8b1eb0989cac7889","affectsGlobalScope":true},{"version":"f07f6f392d85adc461612b9fc0114b19e19b03f4e0cf2b86bb17a2660aaad8b6","affectsGlobalScope":true},{"version":"e3444fd440d71f349fd854b42b955316d02249dcb5c5fd3da770388fb93a5011","affectsGlobalScope":true},{"version":"58c153487cdb0395e0602770d51dcb9b49f123e9e361dac849000ea98bac381e","affectsGlobalScope":true},{"version":"556469c9300b8bdf20ca790bccbbd6fc6697bb5d70cb5e921314fa89f2a21834","affectsGlobalScope":true},{"version":"0f7f6bb0ad58920c9f3fb76920826678bb5b7c71ea665b8653479139282039a8","affectsGlobalScope":true},{"version":"1f46a188451215fc2dc45a4798630a0a4927b7783d7234aec9c5282b69afdd05","affectsGlobalScope":true},{"version":"ecf0dac14da8a6526926b6734ff7b3de19a52b0eab50ff2bcee0476c70061feb","affectsGlobalScope":true},{"version":"a82fab989da9ffdf06c4cb390184f59f40a88e0f0b773fd9d30f1030a4bdd133","affectsGlobalScope":true},{"version":"3babd328660263e70db849a19469ee97eb26fdfea5159739c6ae63f11ae3a296","affectsGlobalScope":true},{"version":"d839874dd15f6ed348bace3842d483b53fb2933a67fc7e15414a6fb8513f9830","affectsGlobalScope":true},{"version":"b0bc815e0adc758ea47d6d3d0197b08f8d20edf56a8f7dda51db6576aa492ef0","affectsGlobalScope":true},{"version":"0f6f743dfe13b3eb04d3c7ab32d067cdf21a9ded28b916ef44dee3b6f889f50a","affectsGlobalScope":true},{"version":"8a3cdb83655d310a669b9ddb697aaf8ecc1e8e41d732543368ff0c616e6e8551","affectsGlobalScope":true},{"version":"0f5832fbf7749e68dd9e47863997e8c9f3f06b66e3db629157754c390025f49c","affectsGlobalScope":true},{"version":"cee65150d81b2a64424bdf77d4d773f76a14fb67b52137b62c8400c09002ff24","affectsGlobalScope":true},{"version":"265e798c386cb4d68884c27cd3fe18b18531fdcf8b06a6f5f0457d5708409313","affectsGlobalScope":true},{"version":"9ae8d47d98aab6ad483da501854bad2badb44ec9801ff9f20df88866f0695526","affectsGlobalScope":true},{"version":"8ad20d4d07985a03b06755c578f8c5e61959b70c08aa6adf6834dceaa45038cc","affectsGlobalScope":true},{"version":"0643f06db5ae457bf88d1fb98e9ef29f0fa26a1b929bfc4a804d0051b97d7651","affectsGlobalScope":true},{"version":"164cbee53b866ab7bcc1e27be9ca9425ad6ae546d428053c1390f39247ae8124","affectsGlobalScope":true},{"version":"2ac9266cd6e60ba9e15163fc3ac7c1f1c41aa11756d19bec08b4062b86c9f912","affectsGlobalScope":true},{"version":"8833f137d183571bcfb39b82446abb9d1be5587de2db3e67e69e879e3c36440a","affectsGlobalScope":true},{"version":"2e543a7bcebb6b524651629de4ed05a093f30a979531c1900c7f95c3321b5a53","affectsGlobalScope":true},{"version":"110d2fbadd2fd7713a988779de06f5981e89202f470b1c6f03bcc4676e031942","affectsGlobalScope":true},{"version":"1799ba6f2943e16d986921c8d94ccb53a9d3af930be8404a05b7a78157396502","affectsGlobalScope":true},{"version":"ed0d1670088a608eaae7baebf7c3b0ad740df1f6a3fbf2e9918b4d2184b10418","affectsGlobalScope":true},{"version":"3b6e856ed84b49d4d2da000fd7c968cbb2f2f3bcb45aa5c516905bb25297a04f","affectsGlobalScope":true},{"version":"1fb4fdabc388cf946705fafccb600b2acaf44fa96f7418f5ff4cba8c5acf4a1a","affectsGlobalScope":true},{"version":"9737e958668cf4d3877bde85c838d74a6f2399c55aea728330d6757f886fbd47","affectsGlobalScope":true},{"version":"60d09949859657258a1e204e116bf863076e643acca65b2529b555089a713ac6","affectsGlobalScope":true},{"version":"ed92cc55553d5625fb29aa7a56ef7dafef214ba67569a5ad2090ff1210b7a7ee","affectsGlobalScope":true},{"version":"7d39efcf0a7e218d29702ad1ecfc1a819b5d19ead4e297edc51e1e4f48b01f70","affectsGlobalScope":true},{"version":"9dcad7a9b495bd4fe2342e9caf2d8518bbb25d3007236954f599a30b8aebf4e6","affectsGlobalScope":true},{"version":"ba415c77c9b4b8eb8e7f929d6674cb841be66a50941dbf53c46174725f3feea2","affectsGlobalScope":true},{"version":"3813efb78d2a394fadaba7ec5870bae3a18897b3fdf722447fb1870eb3469eda","affectsGlobalScope":true},{"version":"c43434a006e580386c955294ed82120a7010e2e351c1352cc81100bc5b59d673","affectsGlobalScope":true},{"version":"ba14e8fd121b7b8ca07806f8902dedb6a78aa304cf3f29fb4d550c5174cabad8","affectsGlobalScope":true},{"version":"44ce2c9c3eab14339cf368213acd36f968652894a9c1a1db8f7980c5dfe0b062","affectsGlobalScope":true},{"version":"6a10e07ceb379fe60a841bd258ebeab84b0d86ee58a142740572dbee5131ccc2","affectsGlobalScope":true},{"version":"0258b20790ed0fd4fb112e5340d489f70f5ff353020926b395dc32e09f22a422","affectsGlobalScope":true},{"version":"389ff949fa1795b75576f43283ba08eda9a6298d41848193e907a337f009cc20","affectsGlobalScope":true},{"version":"8743407239e7e664b367343052be4a208d2bae2dbf09de62602c7045b642608f","affectsGlobalScope":true},{"version":"175d7f03c2404042fe66919ab8bdb08a734d3a91bfe9702d1d8e818555dfc33c","affectsGlobalScope":true},{"version":"bc343f02b56a1d98c7a6af5fc7518d79da9fd1f49cae4b1b97bf68de638d92e7","affectsGlobalScope":true},{"version":"8d41dfe2645789058d07c73cc6257d72784dcce2d5007131800b7809aa491349","affectsGlobalScope":true},{"version":"5f7fb4204ce347e8635b171956cde3ecdcbb9071d67ce97363e07dd7536873c6","affectsGlobalScope":true},{"version":"b0fa1aeb23b6a2fdeb0c28deba04ad1ce8685905535cbe0e4b4dcd9eab7fde95","affectsGlobalScope":true},{"version":"6882126573093318e433659fd07b37cd5f2bb7195bb77db8966022a6fb1a67c5","affectsGlobalScope":true},{"version":"e597e2399a2f5c999202e1bdfa1b0f5900f151b36b76f2d908ab74f2b4953dd4","affectsGlobalScope":true},{"version":"16175ea0e4b28f86d0f274f810c18afc24640c3580be3af033a6022cc8befb78","affectsGlobalScope":true},{"version":"33091af3f990628ac5d4abfa09acc5d2e6dbdf65788ff54ae929818debbe4206","affectsGlobalScope":true},{"version":"52afb2eb854875fef550c60856e55cd02f0961b3ac7367589ca5767f3c090251","affectsGlobalScope":true},{"version":"f6a38297cf4932bad57637935c7567e5ebaba358d9d1ba05e93f09532b6e3038","affectsGlobalScope":true},{"version":"d1125b8078558f27454cd19c2fa25ffa1ad6b57afdc2e6cc9b0b4bf631aa1bfe","affectsGlobalScope":true},{"version":"8fa8468c1e03c7a9b7daa7d94b2be183a85a85719b617c033a2ebe220db0e31f","affectsGlobalScope":true},{"version":"6e4143a7da65fb171693aaeabdce2ab45918b64f4376ffec7be9bcec3d98bfaa","affectsGlobalScope":true},{"version":"9c0e40e6918830abc0658621a95cc34162f1e0a77f6b1fab54d23aff5c53d52e","affectsGlobalScope":true},{"version":"c45ecc25519765c0caa2fad87debeb760c5ff70a844b63b2af0efed9aba4bb55","affectsGlobalScope":true},{"version":"a62a6c54df2d5956369bcffbd67caa50647943393da501fe7edaa9a031f837d3","affectsGlobalScope":true},{"version":"087c00e2de471a80266474208ff6e1fe21db931e38390f4b64b84dd224a0a8c1","affectsGlobalScope":true},{"version":"1dac2ebf5e083eccf421beae2c3baf40694af7c2074f145e356132e829e7191d","affectsGlobalScope":true},{"version":"9303b0bfa9833399a6fcfc142548fdf801c0f8e493996c292e7fe795178bd44c","affectsGlobalScope":true},{"version":"0050c919a6db04eb1161549c0b9883f07e341465f979db510381010884820c69","affectsGlobalScope":true},{"version":"22c5c4e94f975ecadd5623a1d0d315795ce03dcf40637ce22410056409824444","affectsGlobalScope":true},{"version":"dfe39326c357ad5c2793071529c2fa17016b1f33aaf2ff68f145f2bf547ba1a7","affectsGlobalScope":true},{"version":"1f1ff632b3cbe190232e49e5daa3ba6030b8b10609710ad02a55aa23518e8a13","affectsGlobalScope":true},{"version":"ae233becc2c6250ba65fc356d4c3994392dfbc984e0e6b7ae6724cef3301b290","affectsGlobalScope":true},{"version":"d67258278b25a79116f4ddfb8ffa41f305ba60187f460124f9fad60055029eeb","affectsGlobalScope":true},{"version":"9c6f731e814169176fa001087b1b7f83d97526b2bcfda179a01f36868f25f7d0","affectsGlobalScope":true},{"version":"711fd71a090f85586b588ab0ab0ccd4ed9c71395bd5fcae42ac3193a119272cd","affectsGlobalScope":true},{"version":"761e182f7fcbdf5fcb0f08d9c8586a4a28f532499c7d3eae39ede2642d0894db","affectsGlobalScope":true},{"version":"3e8a96f68d24b318bc30a63344f7d4bd0d4558df1f5d2d569ab8e7b58f8d8466","affectsGlobalScope":true},"bcaa31b0ab53f1bb0ab217932b46ef1be570c5e0b71cac149d21a284b468080b",{"version":"60734813ec2a2c8836855bc769d25c306e489479e2f074cfcb7096dbb707acf4","affectsGlobalScope":true},{"version":"82692b9573eb0ecee384066b99cced8430e70aad94672986a09c98e7ca51f3d8","affectsGlobalScope":true},{"version":"27ded4b63da62f8e71b37114553fb5a493dfa68e915a278ba483dbf3648ca261","affectsGlobalScope":true},{"version":"ccd4c143316d8784615624fb86c7fc5866321f26c64597a6b8762b46a4c6ae54","affectsGlobalScope":true},"05900558993ef9ceba8fd5026c9a86b106c7c64e61a5d3c4d17834f0980ed77d",{"version":"daddf23e73f07e9b9edd8c7fe48564f0af6f966a21fd59ac2267290d6eb6f357","affectsGlobalScope":true},{"version":"4b9290a110a4332145785b310afcceb4e31d0a32cfc2f686446c25bacc121f56","affectsGlobalScope":true},{"version":"5686baf6e3c4c244f2e2daaa306986619ce967cf7cf58a80e87f6b8fe4351388","affectsGlobalScope":true},{"version":"4bcfbab841de41b0a983a2312e684c0dfbeaa1e61fa801c56c85bb6c0b14b1e6","affectsGlobalScope":true},{"version":"192b3183b58c2acb2a5e226b7d96f72a2aa929f0b627efec44de8ca29fbff647","affectsGlobalScope":true},{"version":"602318cc8dedef64cf985adfaf00e9e2d852b5bf0d2f2312a6dacb5f420a1ca3","affectsGlobalScope":true},"dedd6fd61ee19f383ec783bbf5bbb032d1aa8ed32a0c84e7fe1f308a3e81486d","2c71854c615364441dfe9ad5b7fd8537ab0d006cf1440b38675d489868a9f7dd","7ff46415602510ad30b3c02475a4d2368d7b570d2be50069da74526d482f91e2","f11046b75914ea9f73d1a89098b55639f253a7cda2924e16fe671cab923a347f","0579d48a3bc44526f453c01fb49238edb2991f39810f5ed35dcefd9be9928c9a",{"version":"ee63715a71765c18fb4e2427d78816d76a62353925cc01a31faadc715f9e15ab","affectsGlobalScope":true},{"version":"6c3b493e742f2028e6863970af2897be01afdd1a4ddcbce5d9bac77b4ace448d","affectsGlobalScope":true},{"version":"d52b5bfda14542e726cf7dffc4b3385f17c852cf578d28eb1b490934130be537","affectsGlobalScope":true},{"version":"44509a4b8ddf0b4b68698646598f5a8ec6ca919b58fc505cf1baf1fa911a68bf","affectsGlobalScope":true},{"version":"ab17071afb9e1f3079e483c2f27c7a698bdc3ead31a55aa1f9f5e5f61cde17a4","affectsGlobalScope":true},{"version":"af7a4f32e8aa46d3a0bfb92be1a92319e0d9beadfafb4dea6409a31845480efd","affectsGlobalScope":true},{"version":"473855402b596349de2fa9621071e1c3e30448a74eefc0a6d69f335f61752903","affectsGlobalScope":true},"c71c29ea5508caeae790be40605f15f4de809f06b52f504a08306df3d0dbfce1",{"version":"4c7b8313ae8e56ed2b1e3496ab331d02bfab068207f41d004af8314d5e28a475","affectsGlobalScope":true},{"version":"7a21420cbbffff8021d5ebffcb4a24c2074e75f0d9859a0dee17e030e7cacbca","affectsGlobalScope":true},"d58adbd2db9bafa1f9024d34be166813dc21d091a2c10142692c32b890952d1d",{"version":"3473b148a48e8ac4d33972de24b5cef8b1c200fb9367e92837cb1d6dc831a3e4","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"alwaysStrict":true,"esModuleInterop":true,"etsAnnotationsEnable":true,"experimentalDecorators":true,"importsNotUsedAsValues":0,"module":6,"noImplicitAny":false,"noUnusedLocals":false,"noUnusedParameters":false,"skipLibCheck":false,"sourceMap":true,"target":8,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[299,310,460],[49,50,73,168,169,170],[46,48,49,50,51,55,71,73,166,170],[46,48,49,73,170,191],[46,124,193,194],[46],[105,107],[104],[109,119,166],[46,50,72,93,107,124,196,197,198],[48,105,107,152],[205],[123,124],[46,87,92,93,94,95,96,97,98,99,103],[48,125],[48,64,162,201],[112],[151,201,204,213],[150,165,208,209,210,211,212,213],[46,156,157],[217],[46,217,219],[50,57,73,114,115,116,117,123,124,125,148,149,151,152,153,154,155,156,157,158,159,160,161,162,170],[72],[106],[48],[46,48,88],[109,158],[46,223,224],[108],[48,226],[46,48],[227],[46,48,226,227],[166,204,227,228],[125,297],[46,112,233,234,235],[48,159,201,204],[163,287],[48,64,107,154],[65,87,110,111,166],[48,64,105,108,125,166],[48,105,149,201,204],[46,48,50,112,116,202,203],[48,160,161,166,201],[46,48,124,174,176],[281],[48,282],[163,282],[152],[46,240],[46,226],[48,64,166,313],[142],[392],[392,396],[402],[46,142,166,431],[46,48,408],[46,113],[142,392],[46,65],[46,146],[65],[316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391],[133,134,135,136,137,138,139,140,141],[46,125],[110],[46,65,75,76,77,127,128,129,130,142,143,144,145,147,163,164],[46,166],[393],[142,165],[46,48,72],[46,48,72,78,79,80,81,82,83,84,85,86,88,89,90],[46,245,246],[46,48,54,58,65,66,67,69],[46,72,84],[46,72,249],[46,251,252],[46,254,255,256],[46,105,112,259,260],[46,262],[260],[46,264,265],[46,118],[46,47,57],[46,48,65],[46,59,430],[46,56,268],[46,270,271,272,273,274,275,276],[59,61,65,131],[485,486,487,488,489],[131,132],[46,65,131],[46,59,63,64],[46,173,178,180,181,182,183,185,186,188,191],[46,125,173,178,179,180,181,182,183,185,191],[46,179,186,188],[46,57,137,139],[46,124],[46,193],[46,60,61,62],[46,600],[46,48,174,176],[46,65,601,602,603],[46,57,64,65,74,87,106,142,165],[46,48,57,65],[64,72],[46,47,118,119,168,169],[118,119,167],[46,51,54,55,56,57,68,69,70],[98],[93],[72,199],[90,107,124],[50],[92],[46,48,97,106,120,121,122,124],[92,93,94],[48,73,112,148],[148,150],[150,208,209,212],[156],[88,241],[46,57,63,88,110,117,123],[125],[86,90,107,124],[72,87],[46,48,73,148],[65,72],[208,210],[50,65,148],[87,104],[100,101,102],[286],[46,48,73,91,109,112,113,148],[46,48,50,65,73,74,89,90,91,105,106,107,109,110,112,113,114,115,116,124,166],[46,48,50,73,91,106,112,113,114,115,148],[48,73,112,116,148],[210,211],[148],[46,112,148,312],[133,137,165],[135,138,165],[46,133,134,136,165],[61,131,132],[135,137],[133],[137,138,165],[53,54,68],[52,53],[54,69,70],[46,68],[69],[54,56],[56],[78,85,87,88],[61,78,87],[87,88,90],[62],[78,86,87,89],[72,88],[87],[87,90],[266],[486,487,489],[485,486,487,488],[46,486],[173,177],[61,65,177,184,189],[65,177,178,179,180,183,184,185,189,190],[184,189],[181],[182],[184],[184,187,189,191],[48,112],[48,175,177],[128],[132,137],[65,124,127,128,133,136,146,147,164,165,337,338,402,426,432,480,481,482],[490],[166],[46,62,65,132,432],[463,464,465,466,467,468,469,471,472,473,474,475,476,477,478,479,483,484,491,492,493,494,495,496,497,498,499,500,501,502,503,505,506,507,508,509,510,511,512,513,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,589,590,591,592,594,595,596,597,598,599,605,606,607,608,609,610,611,613,614,617],[46,48,612],[316],[588],[593],[61,133],[604],[48,68,74,87,91,104,105,106,107,108,109,110,111,112,113,120,121,122,163,167,171,172,175,192,195,199,200,201,204,205,206,207,214,215,216,217,218,219,220,221,222,225,226,227,228,229,230,231,232,236,237,238,239,241,242,243,244,247,248,250,253,257,258,261,263,266,267,269,277,278,279,280,281,282,283,284,285,288,289,290,291,292,293,294,295,296,298],[62,75,76,77,127,128,129,130,142,143,144,145,147,165,166,202,203,311,314,315,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459],[300,301,302,303,304,305,306,307,308,309]],"referencedMap":[[461,1],[171,2],[167,3],[192,4],[195,5],[311,6],[108,7],[105,8],[120,9],[199,10],[200,11],[206,12],[294,13],[104,14],[207,15],[296,16],[113,17],[214,18],[215,19],[216,20],[218,21],[220,22],[163,23],[111,24],[107,25],[267,6],[74,26],[222,27],[290,28],[280,12],[121,7],[225,29],[201,30],[227,31],[228,32],[231,33],[229,34],[232,35],[230,35],[298,36],[236,37],[291,38],[237,6],[288,39],[238,40],[239,12],[112,41],[109,42],[205,43],[204,44],[292,45],[175,46],[282,47],[283,48],[281,6],[285,49],[284,50],[241,51],[242,52],[314,53],[395,54],[396,55],[398,56],[403,57],[448,58],[409,59],[449,60],[453,60],[454,6],[413,54],[458,61],[393,55],[457,55],[420,61],[421,61],[145,62],[147,63],[62,64],[77,6],[392,65],[142,66],[127,67],[425,68],[165,69],[202,70],[315,6],[394,71],[428,6],[459,60],[423,72],[243,73],[87,74],[244,6],[247,75],[68,76],[248,77],[250,78],[253,79],[257,80],[258,6],[261,81],[263,82],[293,83],[266,84],[119,85],[118,86],[146,87],[429,6],[431,88],[269,89],[277,90],[300,6],[132,91],[430,6],[490,92],[588,93],[482,94],[305,6],[301,6],[308,6],[76,6],[65,95],[164,62],[189,96],[184,97],[190,98],[433,99],[435,32],[602,100],[279,101],[436,6],[128,6],[63,102],[129,6],[64,6],[437,62],[438,62],[601,103],[600,6],[439,6],[203,70],[177,104],[604,105],[166,106],[434,107],[50,26],[73,108],[170,109],[168,110],[49,26],[71,111],[99,112],[198,113],[196,114],[152,115],[116,116],[96,117],[123,118],[95,119],[162,120],[151,121],[213,122],[157,123],[240,124],[124,125],[158,126],[117,6],[148,127],[197,128],[153,129],[233,26],[234,64],[235,130],[211,131],[159,132],[97,133],[103,134],[287,135],[154,136],[125,137],[149,138],[160,139],[212,140],[155,141],[313,142],[138,143],[136,144],[137,145],[133,146],[141,147],[139,143],[134,148],[140,149],[69,150],[54,151],[66,152],[67,153],[70,154],[255,155],[268,156],[89,157],[88,158],[84,159],[245,160],[86,157],[90,161],[259,162],[246,160],[82,163],[249,24],[81,164],[265,165],[47,6],[488,166],[489,167],[487,168],[178,169],[185,170],[191,171],[181,172],[182,173],[187,174],[186,175],[188,176],[174,177],[176,178],[463,26],[464,179],[465,179],[474,180],[483,181],[491,182],[493,54],[496,179],[502,32],[508,183],[510,26],[521,184],[615,185],[613,186],[538,70],[540,70],[542,54],[545,148],[548,6],[583,187],[589,188],[594,189],[611,32],[598,190],[599,6],[605,191],[597,57],[126,70],[299,192],[460,193],[310,194]],"exportedModulesMap":[[461,1],[171,2],[167,3],[192,4],[195,5],[311,6],[108,7],[105,8],[120,9],[199,10],[200,11],[206,12],[294,13],[104,14],[207,15],[296,16],[113,17],[214,18],[215,19],[216,20],[218,21],[220,22],[163,23],[111,24],[107,25],[267,6],[74,26],[222,27],[290,28],[280,12],[121,7],[225,29],[201,30],[227,31],[228,32],[231,33],[229,34],[232,35],[230,35],[298,36],[236,37],[291,38],[237,6],[288,39],[238,40],[239,12],[112,41],[109,42],[205,43],[204,44],[292,45],[175,46],[282,47],[283,48],[281,6],[285,49],[284,50],[241,51],[242,52],[314,53],[395,54],[396,55],[398,56],[403,57],[448,58],[409,59],[449,60],[453,60],[454,6],[413,54],[458,61],[393,55],[457,55],[420,61],[421,61],[145,62],[147,63],[62,64],[77,6],[392,65],[142,66],[127,67],[425,68],[165,69],[202,70],[315,6],[394,71],[428,6],[459,60],[423,72],[243,73],[87,74],[244,6],[247,75],[68,76],[248,77],[250,78],[253,79],[257,80],[258,6],[261,81],[263,82],[293,83],[266,84],[119,85],[118,86],[146,87],[429,6],[431,88],[269,89],[277,90],[300,6],[132,91],[430,6],[490,92],[588,93],[482,94],[305,6],[301,6],[308,6],[76,6],[65,95],[164,62],[189,96],[184,97],[190,98],[433,99],[435,32],[602,100],[279,101],[436,6],[128,6],[63,102],[129,6],[64,6],[437,62],[438,62],[601,103],[600,6],[439,6],[203,70],[177,104],[604,105],[166,106],[434,107],[50,26],[73,108],[170,109],[168,110],[49,26],[71,111],[99,112],[198,113],[196,114],[152,115],[116,116],[96,117],[123,118],[95,119],[162,120],[151,121],[213,122],[157,123],[240,124],[124,125],[158,126],[117,6],[148,127],[197,128],[153,129],[233,26],[234,64],[235,130],[211,131],[159,132],[97,133],[103,134],[287,135],[154,136],[125,137],[149,138],[160,139],[212,140],[155,141],[313,142],[138,143],[136,144],[137,145],[133,146],[141,147],[139,143],[134,148],[140,149],[69,150],[54,151],[66,152],[67,153],[70,154],[255,155],[268,156],[89,157],[88,158],[84,159],[245,160],[86,157],[90,161],[259,162],[246,160],[82,163],[249,24],[81,164],[265,165],[47,6],[488,166],[489,167],[487,168],[178,169],[185,170],[191,171],[181,172],[182,173],[187,174],[186,175],[188,176],[174,177],[176,178],[463,26],[464,179],[465,179],[474,180],[483,181],[491,182],[493,54],[496,179],[502,32],[508,183],[510,26],[521,184],[615,185],[613,186],[538,70],[540,70],[542,54],[545,148],[548,6],[583,187],[589,188],[594,189],[611,32],[598,190],[599,6],[605,191],[597,57],[126,70],[299,192],[460,193],[310,194]],"semanticDiagnosticsPerFile":[[461,[{"file":"../../../../../../src/main/ets/entryability/entryability.ets","start":345,"length":36,"messageText":"Function may throw error, caller should handle it with 'try-catch' or declare '@throws'.","category":0,"code":28040}]],462,171,172,167,192,289,195,311,143,108,105,120,199,200,206,294,122,104,207,296,113,214,215,216,218,217,220,219,163,111,107,106,110,267,221,74,222,290,280,121,225,201,227,228,231,229,232,230,298,236,91,291,237,288,238,239,112,109,205,204,292,48,175,226,282,283,281,285,284,241,408,242,312,314,395,455,396,398,399,400,401,403,404,452,405,406,407,448,409,449,410,453,454,411,412,413,414,458,415,416,417,393,457,418,419,420,421,422,446,445,447,456,145,130,147,62,77,392,142,127,424,451,426,425,402,165,202,315,394,450,428,459,423,397,46,243,295,87,244,247,68,248,250,253,257,258,261,263,293,266,427,119,118,146,480,429,431,269,277,300,75,59,131,132,430,490,588,482,302,303,304,305,306,307,301,309,593,308,432,144,76,65,481,164,189,184,190,433,435,602,279,436,128,63,129,64,437,438,601,600,439,203,177,603,604,166,434,612,440,441,442,278,443,444,50,73,170,168,169,49,51,71,55,98,99,198,196,152,116,93,96,123,95,162,92,151,209,210,213,208,157,156,57,240,124,270,271,272,273,150,158,223,117,148,197,153,297,224,274,275,233,234,276,235,100,211,159,94,97,101,103,102,287,154,125,149,115,160,161,114,212,155,313,317,387,318,138,319,320,322,321,323,324,316,136,388,135,325,326,327,328,329,137,330,133,332,333,331,334,335,336,337,339,340,343,342,341,344,345,347,346,348,349,350,351,141,139,352,390,353,354,355,356,357,358,359,360,361,362,134,363,364,365,366,367,368,369,370,371,372,373,374,391,375,338,389,376,377,379,380,378,381,382,383,384,385,386,140,69,54,66,67,254,53,56,70,255,52,58,268,256,89,88,83,84,252,245,251,72,86,90,259,246,78,262,79,80,82,249,81,260,85,265,264,47,60,61,488,489,485,487,486,178,179,185,180,191,181,182,187,186,188,183,173,193,194,174,176,286,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,483,484,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,517,518,519,516,520,521,522,523,524,615,580,616,613,525,526,527,528,529,530,531,533,532,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,609,559,560,561,562,563,564,565,566,567,568,569,570,571,572,608,573,574,575,576,577,578,614,579,582,581,584,583,585,586,587,589,590,591,592,594,595,596,611,598,599,610,605,606,597,607,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,8,45,42,43,44,1,126,299,460,310],"affectedFilesPendingEmit":[[461,1],[462,1],[171,1],[172,1],[167,1],[192,1],[289,1],[195,1],[311,1],[143,1],[108,1],[105,1],[120,1],[199,1],[200,1],[206,1],[294,1],[122,1],[104,1],[207,1],[296,1],[113,1],[214,1],[215,1],[216,1],[218,1],[217,1],[220,1],[219,1],[163,1],[111,1],[107,1],[106,1],[110,1],[267,1],[221,1],[74,1],[222,1],[290,1],[280,1],[121,1],[225,1],[201,1],[227,1],[228,1],[231,1],[229,1],[232,1],[230,1],[298,1],[236,1],[91,1],[291,1],[237,1],[288,1],[238,1],[239,1],[112,1],[109,1],[205,1],[204,1],[292,1],[48,1],[175,1],[226,1],[282,1],[283,1],[281,1],[285,1],[284,1],[241,1],[408,1],[242,1],[312,1],[314,1],[395,1],[455,1],[396,1],[398,1],[399,1],[400,1],[401,1],[403,1],[404,1],[452,1],[405,1],[406,1],[407,1],[448,1],[409,1],[449,1],[410,1],[453,1],[454,1],[411,1],[412,1],[413,1],[414,1],[458,1],[415,1],[416,1],[417,1],[393,1],[457,1],[418,1],[419,1],[420,1],[421,1],[422,1],[446,1],[445,1],[447,1],[456,1],[145,1],[130,1],[147,1],[62,1],[77,1],[392,1],[142,1],[127,1],[424,1],[451,1],[426,1],[425,1],[402,1],[165,1],[202,1],[315,1],[394,1],[450,1],[428,1],[459,1],[423,1],[397,1],[46,1],[243,1],[295,1],[87,1],[244,1],[247,1],[68,1],[248,1],[250,1],[253,1],[257,1],[258,1],[261,1],[263,1],[293,1],[266,1],[427,1],[119,1],[118,1],[146,1],[480,1],[429,1],[431,1],[269,1],[277,1],[300,1],[75,1],[59,1],[131,1],[132,1],[430,1],[490,1],[588,1],[482,1],[302,1],[303,1],[304,1],[305,1],[306,1],[307,1],[301,1],[309,1],[593,1],[308,1],[432,1],[144,1],[76,1],[65,1],[481,1],[164,1],[189,1],[184,1],[190,1],[433,1],[435,1],[602,1],[279,1],[436,1],[128,1],[63,1],[129,1],[64,1],[437,1],[438,1],[601,1],[600,1],[439,1],[203,1],[177,1],[603,1],[604,1],[166,1],[434,1],[612,1],[440,1],[441,1],[442,1],[278,1],[443,1],[444,1],[50,1],[73,1],[170,1],[168,1],[169,1],[49,1],[51,1],[71,1],[55,1],[98,1],[99,1],[198,1],[196,1],[152,1],[116,1],[93,1],[96,1],[123,1],[95,1],[162,1],[92,1],[151,1],[209,1],[210,1],[213,1],[208,1],[157,1],[156,1],[57,1],[240,1],[124,1],[270,1],[271,1],[272,1],[273,1],[150,1],[158,1],[223,1],[117,1],[148,1],[197,1],[153,1],[297,1],[224,1],[274,1],[275,1],[233,1],[234,1],[276,1],[235,1],[100,1],[211,1],[159,1],[94,1],[97,1],[101,1],[103,1],[102,1],[287,1],[154,1],[125,1],[149,1],[115,1],[160,1],[161,1],[114,1],[212,1],[155,1],[313,1],[317,1],[387,1],[318,1],[138,1],[319,1],[320,1],[322,1],[321,1],[323,1],[324,1],[316,1],[136,1],[388,1],[135,1],[325,1],[326,1],[327,1],[328,1],[329,1],[137,1],[330,1],[133,1],[332,1],[333,1],[331,1],[334,1],[335,1],[336,1],[337,1],[339,1],[340,1],[343,1],[342,1],[341,1],[344,1],[345,1],[347,1],[346,1],[348,1],[349,1],[350,1],[351,1],[141,1],[139,1],[352,1],[390,1],[353,1],[354,1],[355,1],[356,1],[357,1],[358,1],[359,1],[360,1],[361,1],[362,1],[134,1],[363,1],[364,1],[365,1],[366,1],[367,1],[368,1],[369,1],[370,1],[371,1],[372,1],[373,1],[374,1],[391,1],[375,1],[338,1],[389,1],[376,1],[377,1],[379,1],[380,1],[378,1],[381,1],[382,1],[383,1],[384,1],[385,1],[386,1],[140,1],[69,1],[54,1],[66,1],[67,1],[254,1],[53,1],[56,1],[70,1],[255,1],[52,1],[58,1],[268,1],[256,1],[89,1],[88,1],[83,1],[84,1],[252,1],[245,1],[251,1],[72,1],[86,1],[90,1],[259,1],[246,1],[78,1],[262,1],[79,1],[80,1],[82,1],[249,1],[81,1],[260,1],[85,1],[265,1],[264,1],[47,1],[60,1],[61,1],[488,1],[489,1],[485,1],[487,1],[486,1],[178,1],[179,1],[185,1],[180,1],[191,1],[181,1],[182,1],[187,1],[186,1],[188,1],[183,1],[173,1],[193,1],[194,1],[174,1],[176,1],[286,1],[463,1],[464,1],[465,1],[466,1],[467,1],[468,1],[469,1],[470,1],[471,1],[472,1],[473,1],[474,1],[475,1],[476,1],[477,1],[478,1],[479,1],[483,1],[484,1],[491,1],[492,1],[493,1],[494,1],[495,1],[496,1],[497,1],[498,1],[499,1],[500,1],[501,1],[502,1],[503,1],[504,1],[505,1],[506,1],[507,1],[508,1],[509,1],[510,1],[511,1],[512,1],[513,1],[514,1],[515,1],[517,1],[518,1],[519,1],[516,1],[520,1],[521,1],[522,1],[523,1],[524,1],[615,1],[580,1],[616,1],[613,1],[525,1],[526,1],[527,1],[528,1],[529,1],[530,1],[531,1],[533,1],[532,1],[534,1],[535,1],[536,1],[537,1],[538,1],[539,1],[540,1],[541,1],[542,1],[543,1],[544,1],[545,1],[546,1],[547,1],[548,1],[549,1],[550,1],[551,1],[552,1],[553,1],[554,1],[555,1],[556,1],[557,1],[558,1],[609,1],[559,1],[560,1],[561,1],[562,1],[563,1],[564,1],[565,1],[566,1],[567,1],[568,1],[569,1],[570,1],[571,1],[572,1],[608,1],[573,1],[574,1],[575,1],[576,1],[577,1],[578,1],[614,1],[579,1],[582,1],[581,1],[584,1],[583,1],[585,1],[586,1],[587,1],[589,1],[590,1],[591,1],[592,1],[594,1],[595,1],[596,1],[611,1],[598,1],[599,1],[610,1],[605,1],[606,1],[597,1],[607,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[126,1],[299,1],[460,1],[310,1]]},"version":"4.9.5"} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.protoBin b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..2fe0e7b3cbeaa8f5c32946627679acc9125901c5 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.protoBin differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..103a245cbcde9f95c7b0b62ef9c7b8b2c1c80727 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,39 @@ +import ConfigurationConstant from "@ohos:app.ability.ConfigurationConstant"; +import UIAbility from "@ohos:app.ability.UIAbility"; +import type AbilityConstant from "@ohos:app.ability.AbilityConstant"; +import type Want from "@ohos:app.ability.Want"; +import hilog from "@ohos:hilog"; +import type window from "@ohos:window"; +const DOMAIN = 0x0000; +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.protoBin b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..fb6a9253fbbe857e502fd5fe7bfab8e77214dee6 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.protoBin differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.ts new file mode 100644 index 0000000000000000000000000000000000000000..c155f00d0166587b71cb57687ace23bda92aff9e --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.ts @@ -0,0 +1,68 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Index_Params { + message?: string; +} +class Index extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__message = new ObservedPropertySimplePU('Hello World', this, "message"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Index_Params) { + if (params.message !== undefined) { + this.message = params.message; + } + } + updateStateVars(params: Index_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__message.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__message.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __message: ObservedPropertySimplePU; + get message() { + return this.__message.get(); + } + set message(newValue: string) { + this.__message.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + RelativeContainer.create(); + RelativeContainer.height('100%'); + RelativeContainer.width('100%'); + }, RelativeContainer); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.message); + Text.id('HelloWorld'); + Text.fontSize({ "id": 16777224, "type": 10002, params: [], "bundleName": "com.third.hiworld.example1", "moduleName": "com.third.hiworld.example.h1" }); + Text.fontWeight(FontWeight.Bold); + Text.alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }); + Text.onClick(() => { + this.message = 'Welcome'; + }); + }, Text); + Text.pop(); + RelativeContainer.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Index"; + } +} +registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.third.hiworld.example1", moduleName: "com.third.hiworld.example.h1", pagePath: "pages/Index", pageFullPath: "entry/src/main/ets/pages/Index", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compileContextInfo.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compileContextInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..e9dc96079dd358983e32c78280773cb927b03696 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compileContextInfo.json @@ -0,0 +1 @@ +{"hspPkgNames":[],"compileEntries":["&entry/src/main/ets/entryability/EntryAbility&","&entry/src/main/ets/pages/Index&"],"pkgContextInfo":{"@ohos/hypium":{"packageName":"@ohos/hypium","bundleName":"","moduleName":"","version":"1.0.21","entryPath":"index.js","isSO":false,"dependencyAlias":""},"@ohos/hamock":{"packageName":"@ohos/hamock","bundleName":"","moduleName":"","version":"1.0.0","entryPath":"index.ets","isSO":false,"dependencyAlias":""},"entry":{"packageName":"entry","bundleName":"","moduleName":"","version":"","entryPath":"src/main/","isSO":false,"dependencyAlias":""}}} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/modules/%work%openharmony%foundation%bundlemanager%bundle_framework%test%sceneProject%systemtest%stThirdBundle%bmsThirdBundle44%entry%src%main%ets%entryability%EntryAbility.ets.msgpack b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/modules/%work%openharmony%foundation%bundlemanager%bundle_framework%test%sceneProject%systemtest%stThirdBundle%bmsThirdBundle44%entry%src%main%ets%entryability%EntryAbility.ets.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..4d93ae5d2a87efcfd28289e465d46d26933c3a20 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/modules/%work%openharmony%foundation%bundlemanager%bundle_framework%test%sceneProject%systemtest%stThirdBundle%bmsThirdBundle44%entry%src%main%ets%entryability%EntryAbility.ets.msgpack differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/modules/%work%openharmony%foundation%bundlemanager%bundle_framework%test%sceneProject%systemtest%stThirdBundle%bmsThirdBundle44%entry%src%main%ets%pages%Index.ets.msgpack b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/modules/%work%openharmony%foundation%bundlemanager%bundle_framework%test%sceneProject%systemtest%stThirdBundle%bmsThirdBundle44%entry%src%main%ets%pages%Index.ets.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..6228d94f74dc4407fd270225acbec9189820aa9d Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/modules/%work%openharmony%foundation%bundlemanager%bundle_framework%test%sceneProject%systemtest%stThirdBundle%bmsThirdBundle44%entry%src%main%ets%pages%Index.ets.msgpack differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/other/pkgName2SourceRoots.msgpack b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/other/pkgName2SourceRoots.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..e0bdb76fe6759066b2a5f39fe5f21272c3ed36c2 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/other/pkgName2SourceRoots.msgpack @@ -0,0 +1 @@ +r@ \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/plugins/plugins.msgpack b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/plugins/plugins.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..65df527bd642581754fd4c3bea8251342e73547e Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/compiler.cache/plugins/plugins.msgpack differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/dep_info.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/dep_info.json new file mode 100644 index 0000000000000000000000000000000000000000..98b5ce04255c4b07702a33b62be6b1cccdf2297e --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/dep_info.json @@ -0,0 +1 @@ +{"resolveConflictMode":true} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/filesInfo.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/filesInfo.txt new file mode 100644 index 0000000000000000000000000000000000000000..2f1c9c7d4290f1ccb364ee70c888faef75242870 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/filesInfo.txt @@ -0,0 +1,2 @@ +/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.ts;&entry/src/main/ets/entryability/EntryAbility&;esm;entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts;entry;false;ets +/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.ts;&entry/src/main/ets/pages/Index&;esm;entry|entry|1.0.0|src/main/ets/pages/Index.ts;entry;false;ets diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/modules.cache b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/modules.cache new file mode 100644 index 0000000000000000000000000000000000000000..7755183bce2b5220cc4c358160a58aa18b5337f3 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/modules.cache @@ -0,0 +1,3 @@ +/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.ts;/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/entryability/EntryAbility.protoBin +/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.ts;/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/com.third.hiworld.example.h1/src/main/ets/pages/Index.protoBin +/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.txt;/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.protoBin diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.protoBin b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..799cf238c6029a20f1f8326e7cf8309d0a48d7df Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.protoBin differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.txt new file mode 100644 index 0000000000000000000000000000000000000000..5c9e7b7c87dc3f4cb7f203ad5143af2c090ecc5f --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/npmEntries.txt @@ -0,0 +1,7 @@ +@system.app:@native.system.app +@ohos.app:@native.ohos.app +@system.router:@native.system.router +@system.curves:@native.system.curves +@ohos.curves:@native.ohos.curves +@system.matrix4:@native.system.matrix4 +@ohos.matrix4:@native.ohos.matrix4 diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.json new file mode 100644 index 0000000000000000000000000000000000000000..20363d5622951788148d12b6042aee53512fe38c --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.json @@ -0,0 +1,2 @@ +{"key": "entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts", "val": {"version":3,"file":"EntryAbility.ets","sourceRoot":"","sources":["entry/src/main/ets/entryability/EntryAbility.ets"],"names":[],"mappings":";;;;;;AAIA,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,GAAG,IAAI;QAClE,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACtG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,IAAI,IAAI;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;IAED,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QACxD,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,6BAA6B,CAAC,CAAC;QAE3E,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,IAAI,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,OAAO;aACR;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,mCAAmC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,IAAI,IAAI;QAC1B,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;IAC9E,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,oCAAoC;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,iCAAiC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;CACF","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/Index.ts", "val": {"version":3,"file":"Index.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/Index.ets"],"names":[],"mappings":";;;;IAGS,OAAO,GAAE,MAAM;;MADjB,KAAK;IAFZ;;;;;sDAG2B,aAAa;;;KAHxC;;;;;;;;;;;;;;;;IAGE,4CAAgB,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAEtB;;YACE,iBAAiB;YAAjB,iBAAiB,CAahB,MAAM,CAAC,MAAM;YAbd,iBAAiB,CAchB,KAAK,CAAC,MAAM;;;YAbX,IAAI,QAAC,IAAI,CAAC,OAAO;YAAjB,IAAI,CACD,EAAE,CAAC,YAAY;YADlB,IAAI,CAED,QAAQ;YAFX,IAAI,CAGD,UAAU,CAAC,UAAU,CAAC,IAAI;YAH7B,IAAI,CAID,UAAU,CAAC;gBACV,MAAM,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,CAAC,MAAM,EAAE;gBAChE,MAAM,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,CAAC,MAAM,EAAE;aACnE;YAPH,IAAI,CAQD,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;YAC3B,CAAC;;QAVH,IAAI;QADN,iBAAiB;KAelB","entry-package-info":"entry|1.0.0"}} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.map b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.map new file mode 100644 index 0000000000000000000000000000000000000000..7c175c70dbf519382eb23c8979d41560dcf50690 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/cache/default/default@CompileArkTS/esmodule/release/sourceMaps.map @@ -0,0 +1,24 @@ +{ + "entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts": { + "version": 3, + "file": "EntryAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entryability/EntryAbility.ets" + ], + "names": [], + "mappings": ";;;;;;AAIA,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,GAAG,IAAI;QAClE,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACtG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,IAAI,IAAI;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;IAED,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QACxD,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,6BAA6B,CAAC,CAAC;QAE3E,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,IAAI,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,OAAO;aACR;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,mCAAmC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,IAAI,IAAI;QAC1B,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;IAC9E,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,oCAAoC;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,iCAAiC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/Index.ts": { + "version": 3, + "file": "Index.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/Index.ets" + ], + "names": [], + "mappings": ";;;;IAGS,OAAO,GAAE,MAAM;;MADjB,KAAK;IAFZ;;;;;sDAG2B,aAAa;;;KAHxC;;;;;;;;;;;;;;;;IAGE,4CAAgB,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAEtB;;YACE,iBAAiB;YAAjB,iBAAiB,CAahB,MAAM,CAAC,MAAM;YAbd,iBAAiB,CAchB,KAAK,CAAC,MAAM;;;YAbX,IAAI,QAAC,IAAI,CAAC,OAAO;YAAjB,IAAI,CACD,EAAE,CAAC,YAAY;YADlB,IAAI,CAED,QAAQ;YAFX,IAAI,CAGD,UAAU,CAAC,UAAU,CAAC,IAAI;YAH7B,IAAI,CAID,UAAU,CAAC;gBACV,MAAM,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,aAAa,CAAC,MAAM,EAAE;gBAChE,MAAM,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,CAAC,MAAM,EAAE;aACnE;YAPH,IAAI,CAQD,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;YAC3B,CAAC;;QAVH,IAAI;QADN,iBAAiB;KAelB", + "entry-package-info": "entry|1.0.0" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/profile/default/BuildProfile.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/profile/default/BuildProfile.ets new file mode 100644 index 0000000000000000000000000000000000000000..6715ee8e1171b8d8333269f018999d77797af83a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/profile/default/BuildProfile.ets @@ -0,0 +1,25 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const BUNDLE_NAME = 'com.third.hiworld.example1'; +export const BUNDLE_TYPE = 'app'; +export const VERSION_CODE = 1; +export const VERSION_NAME = '1.0'; +export const TARGET_NAME = 'default'; +export const PRODUCT_NAME = 'default'; +export const BUILD_MODE_NAME = 'release'; +export const DEBUG = false; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly BUNDLE_NAME = BUNDLE_NAME; + static readonly BUNDLE_TYPE = BUNDLE_TYPE; + static readonly VERSION_CODE = VERSION_CODE; + static readonly VERSION_NAME = VERSION_NAME; + static readonly TARGET_NAME = TARGET_NAME; + static readonly PRODUCT_NAME = PRODUCT_NAME; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/r/default/ResourceTable.h b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/r/default/ResourceTable.h new file mode 100644 index 0000000000000000000000000000000000000000..8793c51fd69eff4c8f723fcd89d475b0975673fa --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/r/default/ResourceTable.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef RESOURCE_TABLE_H +#define RESOURCE_TABLE_H + +#include + +namespace OHOS { +const int32_t STRING_ENTRYABILITY_DESC = 0x01000004; +const int32_t STRING_ENTRYABILITY_LABEL = 0x01000005; +const int32_t STRING_APP_NAME = 0x01000000; +const int32_t STRING_MODULE_DESC = 0x01000006; +const int32_t COLOR_START_WINDOW_BACKGROUND = 0x01000007; +const int32_t FLOAT_PAGE_TEXT_FONT_SIZE = 0x01000008; +const int32_t MEDIA_APP_BACKGROUND = 0x01000001; +const int32_t MEDIA_APP_FOREGROUND = 0x01000002; +const int32_t MEDIA_APP_LAYERED_IMAGE = 0x01000003; +const int32_t MEDIA_BACKGROUND = 0x01000009; +const int32_t MEDIA_FOREGROUND = 0x0100000a; +const int32_t MEDIA_LAYERED_IMAGE = 0x0100000b; +const int32_t MEDIA_STARTICON = 0x0100000c; +const int32_t PROFILE_BACKUP_CONFIG = 0x0100000d; +const int32_t PROFILE_MAIN_PAGES = 0x0100000e; +} +#endif \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/hap_metadata/default/output_metadata.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/hap_metadata/default/output_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..cfc75071e647e0c5bd0f32434a7a5173cac1eb36 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/hap_metadata/default/output_metadata.json @@ -0,0 +1 @@ +[{"hapName":"com.third.hiworld.example.h1-default-unsigned.hap","deviceTypes":["2in1","tablet","default","tv"],"isSigned":false}] diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader/default/loader.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader/default/loader.json new file mode 100644 index 0000000000000000000000000000000000000000..4ecedd3c43c1133e99b3cad020c7aa572a52538f --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader/default/loader.json @@ -0,0 +1,21 @@ +{ + "modulePathMap": { + "com.third.hiworld.example.h1": "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry" + }, + "compileMode": "esmodule", + "projectRootPath": "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44", + "nodeModulesPath": "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader_out/default/node_modules", + "byteCodeHarInfo": {}, + "declarationEntry": [], + "moduleName": "com.third.hiworld.example.h1", + "hspNameOhmMap": {}, + "harNameOhmMap": {}, + "packageManagerType": "ohpm", + "compileEntry": [], + "otherCompileFiles": [], + "dynamicImportLibInfo": {}, + "routerMap": [], + "hspResourcesMap": {}, + "anBuildOutPut": "/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader_out/default/an/arm64-v8a", + "anBuildMode": "type" +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader/default/pkgContextInfo.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader/default/pkgContextInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..a8af6d1a4083943f95aa49577a701d01840438d4 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader/default/pkgContextInfo.json @@ -0,0 +1 @@ +{"@ohos/hypium":{"packageName":"@ohos/hypium","bundleName":"","moduleName":"","version":"1.0.21","entryPath":"index.js","isSO":false,"dependencyAlias":""},"@ohos/hamock":{"packageName":"@ohos/hamock","bundleName":"","moduleName":"","version":"1.0.0","entryPath":"index.ets","isSO":false,"dependencyAlias":""},"entry":{"packageName":"entry","bundleName":"","moduleName":"","version":"","entryPath":"src/main/","isSO":false,"dependencyAlias":""}} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader_out/default/ets/modules.abc b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader_out/default/ets/modules.abc new file mode 100644 index 0000000000000000000000000000000000000000..df76628f716a46f92a1e5df17eed8f4eecb17da3 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/loader_out/default/ets/modules.abc differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/merge_profile/default/module.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/merge_profile/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..8595ecd54b598b6c0a7e636a8f00e54d0a648290 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/merge_profile/default/module.json @@ -0,0 +1,57 @@ +{ + "app": { + "bundleName": "com.third.hiworld.example1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name", + "apiReleaseType": "Beta1", + "compileSdkVersion": "6.0.0.41", + "targetAPIVersion": 20, + "minAPIVersion": 20, + "compileSdkType": "OpenHarmony", + "appEnvironments": [], + "bundleType": "app" + }, + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "2in1", + "tablet", + "default", + "tv" + ], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "PageAbilityDemo", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true, + "skills": [ + { + "actions": [ + "ohos.aafwk.content.Want.ACTION_HOME" + ], + "entities": [ + "ohos.aafwk.content.Want.ENTITY_HOME" + ] + } + ] + } + ], + "packageName": "entry", + "installationFree": false + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/package/default/module.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/package/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..12fed5efc4f1f17ea4aab009008498060ff2cc34 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/package/default/module.json @@ -0,0 +1,55 @@ +{ + "app": { + "bundleName": "com.third.hiworld.example1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name", + "apiReleaseType": "Beta1", + "compileSdkVersion": "6.0.0.41", + "targetAPIVersion": 20, + "minAPIVersion": 20, + "compileSdkType": "OpenHarmony", + "appEnvironments": [], + "bundleType": "app", + "iconId": 16777219, + "labelId": 16777216 + }, + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": ["2in1", "tablet", "default", "tv"], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [{ + "name": "PageAbilityDemo", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true, + "skills": [{ + "actions": ["ohos.aafwk.content.Want.ACTION_HOME"], + "entities": ["ohos.aafwk.content.Want.ENTITY_HOME"] + }], + "descriptionId": 16777220, + "iconId": 16777227, + "labelId": 16777221, + "startWindowIconId": 16777228, + "startWindowBackgroundId": 16777223 + }], + "packageName": "entry", + "installationFree": false, + "virtualMachine": "ark13.0.1.0", + "compileMode": "esmodule", + "dependencies": [], + "descriptionId": 16777222 + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/patch/default/base_native_libs.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/patch/default/base_native_libs.json new file mode 100644 index 0000000000000000000000000000000000000000..f374f010c198cc570e0a9986cfe8ffbfdeaa9745 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/patch/default/base_native_libs.json @@ -0,0 +1 @@ +{"libs":{},"stripped":{}} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/process_profile/default/module.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/process_profile/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..7ee153649e35a6dd9fff9c08aaea7ecb42efa222 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/process_profile/default/module.json @@ -0,0 +1,60 @@ +{ + "app": { + "bundleName": "com.third.hiworld.example1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name", + "apiReleaseType": "Beta1", + "compileSdkVersion": "6.0.0.41", + "targetAPIVersion": 20, + "minAPIVersion": 20, + "compileSdkType": "OpenHarmony", + "appEnvironments": [], + "bundleType": "app" + }, + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "2in1", + "tablet", + "default", + "tv" + ], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "PageAbilityDemo", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true, + "skills": [ + { + "actions": [ + "ohos.aafwk.content.Want.ACTION_HOME" + ], + "entities": [ + "ohos.aafwk.content.Want.ENTITY_HOME" + ] + } + ] + } + ], + "packageName": "entry", + "installationFree": false, + "virtualMachine": "ark13.0.1.0", + "compileMode": "esmodule", + "dependencies": [] + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ResourceTable.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ResourceTable.txt new file mode 100644 index 0000000000000000000000000000000000000000..82416de163beb2734512c482fb071db89145e4a3 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ResourceTable.txt @@ -0,0 +1,15 @@ +string EntryAbility_desc 0x01000004 +string EntryAbility_label 0x01000005 +string app_name 0x01000000 +string module_desc 0x01000006 +color start_window_background 0x01000007 +float page_text_font_size 0x01000008 +media app_background 0x01000001 +media app_foreground 0x01000002 +media app_layered_image 0x01000003 +media background 0x01000009 +media foreground 0x0100000a +media layered_image 0x0100000b +media startIcon 0x0100000c +profile backup_config 0x0100000d +profile main_pages 0x0100000e \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ids_map/id_defined.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ids_map/id_defined.json new file mode 100644 index 0000000000000000000000000000000000000000..7d9c71fbafbd568e543b824f7f0d0904b5562686 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ids_map/id_defined.json @@ -0,0 +1,63 @@ +{ + "record": [{ + "type": "string", + "name": "app_name", + "id": "0x01000000" + }, { + "type": "media", + "name": "app_background", + "id": "0x01000001" + }, { + "type": "media", + "name": "app_foreground", + "id": "0x01000002" + }, { + "type": "media", + "name": "app_layered_image", + "id": "0x01000003" + }, { + "type": "string", + "name": "EntryAbility_desc", + "id": "0x01000004" + }, { + "type": "string", + "name": "EntryAbility_label", + "id": "0x01000005" + }, { + "type": "string", + "name": "module_desc", + "id": "0x01000006" + }, { + "type": "color", + "name": "start_window_background", + "id": "0x01000007" + }, { + "type": "float", + "name": "page_text_font_size", + "id": "0x01000008" + }, { + "type": "media", + "name": "background", + "id": "0x01000009" + }, { + "type": "media", + "name": "foreground", + "id": "0x0100000A" + }, { + "type": "media", + "name": "layered_image", + "id": "0x0100000B" + }, { + "type": "media", + "name": "startIcon", + "id": "0x0100000C" + }, { + "type": "profile", + "name": "backup_config", + "id": "0x0100000D" + }, { + "type": "profile", + "name": "main_pages", + "id": "0x0100000E" + }] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/module.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..12fed5efc4f1f17ea4aab009008498060ff2cc34 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/module.json @@ -0,0 +1,55 @@ +{ + "app": { + "bundleName": "com.third.hiworld.example1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name", + "apiReleaseType": "Beta1", + "compileSdkVersion": "6.0.0.41", + "targetAPIVersion": 20, + "minAPIVersion": 20, + "compileSdkType": "OpenHarmony", + "appEnvironments": [], + "bundleType": "app", + "iconId": 16777219, + "labelId": 16777216 + }, + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": ["2in1", "tablet", "default", "tv"], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [{ + "name": "PageAbilityDemo", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true, + "skills": [{ + "actions": ["ohos.aafwk.content.Want.ACTION_HOME"], + "entities": ["ohos.aafwk.content.Want.ENTITY_HOME"] + }], + "descriptionId": 16777220, + "iconId": 16777227, + "labelId": 16777221, + "startWindowIconId": 16777228, + "startWindowBackgroundId": 16777223 + }], + "packageName": "entry", + "installationFree": false, + "virtualMachine": "ark13.0.1.0", + "compileMode": "esmodule", + "dependencies": [], + "descriptionId": 16777222 + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/opt-compression.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/opt-compression.json new file mode 100644 index 0000000000000000000000000000000000000000..8cedb0a4a741d07ea340fcdd96ba7bf4be03aeba --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/opt-compression.json @@ -0,0 +1 @@ +{"context":{"extensionPath":""},"compression":{"media":{"enable":false},"filters":[]}} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resConfig.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..ed3529a3ef0c3bc52db29a9d511bdc2aebf0d308 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resConfig.json @@ -0,0 +1 @@ +{"configPath":"/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/process_profile/default/module.json","packageName":"com.third.hiworld.example1","output":"/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default","moduleNames":"com.third.hiworld.example.h1","ResourceTable":["/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/generated/r/default/ResourceTable.h"],"applicationResource":"/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/AppScope/resources","moduleResources":["/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources"],"dependencies":[],"iconCheck":true,"compression":"/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/opt-compression.json","ids":"/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ids_map","definedIds":"/work/openharmony/foundation/bundlemanager/bundle_framework/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/ids_map/id_defined.json"} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources.index b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources.index new file mode 100644 index 0000000000000000000000000000000000000000..bd7d81627a74832b797ef1eea0318fcee78c1042 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources.index differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..88e305e7ad5490d2333d1881cf965cff65e1c196 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/app_layered_image.json @@ -0,0 +1,6 @@ +{ + "layered-image": { + "background": "$media:16777217", + "foreground": "$media:16777218" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..b3d7ef8fdf06fc78f41272c541d49ed2ec286609 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/layered_image.json @@ -0,0 +1,6 @@ +{ + "layered-image": { + "background": "$media:16777225", + "foreground": "$media:16777226" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/startIcon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/media/startIcon.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/profile/backup_config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/profile/main_pages.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/res/default/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/router_map/default/loader-router-map.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/router_map/default/loader-router-map.json new file mode 100644 index 0000000000000000000000000000000000000000..0ec611b0f7ae29df1d089f3bb60294150b4e0a4d --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/router_map/default/loader-router-map.json @@ -0,0 +1 @@ +{"routerMap":[]} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/router_map/default/temp-router-map.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/router_map/default/temp-router-map.json new file mode 100644 index 0000000000000000000000000000000000000000..0ec611b0f7ae29df1d089f3bb60294150b4e0a4d --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/router_map/default/temp-router-map.json @@ -0,0 +1 @@ +{"routerMap":[]} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/syscap/default/rpcid.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/syscap/default/rpcid.json new file mode 100644 index 0000000000000000000000000000000000000000..0aab5072de6ed22afa663f7919e6ff544c32c532 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/syscap/default/rpcid.json @@ -0,0 +1 @@ +{"api_version":20,"syscap":["SystemCapability.Multimedia.Media.AVTranscoder","SystemCapability.Security.CryptoFramework.Kdf","SystemCapability.Security.CryptoFramework.Rand","SystemCapability.Security.CryptoFramework.Mac","SystemCapability.Security.CryptoFramework.MessageDigest","SystemCapability.Security.CryptoFramework.KeyAgreement","SystemCapability.Security.CryptoFramework.Cipher","SystemCapability.Security.CryptoFramework.Signature","SystemCapability.Security.CryptoFramework.Key.AsymKey","SystemCapability.Security.CryptoFramework.Key.SymKey","SystemCapability.Security.CryptoFramework.Key","SystemCapability.HiviewDFX.HiCollie","SystemCapability.Security.CertificateManagerDialog","SystemCapability.Ability.AppExtension.PhotoEditorExtension","SystemCapability.Customization.CustomConfig","SystemCapability.Ability.AppStartup","SystemCapability.Multimedia.Media.AVMetadataExtractor","SystemCapability.Multimedia.Media.AVImageGenerator","SystemCapability.Security.Huks.Extension","SystemCapability.Graphic.Graphic2D.GLES3","SystemCapability.Graphic.Graphic2D.GLES2","SystemCapability.Graphic.Graphic2D.EGL","SystemCapability.Graphic.Vulkan","SystemCapability.Graphic.Graphic2D.HyperGraphicManager","SystemCapability.Graphic.Graphic2D.NativeVsync","SystemCapability.Graphic.Graphic2D.NativeImage","SystemCapability.Base","SystemCapability.Graphic.Graphic2D.NativeBuffer","SystemCapability.Graphic.Graphic2D.NativeWindow","SystemCapability.ArkUi.Graphics3D","SystemCapability.Graphic.Graphic2D.NativeDrawing","SystemCapability.FileManagement.PhotoAccessHelper.Core","SystemCapability.Resourceschedule.Ffrt.Core","SystemCapability.Applications.CalendarData","SystemCapability.ResourceSchedule.DeviceStandby","SystemCapability.Graphic.Graphic2D.ColorManager.Core","SystemCapability.Multimedia.SystemSound.Core","SystemCapability.Multimedia.AudioHaptic.Core","SystemCapability.Security.Huks.Core","SystemCapability.Startup.SystemInfo","SystemCapability.Ability.DistributedAbilityManager","SystemCapability.Graphic.Graphic2D.WebGL2","SystemCapability.Graphic.Graphic2D.WebGL","SystemCapability.Multimedia.Audio.Spatialization","SystemCapability.Multimedia.AVSession.Manager","SystemCapability.Multimedia.AVSession.Core","SystemCapability.Multimedia.Media.Core","SystemCapability.Graphics.Drawing","SystemCapability.Multimedia.Media.AudioCodec","SystemCapability.HiviewDFX.Hiview.LogLibrary","SystemCapability.HiviewDFX.Hiview.FaultLogger","SystemCapability.Ability.AbilityBase","SystemCapability.Security.CryptoFramework","SystemCapability.Update.UpdateService","SystemCapability.Multimedia.Image.ImageCreator","SystemCapability.Multimedia.Image.ImageSource","SystemCapability.Multimedia.Image.ImagePacker","SystemCapability.Multimedia.Image.ImageReceiver","SystemCapability.Multimedia.Image.Core","SystemCapability.FileManagement.StorageService.Encryption","SystemCapability.FileManagement.StorageService.Volume","SystemCapability.FileManagement.StorageService.SpatialStatistics","SystemCapability.ArkUI.ArkUI.Napi","SystemCapability.Security.DataTransitManager","SystemCapability.HiviewDFX.HiChecker","SystemCapability.ArkUI.UiAppearance","SystemCapability.DistributedDataManager.Preferences.Core","SystemCapability.PowerManager.PowerManager.Extension","SystemCapability.PowerManager.PowerManager.Core","SystemCapability.HiviewDFX.HiSysEvent","SystemCapability.Security.DeviceSecurityLevel","SystemCapability.DistributedDataManager.DataShare.Provider","SystemCapability.DistributedDataManager.DataShare.Core","SystemCapability.DistributedDataManager.DataShare.Consumer","SystemCapability.Communication.SoftBus.Core","SystemCapability.Communication.IPC.Core","SystemCapability.XTS.DeviceAttest","SystemCapability.ArkUI.ArkUI.Libuv","SystemCapability.Security.Cert","SystemCapability.Security.DeviceAuth","SystemCapability.Test.UiTest","SystemCapability.Applications.Settings.Core","SystemCapability.HiviewDFX.HiAppEvent","SystemCapability.Customization.ConfigPolicy","SystemCapability.Advertising.OAID","SystemCapability.UserIAM.UserAuth.Core","SystemCapability.MiscServices.Time","SystemCapability.MultimodalInput.Input.ShortKey","SystemCapability.MultimodalInput.Input.InputMonitor","SystemCapability.MultimodalInput.Input.InputSimulator","SystemCapability.MultimodalInput.Input.Core","SystemCapability.MultimodalInput.Input.InputDevice","SystemCapability.MultimodalInput.Input.InputConsumer","SystemCapability.Multimedia.Drm.Core","SystemCapability.DistributedDataManager.UDMF.Core","SystemCapability.ResourceSchedule.WorkScheduler","SystemCapability.Security.Asset","SystemCapability.USB.USBManager","SystemCapability.Security.AccessToken","SystemCapability.Communication.NetManager.Core","SystemCapability.ResourceSchedule.UsageStatistics.AppGroup","SystemCapability.ResourceSchedule.UsageStatistics.App","SystemCapability.Communication.NetStack","SystemCapability.Security.CertificateManager","SystemCapability.BundleManager.BundleFramework.Overlay","SystemCapability.BundleManager.BundleFramework.Resource","SystemCapability.BundleManager.BundleFramework.DefaultApp","SystemCapability.BundleManager.BundleFramework.Launcher","SystemCapability.BundleManager.BundleFramework.FreeInstall","SystemCapability.BundleManager.BundleFramework.Core","SystemCapability.BundleManager.BundleFramework.AppControl","SystemCapability.BundleManager.Zlib","SystemCapability.BundleManager.BundleFramework","SystemCapability.Web.Webview.Core","SystemCapability.Communication.NetManager.MDNS","SystemCapability.Communication.NetManager.Ethernet","SystemCapability.FileManagement.UserFileManager.Core","SystemCapability.Multimedia.MediaLibrary.DistributedCore","SystemCapability.Multimedia.MediaLibrary.Core","SystemCapability.Multimedia.Audio.PlaybackCapture","SystemCapability.Multimedia.Audio.Interrupt","SystemCapability.Multimedia.Audio.Tone","SystemCapability.Multimedia.Audio.Communication","SystemCapability.Multimedia.Audio.Volume","SystemCapability.Multimedia.Audio.Device","SystemCapability.Multimedia.Audio.Capturer","SystemCapability.Multimedia.Audio.Renderer","SystemCapability.Multimedia.Audio.Core","SystemCapability.Request.FileTransferAgent","SystemCapability.MiscServices.Upload","SystemCapability.MiscServices.Download","SystemCapability.Multimedia.Media.CodecBase","SystemCapability.Multimedia.Media.VideoEncoder","SystemCapability.Multimedia.Media.VideoDecoder","SystemCapability.Multimedia.Media.AudioEncoder","SystemCapability.Multimedia.Media.AudioDecoder","SystemCapability.Multimedia.Media.Spliter","SystemCapability.Multimedia.Media.Muxer","SystemCapability.Account.OsAccount","SystemCapability.Account.AppAccount","SystemCapability.Multimedia.Media.SoundPool","SystemCapability.Multimedia.Media.AVScreenCapture","SystemCapability.Multimedia.Media.AudioPlayer","SystemCapability.Multimedia.Media.VideoPlayer","SystemCapability.Multimedia.Media.AudioRecorder","SystemCapability.Multimedia.Media.VideoRecorder","SystemCapability.Multimedia.Media.AVPlayer","SystemCapability.Multimedia.Media.AVRecorder","SystemCapability.Ability.Form","SystemCapability.HiviewDFX.HiProfiler.HiDebug","SystemCapability.Notification.ReminderAgent","SystemCapability.Notification.Notification","SystemCapability.HiviewDFX.HiLog","SystemCapability.DistributedHardware.DeviceManager","SystemCapability.Developtools.Syscap","SystemCapability.Ability.AbilityTools.AbilityAssistant","SystemCapability.Ability.AbilityRuntime.QuickFix","SystemCapability.Ability.AbilityRuntime.Mission","SystemCapability.Ability.AbilityRuntime.AbilityCore","SystemCapability.Ability.AbilityRuntime.FAModel","SystemCapability.Ability.AbilityRuntime.Core","SystemCapability.Global.ResourceManager","SystemCapability.Multimedia.AVSession.AVCast","SystemCapability.Communication.WiFi.Core","SystemCapability.Communication.WiFi.P2P","SystemCapability.Communication.WiFi.STA","SystemCapability.FileManagement.UserFileService","SystemCapability.Utils.Lang","SystemCapability.DistributedDataManager.CommonType","SystemCapability.DistributedDataManager.RelationalStore.Core","SystemCapability.MiscServices.InputMethodFramework","SystemCapability.HiviewDFX.HiTrace","SystemCapability.Sensors.MiscDevice","SystemCapability.Notification.Emitter","SystemCapability.Notification.CommonEvent","SystemCapability.DistributedDataManager.KVStore.Core","SystemCapability.DistributedDataManager.KVStore.DistributedKVStore","SystemCapability.WindowManager.WindowManager.Core","SystemCapability.DistributedDataManager.DataObject.DistributedObject","SystemCapability.FileManagement.StorageService.Backup","SystemCapability.FileManagement.AppFileService","SystemCapability.Communication.Bluetooth.Core","SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply","SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask","SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask","SystemCapability.FileManagement.File.Environment","SystemCapability.FileManagement.File.FileIO","SystemCapability.ArkUI.ArkUI.Full","SystemCapability.Global.I18n"]} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/syscap/default/rpcid.sc b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/syscap/default/rpcid.sc new file mode 100644 index 0000000000000000000000000000000000000000..2b857e25a08f5aa979e93cb6a85b7e6f8ed48743 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/intermediates/syscap/default/rpcid.sc differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/app/com.third.hiworld.example.h1-default.hap b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/app/com.third.hiworld.example.h1-default.hap new file mode 100644 index 0000000000000000000000000000000000000000..a02b16a758eabbd725de71c00f37c999b71a7c94 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/app/com.third.hiworld.example.h1-default.hap differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/com.third.hiworld.example.h1-default-unsigned.hap b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/com.third.hiworld.example.h1-default-unsigned.hap new file mode 100644 index 0000000000000000000000000000000000000000..a02b16a758eabbd725de71c00f37c999b71a7c94 Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/com.third.hiworld.example.h1-default-unsigned.hap differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/pack.info b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/pack.info new file mode 100644 index 0000000000000000000000000000000000000000..281e4e6b631621f854e122ca8138268bf20448b0 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/build/default/outputs/default/pack.info @@ -0,0 +1 @@ +{"summary":{"app":{"bundleName":"com.third.hiworld.example1","bundleType":"app","version":{"code":1,"name":"1.0"}},"modules":[{"mainAbility":"EntryAbility","deviceType":["2in1","tablet","default","tv"],"abilities":[{"name":"PageAbilityDemo","label":"$string:EntryAbility_label","visible":true}],"distro":{"moduleType":"entry","installationFree":false,"deliveryWithInstall":true,"moduleName":"com.third.hiworld.example.h1"},"apiVersion":{"compatible":20,"releaseType":"Beta1","target":20}}]},"packages":[{"deviceType":["2in1","tablet","default","tv"],"moduleType":"entry","deliveryWithInstall":true,"name":"com.third.hiworld.example.h1-default"}]} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfa8a00f74f409d9647f55cdf270ab6aec69fe41 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/obfuscation-rules.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..c1d419bdc6fa72c5914cc864ede925c53a2b01c5 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/obfuscation-rules.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/oh-package.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..b12b706076bc833e0f1c073e99881ef3b3a84004 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,44 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/pages/Index.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e2d24ad42693fc877d51bb7820f0a9da68fa135 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,23 @@ +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize($r('app.float.page_text_font_size')) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + .onClick(() => { + this.message = 'Welcome'; + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/module.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..99482ae00a6038da967ac4b082f3016683919cc2 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/module.json5 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "2in1", + "tablet", + "default", + "tv", + ], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "PageAbilityDemo", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true, + "skills": [ + { + "actions": [ + "ohos.aafwk.content.Want.ACTION_HOME" + ], + "entities": [ + "ohos.aafwk.content.Want.ENTITY_HOME" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/float.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/startIcon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/profile/backup_config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/profile/main_pages.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/dark/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/hvigor/hvigor-config.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3340f07e45ddc5dcadbb87012668555def2e6e0 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/oh-package.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..15ec86a73e760904339e9269d493e3015429d8a2 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/config.json deleted file mode 100755 index ac096f6924d290fb00f39e2438d760859d6abc96..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "app": { - "bundleName": "com.third.hiworld.example1", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 3, - "target": 3, - "releaseType": "Release" - } - }, - "deviceConfig": { - "default": {} - }, - "module": { - "package": "com.third.hiworld.example.h1", - "name": "bmsThirdBundle1", - "deviceType": [ - "2in1", - "tablet", - "default", - "tv", - "car" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "testability", - "moduleType": "entry" - }, - "abilities": [ - { - "name": "PageAbilityDemo", - "icon": "$media:snowball", - "srcLanguage": "c++", - "label": "bmsThirdBundle_A1 Ability", - "launchType": "singleton", - "orientation": "unspecified", - "type": "page", - "visible": true, - "skills": [ - { - "actions": [ - "ohos.aafwk.content.Want.ACTION_HOME" - ], - "entities": [ - "ohos.aafwk.content.Want.ENTITY_HOME" - ], - "attributes": [] - } - ] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/i18n/en-US.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/i18n/en-US.json deleted file mode 100755 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/i18n/zh-CN.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/i18n/zh-CN.json deleted file mode 100755 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.css b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.css deleted file mode 100755 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.hml b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.hml deleted file mode 100755 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/element/string.json deleted file mode 100755 index 4a5d2b0f227cd287e7fa240071e0509f2775bb16..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "permreason_example", - "value": "bmsfirstright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/media/icon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/media/icon.png deleted file mode 100755 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/media/snowball.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/media/snowball.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle44/src/main/js/resources/base/media/snowball.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/app.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ef1306dc8a98165e4073d05c619b84b351233665 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "bundleName": "com.third.hiworld.example1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..9f5cd292b2e27f6e9f8b82bdb4daefe826226e4e --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "com.third.hiworld.example1" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..b71c16122943f248ace0f5fa26da38b71dbdbdde --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/AppScope/resources/base/media/app_layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:app_background", + "foreground" : "$media:app_foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/BUILD.gn b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/BUILD.gn old mode 100755 new mode 100644 index 6fd6a1e02f101848bd91ba4989cc06775e5dd118..8d68d4f0d2981e2ef4a516c7c5af3776396179d0 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/BUILD.gn +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,22 +14,10 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("stbmsThirdBundle45") { - hap_profile = "./src/main/config.json" +ohos_app("stbmsThirdBundle45") { hap_name = "bmsThirdBundle45" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle/${hap_name}.hap" + hap_out_dir = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle" testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.third.hiworld.example1.p7b" } -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..a1e33acefa5a2ecf2e93944e3a101798abfb5284 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "targetSdkVersion": 20, + "compatibleSdkVersion": 20, + "compileSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "com.third.hiworld.example.h1", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b4d65d490ef6cbe22d933b9231555210f1555786 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfa8a00f74f409d9647f55cdf270ab6aec69fe41 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/obfuscation-rules.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..c1d419bdc6fa72c5914cc864ede925c53a2b01c5 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/obfuscation-rules.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/app.js b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/oh-package.json5 old mode 100755 new mode 100644 similarity index 69% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/app.js rename to test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/oh-package.json5 index 6abda63f0e61d4a957e4320291c42647eb231991..88976ebd7718ec5924c11ba3cbb5e9d836f4ae45 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle43/src/main/js/default/app.js +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/oh-package.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,11 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/ets/entryability/EntryAbility.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..b12b706076bc833e0f1c073e99881ef3b3a84004 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,44 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/ets/pages/Index.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e2d24ad42693fc877d51bb7820f0a9da68fa135 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,23 @@ +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize($r('app.float.page_text_font_size')) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + .onClick(() => { + this.message = 'Welcome'; + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/module.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..0414be38d0e5e039b20eb35f7e2a7a734f45e499 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/module.json5 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "com.third.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "2in1", + "tablet", + "default", + "tv" + ], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "PageAbilityDemo", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType": "singleton", + "orientation": "unspecified", + "visible": true, + "skills": [ + { + "actions": [ + "ohos.aafwk.content.Want.ACTION_HOME" + ], + "entities": [ + "ohos.aafwk.content.Want.ENTITY_HOME" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/float.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/startIcon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/profile/backup_config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/profile/main_pages.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/dark/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/hvigor/hvigor-config.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3340f07e45ddc5dcadbb87012668555def2e6e0 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/app.js b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/oh-package.json5 old mode 100755 new mode 100644 similarity index 70% rename from test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/app.js rename to test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/oh-package.json5 index 6abda63f0e61d4a957e4320291c42647eb231991..6f0858716430d2425f3f5d446851c11473143e30 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/app.js +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/oh-package.json5 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,11 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export default { - onCreate() { - console.info('AceApplication onCreate'); - }, - onDestroy() { - console.info('AceApplication onDestroy'); - } -}; + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/config.json deleted file mode 100755 index ac096f6924d290fb00f39e2438d760859d6abc96..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/config.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "app": { - "bundleName": "com.third.hiworld.example1", - "vendor": "example", - "version": { - "code": 1, - "name": "1.0" - }, - "apiVersion": { - "compatible": 3, - "target": 3, - "releaseType": "Release" - } - }, - "deviceConfig": { - "default": {} - }, - "module": { - "package": "com.third.hiworld.example.h1", - "name": "bmsThirdBundle1", - "deviceType": [ - "2in1", - "tablet", - "default", - "tv", - "car" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "testability", - "moduleType": "entry" - }, - "abilities": [ - { - "name": "PageAbilityDemo", - "icon": "$media:snowball", - "srcLanguage": "c++", - "label": "bmsThirdBundle_A1 Ability", - "launchType": "singleton", - "orientation": "unspecified", - "type": "page", - "visible": true, - "skills": [ - { - "actions": [ - "ohos.aafwk.content.Want.ACTION_HOME" - ], - "entities": [ - "ohos.aafwk.content.Want.ENTITY_HOME" - ], - "attributes": [] - } - ] - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": true - } - } - ] - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/i18n/en-US.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/i18n/en-US.json deleted file mode 100755 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/i18n/zh-CN.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/i18n/zh-CN.json deleted file mode 100755 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.css b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.css deleted file mode 100755 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.hml b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.hml deleted file mode 100755 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/element/string.json deleted file mode 100755 index 4a5d2b0f227cd287e7fa240071e0509f2775bb16..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "string": [ - { - "name": "permreason_example", - "value": "bmsfirstright" - }, - { - "name": "mainability_description", - "value": "JS_Phone_Empty Feature Ability" - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/media/icon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/media/icon.png deleted file mode 100755 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/media/snowball.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/media/snowball.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundle45/src/main/js/resources/base/media/snowball.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/app.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..5073a40fb91b46de4081e469bfbd8075a0456472 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "bundleName": "com.system.hiworld.examples1", + "vendor": "example", + "versionCode": 1, + "versionName": "1.0", + "icon": "$media:app_layered_image", + "label": "$string:app_name" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..2b62045b8026b375cd54e9b6a2d2e40c506af285 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "com.system.hiworld.examples1" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..b71c16122943f248ace0f5fa26da38b71dbdbdde --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/AppScope/resources/base/media/app_layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:app_background", + "foreground" : "$media:app_foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/BUILD.gn b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/BUILD.gn old mode 100755 new mode 100644 index 7d28e4bc7918278a85a726871f2b5a44e17f9bfd..5587fc9cbdd05402a7ad69badb37a983f32b9878 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/BUILD.gn +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2025 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,22 +14,10 @@ import("//build/ohos.gni") import("../../../../../appexecfwk.gni") -ohos_hap("stbmsThirdBundles1") { - hap_profile = "./src/main/config.json" +ohos_app("stbmsThirdBundles1") { hap_name = "bmsThirdBundles1" subsystem_name = "bundlemanager" - final_hap_path = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle/${hap_name}.hap" + hap_out_dir = "$root_out_dir/tests/systemtest/bundle_framework/bundle_framework/resource/stThirdBundle" testonly = true - deps = [ - ":hjs_demo_js_assets", - ":hjs_demo_resources", - ] certificate_profile = "${bundle_framework_path}/test/sceneProject/signature/com.system.hiworld.examples1.p7b" } -ohos_js_assets("hjs_demo_js_assets") { - source_dir = "./src/main/js/default" -} -ohos_resources("hjs_demo_resources") { - sources = [ "./src/main/js/resources" ] - hap_profile = "./src/main/config.json" -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..288c9c58314852ef5fa26e0a051a97d7dfa95048 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/build-profile.json5 @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "targetSdkVersion": 20, + "compatibleSdkVersion": 20, + "compileSdkVersion": 20, + "runtimeOS": "OpenHarmony", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "com.system.hiworld.example.h1", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/build-profile.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b4d65d490ef6cbe22d933b9231555210f1555786 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfa8a00f74f409d9647f55cdf270ab6aec69fe41 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/obfuscation-rules.txt b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..c1d419bdc6fa72c5914cc864ede925c53a2b01c5 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/obfuscation-rules.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/oh-package.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4bf3e2a9b1ae7381cf9363dff1cbcc1861a41e7b --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/ets/entryability/EntryAbility.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..b12b706076bc833e0f1c073e99881ef3b3a84004 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,44 @@ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/ets/pages/Index.ets b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..8e2d24ad42693fc877d51bb7820f0a9da68fa135 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,23 @@ +@Entry +@Component +struct Index { + @State message: string = 'Hello World'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize($r('app.float.page_text_font_size')) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + .onClick(() => { + this.message = 'Welcome'; + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/module.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..584eb066d9e6a828d5fcb4b6d47b0222cea5b087 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/module.json5 @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "com.system.hiworld.example.h1", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "2in1", + "tablet", + "default" + ], + "deliveryWithInstall": true, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "bmsThirdBundle_A1", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "launchType":"standard", + "orientation":"unspecified", + "permissions":[ + + ], + "visible":true, + "skills":[ + { + "actions":[ + "action.system.home" + ], + "entities":[ + "entity.system.home" + ] + } + ] + } + ] + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..d66f9a7d4ac61fb8d215239ab3620b7bcd77bf33 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/float.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a5d404dcd8b0466194afc3aa25d90a8a327470 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/background.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/background.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/foreground.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/foreground.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/layered_image.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/startIcon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/media/startIcon.png differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/profile/backup_config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d742c2f96e7dd0f406f499941f3147345e998f95 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/profile/main_pages.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/dark/element/color.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..438d5bc43bb23c59c210d586b96635a72da5b64a --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/hvigor/hvigor-config.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..c61d3eed60978a00d9a67b754ec36c0c9dcde929 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/hvigorfile.ts b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3340f07e45ddc5dcadbb87012668555def2e6e0 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/oh-package.json5 b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..15ec86a73e760904339e9269d493e3015429d8a2 --- /dev/null +++ b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.21" + } +} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/config.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/config.json deleted file mode 100755 index 971eeaac42bac90f298d8928b02e6bdc60a08b66..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/config.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "app":{ - "bundleName":"com.system.hiworld.examples1", - "vendor":"example", - "version":{ - "code":1, - "name":"1.0" - }, - "apiVersion":{ - "compatible":3, - "target":3, - "releaseType": "Release" - } - }, - "deviceConfig":{ - "default":{ - - } - }, - "module":{ - "package":"com.system.hiworld.example.h1", - "name":"bmsThirdBundle1", - "deviceType": [ - "2in1", - "tablet", - "default" - ], - "distro":{ - "deliveryWithInstall":true, - "moduleName":"testability", - "moduleType":"entry" - }, - "abilities":[ - { - "name":"bmsThirdBundle_A1", - "description":"himusic main ability", - "icon":"$media:ic_launcher", - "label":"bmsThirdBundle_A1 Ability", - "launchType":"standard", - "orientation":"unspecified", - "permissions":[ - - ], - "visible":true, - "skills":[ - { - "actions":[ - "action.system.home" - ], - "entities":[ - "entity.system.home" - ] - } - ], - "directLaunch":false, - "configChanges":[ - "locale", - "layout", - "fontSize", - "orientation" - ], - "type":"page", - "formsEnabled":false - } - ], - "js":[ - { - "pages":[ - "pages/index/index" - ], - "name":"default", - "window":{ - "designWidth":720, - "autoDesignWidth":true - } - } - ] - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/i18n/en-US.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/i18n/en-US.json deleted file mode 100755 index e63c70d978a3a53be988388c87182f81785e170c..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/i18n/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "Hello", - "world": "World" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/i18n/zh-CN.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/i18n/zh-CN.json deleted file mode 100755 index de6ee5748322f44942c1b003319d8e66c837675f..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/i18n/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "strings": { - "hello": "您好", - "world": "世界" - } -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.css b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.css deleted file mode 100755 index 01ad739b27f208ff04f21924695104bd27c59df0..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.css +++ /dev/null @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2022 Huawei Device Co., Ltd. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -.container { - flex-direction: column; - justify-content: center; - align-items: center; -} - -.title { - font-size: 100px; -} diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.hml b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.hml deleted file mode 100755 index 8d0e2061b88c99c91488405f0f2ead0c77de1a9e..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/default/pages/index/index.hml +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - {{ $t('strings.hello') }} {{ title }} - -
diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/element/string.json b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/element/string.json deleted file mode 100755 index 1cff79505a2301cc478f969bbaccf33e0426bc7a..0000000000000000000000000000000000000000 --- a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/element/string.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "string": [ - { - "name": "customizeData_description", - "value": "customizeData_description" - }, - { - "name": "results_description", - "value": "results_description" - }, - { - "name": "parameters_description", - "value": "parameters_description" - } - ] -} \ No newline at end of file diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/media/ic_launcher.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/media/ic_launcher.png deleted file mode 100755 index ce307a8827bd75456441ceb57d530e4c8d45d36c..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/media/ic_launcher.png and /dev/null differ diff --git a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/media/icon.png b/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/media/icon.png deleted file mode 100755 index 8966a1e3de00956d251d5c1497aa251ea7b5c49f..0000000000000000000000000000000000000000 Binary files a/test/sceneProject/systemtest/stThirdBundle/bmsThirdBundles1/src/main/js/resources/base/media/icon.png and /dev/null differ diff --git a/test/sceneProject/unittest/test_bundle/backupTest/entry/src/main/module.json b/test/sceneProject/unittest/test_bundle/backupTest/entry/src/main/module.json index 949b2856259f4c7d577eed52c448944b2aa6762a..e6194eb1a919b2f0ab17bc2e01e327b181277cd4 100755 --- a/test/sceneProject/unittest/test_bundle/backupTest/entry/src/main/module.json +++ b/test/sceneProject/unittest/test_bundle/backupTest/entry/src/main/module.json @@ -1,5 +1,10 @@ { "module": { + "testRunner": { + "name": "testRunnerName", + "srcPath": "testRunnerSrcPath", + "arkTSMode": "testRunnerArkTSMode" + }, "abilities": [ { "description": "$string:MainAbility_desc", diff --git a/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp b/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp index ffc2cf9e169811e6e4a120f16c21244f88b456ea..9a8874784cac87e164d3b35c2ff609228df05024 100644 --- a/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp +++ b/test/systemtest/common/bms/acts_bms_kit_system_test/acts_bms_kit_system_test.cpp @@ -10719,5 +10719,45 @@ HWTEST_F(ActsBmsKitSystemTest, GetAllBundleCacheStat_0001, Function | MediumTest EXPECT_EQ(ret, ERR_OK); std::cout << "END GetAllBundleCacheStat_0001" << std::endl; } + +/** + * @tc.number: GetTestRunner_0001 + * @tc.name: test GetTestRunner interface + * @tc.desc: 1. call GetTestRunner + */ +HWTEST_F(ActsBmsKitSystemTest, GetTestRunner_0001, Function | MediumTest | Level1) +{ + std::cout << "START GetTestRunner_0001" << std::endl; + sptr bundleMgrProxy = GetBundleMgrProxy(); + EXPECT_NE(bundleMgrProxy, nullptr); + if (bundleMgrProxy != nullptr) { + ModuleTestRunner testRunner; + std::string bundleName; + std::string moduleName = "moduleName"; + ErrCode ret =bundleMgrProxy->GetTestRunner(bundleName, moduleName, testRunner); + EXPECT_EQ(ret, ERR_BUNDLE_MANAGER_PARAM_ERROR); + } + std::cout << "END GetTestRunner_0001" << std::endl; +} + +/** + * @tc.number: GetTestRunner_0002 + * @tc.name: test GetTestRunner interface + * @tc.desc: 1. call GetTestRunner + */ +HWTEST_F(ActsBmsKitSystemTest, GetTestRunner_0002, Function | MediumTest | Level1) +{ + std::cout << "START GetTestRunner_0002" << std::endl; + sptr bundleMgrProxy = GetBundleMgrProxy(); + EXPECT_NE(bundleMgrProxy, nullptr); + if (bundleMgrProxy != nullptr) { + ModuleTestRunner testRunner; + std::string bundleName = "bundleName"; + std::string moduleName; + ErrCode ret =bundleMgrProxy->GetTestRunner(bundleName, moduleName, testRunner); + EXPECT_EQ(ret, ERR_BUNDLE_MANAGER_PARAM_ERROR); + } + std::cout << "END GetTestRunner_0002" << std::endl; +} } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file