diff --git a/interfaces/innerkits/appexecfwk_base/include/launcher_ability_info.h b/interfaces/innerkits/appexecfwk_base/include/launcher_ability_info.h index cc4fca2bf5aa5706976fc3ec5c3095b0bb6ca110..ccd75808ec578d62ddfeaf178d8eb95e914485d7 100644 --- a/interfaces/innerkits/appexecfwk_base/include/launcher_ability_info.h +++ b/interfaces/innerkits/appexecfwk_base/include/launcher_ability_info.h @@ -23,7 +23,6 @@ namespace OHOS { namespace AppExecFwk { - struct LauncherAbilityInfo { public: std::string name; // ability name, only the main class name diff --git a/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h b/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h index 689a9e00c9577f53843f629db389d91bf7c66944..5ed482fc1a391958dbbd8ea4e60bf887308445cf 100644 --- a/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h +++ b/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_host.h @@ -457,7 +457,6 @@ private: DISALLOW_COPY_AND_MOVE(BundleMgrHost); }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_BUNDLEMGR_BUNDLE_MGR_HOST_H \ No newline at end of file diff --git a/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h b/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h index 42ebdaa339bc46dcdc9eefc68ce0cf43e89b6055..8d2bb1a83130711c496814d6fb5ef9d172b6fc25 100644 --- a/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h +++ b/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_interface.h @@ -542,7 +542,6 @@ public: CHECK_BUNDLE_NAME_IN_ALLOWLIST }; }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_BUNDLEMGR_BUNDLE_MGR_INTERFACE_H diff --git a/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h b/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h index 3c889fe005a63f6d3f7753cd729fb0e7c52fa2c4..3701701f9ec8f6f182bc0ed2cbe1c1edbc156bdc 100644 --- a/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h +++ b/interfaces/innerkits/appexecfwk_core/include/bundlemgr/bundle_mgr_proxy.h @@ -499,7 +499,6 @@ private: bool GetParcelableInfos(IBundleMgr::Message code, MessageParcel &data, std::vector &parcelableInfos); static inline BrokerDelegator delegator_; }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_INTERFACES_INNERKITS_APPEXECFWK_CORE_INCLUDE_BUNDLEMGR_BUNDLE_MGR_PROXY_H \ No newline at end of file diff --git a/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp b/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp index 47804ce3e09f49da6f7f201c16aef390cb6d4a0d..9d6063558734851ab46169ab48d205cbc73ff8d5 100755 --- a/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp +++ b/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_host.cpp @@ -1275,6 +1275,5 @@ bool BundleMgrHost::WriteParcelableVector(std::vector &parcelableVector, Parc } return true; } - } // namespace AppExecFwk } // namespace OHOS diff --git a/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp b/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp index 57a81f577f22ed78a1b40cd525d52b9441a2e41d..a1ba8342685486f4c3f162792498485043325abd 100644 --- a/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp +++ b/interfaces/innerkits/appexecfwk_core/src/bundlemgr/bundle_mgr_proxy.cpp @@ -1651,6 +1651,5 @@ bool BundleMgrProxy::SendTransactCmd(IBundleMgr::Message code, MessageParcel &da } return true; } - } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/interfaces/innerkits/task_dispatcher/include/dispatcher/parallel_task_dispatcher_base.h b/interfaces/innerkits/task_dispatcher/include/dispatcher/parallel_task_dispatcher_base.h index 22b248f0dfcaca62b97d5c5a04d449fef8b6453e..34d9d566de1a7e122b3c0ed0595482765b4832a6 100644 --- a/interfaces/innerkits/task_dispatcher/include/dispatcher/parallel_task_dispatcher_base.h +++ b/interfaces/innerkits/task_dispatcher/include/dispatcher/parallel_task_dispatcher_base.h @@ -115,7 +115,6 @@ private: } }; }; - } // namespace AppExecFwk } // namespace OHOS #endif \ No newline at end of file diff --git a/interfaces/innerkits/task_dispatcher/src/task/sync_task.cpp b/interfaces/innerkits/task_dispatcher/src/task/sync_task.cpp index a551df0e437bdff4a158d18f0d049b6a8296b461..e37e61e1a0a6dff9e6d1245d5eb81cbb40d4519b 100644 --- a/interfaces/innerkits/task_dispatcher/src/task/sync_task.cpp +++ b/interfaces/innerkits/task_dispatcher/src/task/sync_task.cpp @@ -58,6 +58,5 @@ void SyncTask::WaitTask() APP_LOGI("SyncTask::WaitTask end thread=%{public}zu", CalculateHashCode(threadId)); } - } // namespace AppExecFwk } // namespace OHOS diff --git a/kits/appkit/test/Mock/include/mock_ability_mgr_service.h b/kits/appkit/test/Mock/include/mock_ability_mgr_service.h index 0b239e2e7371b9a3a2cbcabd90e9f53f3180aa51..c2758930c152a79cf532367f058fc0d783d06e40 100644 --- a/kits/appkit/test/Mock/include/mock_ability_mgr_service.h +++ b/kits/appkit/test/Mock/include/mock_ability_mgr_service.h @@ -83,7 +83,6 @@ private: bool DumpStateCalled_ = false; Semaphore sem_; }; - } // namespace AAFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_KITS_APPKIT_TEST_MOCK_ABILITY_MGR_SERVICE_H \ No newline at end of file diff --git a/services/appmgr/test/unittest/ams_service_load_ability_process_test/ams_service_load_ability_process_test.cpp b/services/appmgr/test/unittest/ams_service_load_ability_process_test/ams_service_load_ability_process_test.cpp index be3048ca3f803834bd4d13509d62ec221875929b..7f6b900c07fcc04c1643a319afdeb3365bcc2fe6 100644 --- a/services/appmgr/test/unittest/ams_service_load_ability_process_test/ams_service_load_ability_process_test.cpp +++ b/services/appmgr/test/unittest/ams_service_load_ability_process_test/ams_service_load_ability_process_test.cpp @@ -1132,6 +1132,5 @@ HWTEST_F(AmsServiceLoadAbilityProcessTest, StartProcess004, TestSize.Level1) EXPECT_EQ(record1, nullptr); APP_LOGI("AmsServiceLoadAbilityProcessTest StartProcess004 end"); } - } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/services/bundlemgr/include/base_bundle_installer.h b/services/bundlemgr/include/base_bundle_installer.h index 033dc7a5ee27d4f887a4783f95012b3da7f338ea..45a94aff31d009b483661cd33de0e8269f24949f 100644 --- a/services/bundlemgr/include/base_bundle_installer.h +++ b/services/bundlemgr/include/base_bundle_installer.h @@ -263,7 +263,6 @@ private: DISALLOW_COPY_AND_MOVE(BaseBundleInstaller); }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BASE_BUNDLE_INSTALLER_H \ No newline at end of file diff --git a/services/bundlemgr/include/bundle_data_mgr.h b/services/bundlemgr/include/bundle_data_mgr.h index 4be16d6a2234fd7bbfe79c637979aa011d0859d8..29d92664d9dc4aa8f5bf722c99d439604760f2c4 100755 --- a/services/bundlemgr/include/bundle_data_mgr.h +++ b/services/bundlemgr/include/bundle_data_mgr.h @@ -587,7 +587,6 @@ private: // map. std::map>> permissionsCallbacks_; }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_DATA_MGR_H diff --git a/services/bundlemgr/include/bundle_installer.h b/services/bundlemgr/include/bundle_installer.h index 896ade5c74ff041082faa0a33b48a6b54a045a76..4e653ab05c5ab028b2e752d64a0fcbe69b9e3554 100644 --- a/services/bundlemgr/include/bundle_installer.h +++ b/services/bundlemgr/include/bundle_installer.h @@ -83,7 +83,6 @@ private: const sptr statusReceiver_; DISALLOW_COPY_AND_MOVE(BundleInstaller); }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_INSTALLER_H \ No newline at end of file diff --git a/services/bundlemgr/include/bundle_mgr_host_impl.h b/services/bundlemgr/include/bundle_mgr_host_impl.h index d6ec4e92bd5f206586f707e2005406023e6c4b97..ef3c0ca29b58e73ff0af54b18031df0feb3a6ee3 100644 --- a/services/bundlemgr/include/bundle_mgr_host_impl.h +++ b/services/bundlemgr/include/bundle_mgr_host_impl.h @@ -22,7 +22,6 @@ namespace OHOS { namespace AppExecFwk { - class BundleMgrHostImpl : public BundleMgrHost { public: /** @@ -448,7 +447,6 @@ private: const std::shared_ptr GetCloneMgrFromService(); const std::shared_ptr GetDataMgrFromService(); }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_HOST_IMPL_H diff --git a/services/bundlemgr/include/bundle_mgr_service.h b/services/bundlemgr/include/bundle_mgr_service.h index 7969f3cd89cdb26cb001fbcef3a5863df6bcb6ed..39645e25287e1e9e845a4281ffd1708604c969fd 100644 --- a/services/bundlemgr/include/bundle_mgr_service.h +++ b/services/bundlemgr/include/bundle_mgr_service.h @@ -49,14 +49,15 @@ public: * @return Returns true if the bundle manager service is ready; returns false otherwise. */ bool IsServiceReady() const; + /** + * @brief Get a shared pointer to the BundleCloneMgr object. + * @return Returns the pointer of BundleCloneMgr object. + */ + const std::shared_ptr GetCloneMgr() const; /** * @brief Get a shared pointer to the BundleDataMgr object. * @return Returns the pointer of BundleDataMgr object. */ - const std::shared_ptr GetCloneMgr() const; - - - const std::shared_ptr GetDataMgr() const; /** * @brief Get a IBundleInstaller object for IPC @@ -90,7 +91,6 @@ private: DISALLOW_COPY_AND_MOVE(BundleMgrService); }; - } // namespace AppExecFwk } // namespace OHOS #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_BUNDLE_MGR_SERVICE_H diff --git a/services/bundlemgr/include/inner_bundle_info.h b/services/bundlemgr/include/inner_bundle_info.h index a320c6709cef9222ed283c8f6935ceb894163d13..afdcfdff9c6190746b2a90e8f8b5c62f4c09b196 100644 --- a/services/bundlemgr/include/inner_bundle_info.h +++ b/services/bundlemgr/include/inner_bundle_info.h @@ -1105,7 +1105,6 @@ public: */ void GetCommonEvents(const std::string &eventKey, std::vector &commonEvents) const; - std::optional GetInnerModuleInfoByModuleName(const std::string &moduleName) const; void GetModuleNames(std::vector &moduleNames) const; diff --git a/services/bundlemgr/src/base_bundle_installer.cpp b/services/bundlemgr/src/base_bundle_installer.cpp index 5dc838278511160d2f33ee07c4e2543677877cc6..4172814fa829545ed9979aeb6bf1da28b9bf6606 100755 --- a/services/bundlemgr/src/base_bundle_installer.cpp +++ b/services/bundlemgr/src/base_bundle_installer.cpp @@ -39,7 +39,6 @@ namespace OHOS { namespace AppExecFwk { namespace { - bool UninstallApplicationProcesses(const std::string &bundleName, const int uid) { APP_LOGI("uninstall kill running processes, app name is %{public}s", bundleName.c_str()); @@ -55,7 +54,6 @@ bool UninstallApplicationProcesses(const std::string &bundleName, const int uid) } return true; } - } // namespace BaseBundleInstaller::BaseBundleInstaller() @@ -683,6 +681,5 @@ bool BaseBundleInstaller::UpdateBundlePaths(InnerBundleInfo &info, const std::st info.SetAppCacheDir(baseDataPath + Constants::PATH_SEPARATOR + Constants::CACHE_DIR); return true; } - } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/services/bundlemgr/src/bundle_data_mgr.cpp b/services/bundlemgr/src/bundle_data_mgr.cpp index b35744156952e22765958eecd4b8340ac0034056..c7761bfdd1e09c9f31da09ebe92ce9a917a66fd8 100755 --- a/services/bundlemgr/src/bundle_data_mgr.cpp +++ b/services/bundlemgr/src/bundle_data_mgr.cpp @@ -33,7 +33,6 @@ namespace OHOS { namespace AppExecFwk { - BundleDataMgr::BundleDataMgr() { InitStateTransferMap(); @@ -1993,6 +1992,5 @@ bool BundleDataMgr::GetClonedBundleName(const std::string &bundleName, std::stri return false; APP_LOGI("GetCloneBundleName finish"); } - } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/services/bundlemgr/src/bundle_data_storage_database.cpp b/services/bundlemgr/src/bundle_data_storage_database.cpp index 176abafc2321da321c403ece63a916109c49cdfa..b740a3cd56bf7d76d614a66e860a72849d53c4d6 100644 --- a/services/bundlemgr/src/bundle_data_storage_database.cpp +++ b/services/bundlemgr/src/bundle_data_storage_database.cpp @@ -292,6 +292,5 @@ bool BundleDataStorageDatabase::ResetKvStore() APP_LOGW("failed"); return false; } - } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/services/bundlemgr/src/bundle_mgr_host_impl.cpp b/services/bundlemgr/src/bundle_mgr_host_impl.cpp index 98955c46e241e39300e3c4462b739ef0c1b446e4..1aa6c6243ca22297a61e4f6632ab7fae5317e99c 100755 --- a/services/bundlemgr/src/bundle_mgr_host_impl.cpp +++ b/services/bundlemgr/src/bundle_mgr_host_impl.cpp @@ -28,7 +28,6 @@ namespace OHOS { namespace AppExecFwk { - bool BundleMgrHostImpl::GetApplicationInfo( const std::string &appName, const ApplicationFlag flag, const int userId, ApplicationInfo &appInfo) { @@ -719,6 +718,5 @@ const std::shared_ptr BundleMgrHostImpl::GetDataMgrFromService() { return DelayedSingleton::GetInstance()->GetDataMgr(); } - } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/bundle_mgr_service.cpp b/services/bundlemgr/src/bundle_mgr_service.cpp index 3222f5a32a44d3078a46bdb25a9931475a662bae..6a6d47b4c7a4dd8ba7fa31a2ba36768726612291 100644 --- a/services/bundlemgr/src/bundle_mgr_service.cpp +++ b/services/bundlemgr/src/bundle_mgr_service.cpp @@ -195,6 +195,5 @@ void BundleMgrService::SelfClean() } } } - } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/bundle_profile.cpp b/services/bundlemgr/src/bundle_profile.cpp index f29e758be883ff21ebc55729f749588e216a5460..3951bf767dbc5ba0eabc60d299abbbd2e5926cec 100644 --- a/services/bundlemgr/src/bundle_profile.cpp +++ b/services/bundlemgr/src/bundle_profile.cpp @@ -2168,7 +2168,6 @@ bool TransformToInfo(ProfileReader::ConfigJson &configJson, InnerBundleInfo &inn innerBundleInfo.InsertInnerModuleInfo(configJson.module.package, innerModuleInfo); return true; } - } // namespace ErrCode BundleProfile::TransformTo(const std::ostringstream &source, InnerBundleInfo &innerBundleInfo) const @@ -2193,6 +2192,5 @@ ErrCode BundleProfile::TransformTo(const std::ostringstream &source, InnerBundle } return ERR_OK; } - } // namespace AppExecFwk } // namespace OHOS diff --git a/services/bundlemgr/src/inner_bundle_info.cpp b/services/bundlemgr/src/inner_bundle_info.cpp index e9e1cf71a7cdef2cdb6e2846d3b5872d24141380..3f25695ed8e5041093270f1c8752bcda37b32275 100644 --- a/services/bundlemgr/src/inner_bundle_info.cpp +++ b/services/bundlemgr/src/inner_bundle_info.cpp @@ -61,7 +61,6 @@ const std::string MODULE_SHORTCUT = "shortcutInfos"; const std::string MODULE_COMMON_EVENT = "commonEvents"; const std::string MODULE_MAIN_ABILITY = "mainAbility"; const std::string NEW_BUNDLE_NAME = "newBundleName"; - } // namespace InnerBundleInfo::InnerBundleInfo() @@ -1149,6 +1148,5 @@ void InnerBundleInfo::GetModuleNames(std::vector &moduleNames) cons moduleNames.emplace_back(innerModuleInfo.second.moduleName); } } - } // namespace AppExecFwk } // namespace OHOS \ No newline at end of file diff --git a/services/bundlemgr/src/module_usage_data_storage.cpp b/services/bundlemgr/src/module_usage_data_storage.cpp index 1a0e63a0ffe83b85f39740dae4ee151279dd12b3..e160458c9925122f52d1160ad8600bb97ba2229f 100644 --- a/services/bundlemgr/src/module_usage_data_storage.cpp +++ b/services/bundlemgr/src/module_usage_data_storage.cpp @@ -372,6 +372,5 @@ bool ModuleUsageRecordStorage::ResetKvStore() APP_LOGW("usage reset failed"); return false; } - } // namespace AppExecFwk } // namespace 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 3557e746a851000eb2a31bfceeb4e04ca9fa22f2..4ab02d7e74bbd598d1834ba1fe165c2a5c172bda 100755 --- 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 @@ -38,7 +38,6 @@ using namespace OHOS::AppExecFwk; using OHOS::AAFwk::Want; namespace { - const std::string BUNDLE_NAME_TEST = "com.example.bundlekit.test"; const std::string MODULE_NAME_TEST = "com.example.bundlekit.test.entry"; const std::string ABILITY_NAME_TEST1 = ".Reading1"; @@ -146,7 +145,6 @@ const std::string COMMON_EVENT_EVENT = "usual.event.PACKAGE_ADDED"; const std::string COMMON_EVENT_EVENT_ERROR_KEY = "usual.event.PACKAGE_ADDED_D"; const std::string COMMON_EVENT_EVENT_NOT_EXISTS_KEY = "usual.event.PACKAGE_REMOVED"; const int FORMINFO_DESCRIPTIONID = 123; - } // namespace class BmsBundleKitServiceTest : public testing::Test { @@ -865,7 +863,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.uid, TEST_UID); diff --git a/services/test/moduletest/common/ams/app_life_cycle_test/ams_app_life_cycle_module_test.cpp b/services/test/moduletest/common/ams/app_life_cycle_test/ams_app_life_cycle_module_test.cpp index 46b9091edea2a020ac145ed2694f898a3abf3006..846325edf53774c9c6f07c686e63fa40af7f5a86 100755 --- a/services/test/moduletest/common/ams/app_life_cycle_test/ams_app_life_cycle_module_test.cpp +++ b/services/test/moduletest/common/ams/app_life_cycle_test/ams_app_life_cycle_module_test.cpp @@ -1011,7 +1011,6 @@ HWTEST_F(AmsAppLifeCycleModuleTest, StateChange_013, TestSize.Level3) */ HWTEST_F(AmsAppLifeCycleModuleTest, StateChange_014, TestSize.Level1) { - pid_t pid = 1000; sptr token = GetAbilityToken(); auto abilityInfo = GetAbilityInfo("0", "MainAbility", "p1", "com.ohos.test.special"); diff --git a/test/resource/amssystemtestability/abilitySrc/amsKitSTAbilityManagerFirst/include/kit_test_ability_manager.h b/test/resource/amssystemtestability/abilitySrc/amsKitSTAbilityManagerFirst/include/kit_test_ability_manager.h index 1bc3c529ed1d2eec1a368058024516d4802b4e4b..87192013740548d04d6a0a505fb5c13417678698 100644 --- a/test/resource/amssystemtestability/abilitySrc/amsKitSTAbilityManagerFirst/include/kit_test_ability_manager.h +++ b/test/resource/amssystemtestability/abilitySrc/amsKitSTAbilityManagerFirst/include/kit_test_ability_manager.h @@ -189,7 +189,6 @@ private: std::unordered_map> mapTestFunc_; KitTestAbilityManager *kitTestAbility_; }; - } // namespace AppExecFwk } // namespace OHOS #endif //_KIT_TEST_ABILITY_MANAGER_H_