diff --git a/frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp b/frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp index 94c8a8e6dde48e88e30a7a71b00a403e3e690acf..9f9dd1e1ec12a0579ca7dde785267812a0f0bbc7 100644 --- a/frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp +++ b/frameworks/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp @@ -466,19 +466,6 @@ bool BundleMgrHelper::GetGroupDir(const std::string &dataGroupId, std::string &d return bundleMgr->GetGroupDir(dataGroupId, dir); } -sptr BundleMgrHelper::GetOverlayManagerProxy() -{ - TAG_LOGD(AAFwkTag::BUNDLEMGRHELPER, "called"); - auto bundleMgr = Connect(); - if (bundleMgr == nullptr) { - TAG_LOGE(AAFwkTag::BUNDLEMGRHELPER, "null bundleMgr"); - return nullptr; - } - - HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - return bundleMgr->GetOverlayManagerProxy(); -} - bool BundleMgrHelper::QueryAbilityInfo(const Want &want, AbilityInfo &abilityInfo) { TAG_LOGD(AAFwkTag::BUNDLEMGRHELPER, "called"); diff --git a/frameworks/native/appkit/ability_runtime/context/context_impl.cpp b/frameworks/native/appkit/ability_runtime/context/context_impl.cpp index cab45fda83e5708c1886400a060eb4b40b7a5b53..eba6aa4aebfb3d1f216210b38d64c1d3b7031b65 100644 --- a/frameworks/native/appkit/ability_runtime/context/context_impl.cpp +++ b/frameworks/native/appkit/ability_runtime/context/context_impl.cpp @@ -1435,42 +1435,14 @@ Global::Resource::DeviceType ContextImpl::GetDeviceType() const return deviceType_; } -ErrCode ContextImpl::GetOverlayMgrProxy() -{ - HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - int errCode = GetBundleManager(); - if (errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::APPKIT, "failed, errCode: %{public}d", errCode); - return errCode; - } - - std::lock_guard lock(overlayMgrProxyMutex_); - if (overlayMgrProxy_ != nullptr) { - return ERR_OK; - } - - overlayMgrProxy_ = bundleMgr_->GetOverlayManagerProxy(); - if (overlayMgrProxy_ == nullptr) { - TAG_LOGE(AAFwkTag::APPKIT, "null overlayMgrProxy"); - return ERR_NULL_OBJECT; - } - - TAG_LOGD(AAFwkTag::APPKIT, "Success."); - return ERR_OK; -} - int ContextImpl::GetOverlayModuleInfos(const std::string &bundleName, const std::string &moduleName, std::vector &overlayModuleInfos) { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__); - int errCode = GetOverlayMgrProxy(); - if (errCode != ERR_OK) { - TAG_LOGE(AAFwkTag::APPKIT, "failed, errCode: %{public}d", errCode); - return errCode; - } { HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, "overlayMgrProxy_->GetTargetOverlayModuleInfo"); - auto ret = overlayMgrProxy_->GetTargetOverlayModuleInfo(moduleName, overlayModuleInfos); + auto ret = + AppExecFwk::OverlayManagerClient::GetInstance().GetTargetOverlayModuleInfo(moduleName, overlayModuleInfos); if (ret != ERR_OK) { TAG_LOGD(AAFwkTag::APPKIT, "GetOverlayModuleInfo form bms failed"); return ret; @@ -1634,10 +1606,6 @@ void ContextImpl::ShallowCopySelf(std::shared_ptr &contextImpl) std::lock_guard lock(bundleManagerMutex_); contextImpl->bundleMgr_ = bundleMgr_; } - { - std::lock_guard lock(overlayMgrProxyMutex_); - contextImpl->overlayMgrProxy_ = overlayMgrProxy_; - } contextImpl->resetFlag_ = resetFlag_; contextImpl->processName_ = processName_; } diff --git a/frameworks/native/appkit/app/main_thread.cpp b/frameworks/native/appkit/app/main_thread.cpp index 7b446e28799ebc360b221485c030e72e97c85706..acda81a49451a47a78421cd88d2c6dfad3e0fbfb 100644 --- a/frameworks/native/appkit/app/main_thread.cpp +++ b/frameworks/native/appkit/app/main_thread.cpp @@ -3694,13 +3694,7 @@ int MainThread::GetOverlayModuleInfos(const std::string &bundleName, const std:: return ERR_INVALID_VALUE; } - auto overlayMgrProxy = bundleMgrHelper->GetOverlayManagerProxy(); - if (overlayMgrProxy == nullptr) { - TAG_LOGE(AAFwkTag::APPKIT, "null overlayMgrProxy"); - return ERR_INVALID_VALUE; - } - - auto ret = overlayMgrProxy->GetTargetOverlayModuleInfo(moduleName, overlayModuleInfos); + auto ret = OverlayManagerClient::GetInstance().GetTargetOverlayModuleInfo(moduleName, overlayModuleInfos); if (ret != ERR_OK) { TAG_LOGE(AAFwkTag::APPKIT, "failed"); return ret; diff --git a/interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h b/interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h index 3862786ed6c4f836224d8800ce8b9c26fbaa2b73..1db3a599f59eb77119f25bd3b9467e452e327f37 100644 --- a/interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h +++ b/interfaces/kits/native/appkit/ability_bundle_manager_helper/bundle_mgr_helper.h @@ -60,7 +60,6 @@ public: ErrCode GetDependentBundleInfo(const std::string &sharedBundleName, BundleInfo &sharedBundleInfo, GetDependentBundleInfoFlag flag = GetDependentBundleInfoFlag::GET_APP_CROSS_HSP_BUNDLE_INFO); bool GetGroupDir(const std::string &dataGroupId, std::string &dir); - sptr GetOverlayManagerProxy(); bool QueryAbilityInfo(const Want &want, AbilityInfo &abilityInfo); bool QueryAbilityInfo(const Want &want, int32_t flags, int32_t userId, AbilityInfo &abilityInfo); bool GetBundleInfos(int32_t flags, diff --git a/interfaces/kits/native/appkit/ability_runtime/context/context_impl.h b/interfaces/kits/native/appkit/ability_runtime/context/context_impl.h index 5e82b637987ce000e210450b4170ec3d3f177291..04efb58a890f85f75264aaf2b2171ae6f5f82117 100644 --- a/interfaces/kits/native/appkit/ability_runtime/context/context_impl.h +++ b/interfaces/kits/native/appkit/ability_runtime/context/context_impl.h @@ -19,6 +19,7 @@ #include "context.h" #include "bundle_mgr_interface.h" +#include "overlay_manager_client.h" namespace OHOS { namespace AppExecFwk { @@ -522,7 +523,6 @@ private: int32_t GetBundleInfo(const std::string &bundleName, AppExecFwk::BundleInfo &bundleInfo, bool ¤tBundle); void GetBundleInfo(const std::string &bundleName, AppExecFwk::BundleInfo &bundleInfo, std::shared_ptr inputContext = nullptr); - ErrCode GetOverlayMgrProxy(); void UnsubscribeToOverlayEvents(); void ShallowCopySelf(std::shared_ptr &contextImpl); bool UpdateDisplayConfiguration(std::shared_ptr &contextImpl, uint64_t displayId, @@ -546,8 +546,6 @@ private: std::mutex bundleManagerMutex_; std::shared_ptr bundleMgr_; - std::mutex overlayMgrProxyMutex_; - sptr overlayMgrProxy_ = nullptr; // True: need to get a new fms remote object, // False: no need to get a new fms remote object. diff --git a/services/appmgr/include/app_mgr_service_inner.h b/services/appmgr/include/app_mgr_service_inner.h index 9bc66b07c2fc058a1746443ac4414a907518663c..d38e2d4972d4c817fa4dd4b123886ce62749bc23 100644 --- a/services/appmgr/include/app_mgr_service_inner.h +++ b/services/appmgr/include/app_mgr_service_inner.h @@ -67,6 +67,7 @@ #include "kia_interceptor_interface.h" #include "kill_process_config.h" #include "killed_process_info.h" +#include "overlay_manager_client.h" #include "process_memory_state.h" #include "process_util.h" #include "record_query_result.h" diff --git a/services/appmgr/src/app_mgr_service_inner.cpp b/services/appmgr/src/app_mgr_service_inner.cpp index d0e90aca3f71158ffb4e2c2ce6c973b691d9af71..f89d05101967474e9c19f6ade1dd7634fdc9da31 100644 --- a/services/appmgr/src/app_mgr_service_inner.cpp +++ b/services/appmgr/src/app_mgr_service_inner.cpp @@ -119,6 +119,7 @@ using namespace OHOS::Rosen; #endif //SUPPORT_SCREEN using namespace OHOS::Security; using namespace OHOS::Rosen; +using namespace OHOS::AppExecFwk; namespace { #define CHECK_CALLER_IS_SYSTEM_APP \ @@ -3664,22 +3665,19 @@ void AppMgrServiceInner::SetOverlayInfo(const std::string &bundleName, TAG_LOGE(AAFwkTag::APPMGR, "bundleMgrHelper null"); return; } - auto overlayMgrProxy = bundleMgrHelper->GetOverlayManagerProxy(); - if (overlayMgrProxy != nullptr) { - std::vector overlayModuleInfo; - TAG_LOGD(AAFwkTag::APPMGR, "Check overlay app begin."); - HITRACE_METER_NAME(HITRACE_TAG_APP, "BMS->GetOverlayModuleInfoForTarget"); - auto targetRet = IN_PROCESS_CALL(overlayMgrProxy->GetOverlayModuleInfoForTarget( - bundleName, "", overlayModuleInfo, userId)); - if (targetRet == ERR_OK && overlayModuleInfo.size() != 0) { - TAG_LOGD(AAFwkTag::APPMGR, "Start an overlay app process."); - startMsg.flags = startMsg.flags | APP_OVERLAY_FLAG; - std::string overlayInfoPaths; - for (auto it : overlayModuleInfo) { - overlayInfoPaths += (it.hapPath + "|"); - } - startMsg.overlayInfo = overlayInfoPaths; + std::vector overlayModuleInfo; + TAG_LOGD(AAFwkTag::APPMGR, "Check overlay app begin."); + HITRACE_METER_NAME(HITRACE_TAG_APP, "BMS->GetOverlayModuleInfoForTarget"); + auto targetRet = IN_PROCESS_CALL(OverlayManagerClient::GetInstance().GetOverlayModuleInfoForTarget( + bundleName, "", overlayModuleInfo, userId)); + if (targetRet == ERR_OK && overlayModuleInfo.size() != 0) { + TAG_LOGD(AAFwkTag::APPMGR, "Start an overlay app process."); + startMsg.flags = startMsg.flags | APP_OVERLAY_FLAG; + std::string overlayInfoPaths; + for (auto it : overlayModuleInfo) { + overlayInfoPaths += (it.hapPath + "|"); } + startMsg.overlayInfo = overlayInfoPaths; } } diff --git a/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp b/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp index a6731b31a3925d34cb6bb0a3527a3e698c8d3eee..1921db0488c821a967d6c283c60758d2d2aa976e 100755 --- a/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp +++ b/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp @@ -93,7 +93,6 @@ void BundleMgrHelperFuzztest1(bool boolParam, std::string &stringParam, int32_t bmHelper->GetBundleInfoForSelf(int32Param, bundleInfo); bmHelper->GetDependentBundleInfo(stringParam, bundleInfo, static_cast(int32Param)); bmHelper->GetGroupDir(stringParam, stringParam); - bmHelper->GetOverlayManagerProxy(); bmHelper->QueryAbilityInfo(want, abilityInfo); bmHelper->QueryAbilityInfo(want, int32Param, int32Param, abilityInfo); std::vector bundleInfos; diff --git a/test/mock/common/include/mock_bundle_manager_proxy.h b/test/mock/common/include/mock_bundle_manager_proxy.h index 830968bdb9e8182d056a56894a1ff9e580b04db8..9f4de98a376ecca5d07c5d066afc6b77aba6576e 100644 --- a/test/mock/common/include/mock_bundle_manager_proxy.h +++ b/test/mock/common/include/mock_bundle_manager_proxy.h @@ -22,7 +22,7 @@ #include "iremote_object.h" #include "iremote_stub.h" #include "module_info.h" -#include "mock_overlay_manager.h" + namespace OHOS { constexpr int32_t BASE_USER_RANGE = 200000; @@ -55,13 +55,6 @@ public: MOCK_METHOD5(ImplicitQueryInfoByPriority, bool(const Want&, int32_t, int32_t, AppExecFwk::AbilityInfo&, AppExecFwk::ExtensionAbilityInfo&)); - sptr GetOverlayManagerProxy() - { - sptr overlayModuleProxy = - new (std::nothrow) AppExecFwk::OverlayManagerProxy(nullptr); - return overlayModuleProxy; - } - bool GetBundleInfo(const std::string &bundleName, const AppExecFwk::BundleFlag flag, AppExecFwk::BundleInfo &bundleInfo, int32_t userId) override { diff --git a/test/mock/common/include/mock_bundle_manager_service.h b/test/mock/common/include/mock_bundle_manager_service.h index 3250f6078bc939ddf6ed680b008235a74f5fe6c2..4bf8fb8024fb1b8737c3220ec3b8f0d200a236b9 100644 --- a/test/mock/common/include/mock_bundle_manager_service.h +++ b/test/mock/common/include/mock_bundle_manager_service.h @@ -22,7 +22,7 @@ #include "iremote_object.h" #include "iremote_stub.h" #include "module_info.h" -#include "mock_overlay_manager.h" + namespace OHOS { namespace { @@ -57,13 +57,6 @@ public: MOCK_METHOD5(ImplicitQueryInfoByPriority, bool(const Want&, int32_t, int32_t, AppExecFwk::AbilityInfo&, AppExecFwk::ExtensionAbilityInfo&)); - sptr GetOverlayManagerProxy() - { - sptr overlayModuleProxy = - new (std::nothrow) AppExecFwk::OverlayManagerProxy(nullptr); - return overlayModuleProxy; - } - bool GetBundleInfo(const std::string &bundleName, const AppExecFwk::BundleFlag flag, AppExecFwk::BundleInfo &bundleInfo, int32_t userId) override { diff --git a/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp b/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp index 40cf3503eacc7bc4e2d84b6bdafd91c892dca249..0a58ca667b09f98a442fab6cff888e6409dbee94 100644 --- a/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp +++ b/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp @@ -17,7 +17,7 @@ #include #include "ability_info.h" #include "application_info.h" -#include "mock_overlay_manager.h" + namespace OHOS { namespace AppExecFwk { @@ -67,12 +67,6 @@ bool BundleMgrProxy::GetHapModuleInfo(const AbilityInfo& abilityInfo, int32_t us return true; } -sptr BundleMgrProxy::GetOverlayManagerProxy() -{ - sptr overlayModuleProxy = new (std::nothrow) OverlayManagerProxy(nullptr); - return overlayModuleProxy; -} - int BundleMgrStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { GTEST_LOG_(INFO) << " BundleMgrStub::OnRemoteRequest"; @@ -137,11 +131,5 @@ bool BundleMgrService::GetHapModuleInfo(const AbilityInfo& abilityInfo, int32_t hapModuleInfo.name = abilityInfo.package; return true; } - -sptr BundleMgrService::GetOverlayManagerProxy() -{ - sptr overlayManagerProxy = new (std::nothrow) OverlayManagerProxy(nullptr); - return overlayManagerProxy; -} } // namespace AppExecFwk } // namespace OHOS diff --git a/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.h b/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.h index 5a5bbd01101e6c3a2b0fe3acadb5bf8f141b2caa..9fa1788458568ae90ad928cdcdb3b86be6a2ddf6 100644 --- a/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.h +++ b/test/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.h @@ -62,8 +62,6 @@ public: { return ERR_OK; } - - sptr GetOverlayManagerProxy() override; }; class BundleMgrStub : public IRemoteStub { @@ -99,7 +97,6 @@ public: { return ERR_OK; } - sptr GetOverlayManagerProxy() override; }; } // namespace AppExecFwk } // namespace OHOS diff --git a/test/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp b/test/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp deleted file mode 100644 index bc5914a250b8402409d23264a63ba03217cae354..0000000000000000000000000000000000000000 --- a/test/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. - */ -#include "mock_overlay_manager.h" - -#include "ability_info.h" -#include "application_info.h" - -namespace OHOS { -namespace AppExecFwk { -OverlayManagerProxy::OverlayManagerProxy(const sptr &object) : IRemoteProxy(object) -{} - -ErrCode OverlayManagerProxy::GetTargetOverlayModuleInfo(const std::string &targetModuleName, - std::vector &overlayModuleInfos, int32_t userId) -{ - return ERR_OK; -} - -int OverlayManagerHost::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) -{ - return 0; -} -} // namespace AppExecFwk -} // namespace OHOS diff --git a/test/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.h b/test/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.h deleted file mode 100644 index 2f855928b8c760f5d475170ad6082a893057e431..0000000000000000000000000000000000000000 --- a/test/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 MOCK_OHOS_ABILITY_RUNTIME_MOCK_OVERLAY_MANAGER_H -#define MOCK_OHOS_ABILITY_RUNTIME_MOCK_OVERLAY_MANAGER_H - -#include -#include "ability_info.h" -#include "application_info.h" -#include "want.h" -#include "iremote_proxy.h" -#include "iremote_stub.h" -#include "overlay_manager_interface.h" - -namespace OHOS { -namespace AppExecFwk { -class OverlayManagerProxy : public IRemoteProxy { -public: - explicit OverlayManagerProxy(const sptr &object); - virtual ~OverlayManagerProxy() - {} - - virtual ErrCode GetTargetOverlayModuleInfo(const std::string &targetModuleName, - std::vector &overlayModuleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) override; -}; - -class OverlayManagerHost : public IRemoteStub { -public: - int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override; -}; -} // namespace AppExecFwk -} // namespace OHOS - -#endif // MOCK_OHOS_ABILITY_RUNTIME_MOCK_OVERLAY_MANAGER_H diff --git a/test/mock/services_appmgr_test/include/mock_bundle_manager.h b/test/mock/services_appmgr_test/include/mock_bundle_manager.h index 78c15388e177f92387845f22850b8b587e653bae..d942b2bfaa841b9bcbc2063d7c38844c1482ebd8 100644 --- a/test/mock/services_appmgr_test/include/mock_bundle_manager.h +++ b/test/mock/services_appmgr_test/include/mock_bundle_manager.h @@ -76,8 +76,6 @@ public: { return ERR_OK; } - - sptr GetOverlayManagerProxy() override; }; class BundleMgrStub : public IRemoteStub { @@ -155,7 +153,6 @@ public: { return ERR_OK; } - sptr GetOverlayManagerProxy() override; private: std::vector bundleInfos_; sptr quickFixManager_ = nullptr; diff --git a/test/mock/services_appmgr_test/include/mock_overlay_manager.h b/test/mock/services_appmgr_test/include/mock_overlay_manager.h deleted file mode 100644 index 2f855928b8c760f5d475170ad6082a893057e431..0000000000000000000000000000000000000000 --- a/test/mock/services_appmgr_test/include/mock_overlay_manager.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 MOCK_OHOS_ABILITY_RUNTIME_MOCK_OVERLAY_MANAGER_H -#define MOCK_OHOS_ABILITY_RUNTIME_MOCK_OVERLAY_MANAGER_H - -#include -#include "ability_info.h" -#include "application_info.h" -#include "want.h" -#include "iremote_proxy.h" -#include "iremote_stub.h" -#include "overlay_manager_interface.h" - -namespace OHOS { -namespace AppExecFwk { -class OverlayManagerProxy : public IRemoteProxy { -public: - explicit OverlayManagerProxy(const sptr &object); - virtual ~OverlayManagerProxy() - {} - - virtual ErrCode GetTargetOverlayModuleInfo(const std::string &targetModuleName, - std::vector &overlayModuleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) override; -}; - -class OverlayManagerHost : public IRemoteStub { -public: - int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override; -}; -} // namespace AppExecFwk -} // namespace OHOS - -#endif // MOCK_OHOS_ABILITY_RUNTIME_MOCK_OVERLAY_MANAGER_H diff --git a/test/mock/services_appmgr_test/src/mock_bundle_manager.cpp b/test/mock/services_appmgr_test/src/mock_bundle_manager.cpp index 63e480a21e4e4c6d292467e1c45a4de9a2f92edf..5dde315f78474a14c6f917e8cb965c0544752bb3 100644 --- a/test/mock/services_appmgr_test/src/mock_bundle_manager.cpp +++ b/test/mock/services_appmgr_test/src/mock_bundle_manager.cpp @@ -19,7 +19,6 @@ #include "ability_info.h" #include "application_info.h" #include "hilog_tag_wrapper.h" -#include "mock_overlay_manager.h" namespace { const int32_t HQF_VERSION_CODE = 1000; } @@ -123,12 +122,6 @@ std::string BundleMgrProxy::GetAppType(const std::string& bundleName) return "system"; } -sptr BundleMgrProxy::GetOverlayManagerProxy() -{ - sptr overlayModuleProxy = new (std::nothrow) OverlayManagerProxy(nullptr); - return overlayModuleProxy; -} - int BundleMgrStub::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { return 0; @@ -386,10 +379,5 @@ ErrCode BundleMgrService::GetBundleInfoForSelf(int32_t flags, BundleInfo &bundle return ERR_OK; } -sptr BundleMgrService::GetOverlayManagerProxy() -{ - sptr overlayManagerProxy = new (std::nothrow) OverlayManagerProxy(nullptr); - return overlayManagerProxy; -} } // namespace AppExecFwk } // namespace OHOS diff --git a/test/mock/services_appmgr_test/src/mock_overlay_manager.cpp b/test/mock/services_appmgr_test/src/mock_overlay_manager.cpp index c8198657d0abff553dc34e751f7bc5c0edbb8f9e..0c411b33664b98ea5f077e696bccf20c5731bb27 100644 --- a/test/mock/services_appmgr_test/src/mock_overlay_manager.cpp +++ b/test/mock/services_appmgr_test/src/mock_overlay_manager.cpp @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "mock_overlay_manager.h" #include #include "mock_bundle_manager.h" @@ -22,14 +21,7 @@ namespace OHOS { namespace AppExecFwk { -OverlayManagerProxy::OverlayManagerProxy(const sptr &object) : IRemoteProxy(object) -{} -ErrCode OverlayManagerProxy::GetTargetOverlayModuleInfo(const std::string &targetModuleName, - std::vector &overlayModuleInfos, int32_t userId) -{ - return ERR_OK; -} int OverlayManagerHost::OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) { diff --git a/test/moduletest/ability_test/BUILD.gn b/test/moduletest/ability_test/BUILD.gn index b4490926194952e358e5ce407f1018596267669a..e5b3e2229f01baeedd2fd959a94e81df1d76ac6b 100644 --- a/test/moduletest/ability_test/BUILD.gn +++ b/test/moduletest/ability_test/BUILD.gn @@ -41,7 +41,6 @@ ohos_moduletest("ability_moduletest") { module_out_path = module_output_path sources = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_test/AMS/mock_ability_manager_client.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_test/AMS/mock_ability_manager_service.cpp", @@ -103,7 +102,6 @@ ohos_moduletest("ability_conetxt_test") { module_out_path = module_output_path sources = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_test/AMS/mock_ability_manager_client.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_test/AMS/mock_serviceability_manager_service.cpp", @@ -194,7 +192,6 @@ ohos_moduletest("data_ability_operation_moduletest") { module_out_path = module_output_path sources = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_test/AMS/mock_ability_manager_client.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_test/AMS/mock_ability_manager_service.cpp", diff --git a/test/moduletest/quick_fix/quick_fix_manager_module_test/BUILD.gn b/test/moduletest/quick_fix/quick_fix_manager_module_test/BUILD.gn index a81da9d4457722c2f23ecdb8aec8780d8ce6bd2a..5edace5f797bd160d31ecf73ec2a48087445ceb4 100644 --- a/test/moduletest/quick_fix/quick_fix_manager_module_test/BUILD.gn +++ b/test/moduletest/quick_fix/quick_fix_manager_module_test/BUILD.gn @@ -26,7 +26,6 @@ ohos_moduletest("quick_fix_manager_module_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/unittest/quick_fix/mock/src/mock_quick_fix_util.cpp", "quick_fix_manager_module_test.cpp", ] diff --git a/test/unittest/ability_permission_util_second_test/mock/src/mock_bundle_mgr_helper.cpp b/test/unittest/ability_permission_util_second_test/mock/src/mock_bundle_mgr_helper.cpp index b49f03f696fb1b8240fe062f8cbccfac97a4c42c..f7bed0b8e93e5b69e768591ef4a7c701e1008d8e 100755 --- a/test/unittest/ability_permission_util_second_test/mock/src/mock_bundle_mgr_helper.cpp +++ b/test/unittest/ability_permission_util_second_test/mock/src/mock_bundle_mgr_helper.cpp @@ -154,12 +154,6 @@ bool BundleMgrHelper::GetGroupDir(const std::string& dataGroupId, std::string& d return false; } -sptr BundleMgrHelper::GetOverlayManagerProxy() -{ - sptr getOverlay_ = nullptr; - return getOverlay_; -} - bool BundleMgrHelper::QueryAbilityInfo(const Want& want, AbilityInfo& abilityInfo) { return false; diff --git a/test/unittest/ams_app_death_recipient_test/BUILD.gn b/test/unittest/ams_app_death_recipient_test/BUILD.gn index 61c2a129d0f3abd65b18faec13b4257692a71543..02752dd2e04c1a1bdaa991ea41b0dd3454b069e0 100644 --- a/test/unittest/ams_app_death_recipient_test/BUILD.gn +++ b/test/unittest/ams_app_death_recipient_test/BUILD.gn @@ -21,7 +21,6 @@ ohos_unittest("AppDeathRecipientTest") { cflags_cc = [] sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "ams_app_death_recipient_test.cpp", ] diff --git a/test/unittest/ams_app_life_cycle_test/BUILD.gn b/test/unittest/ams_app_life_cycle_test/BUILD.gn index 384f8fa973a056b5d8c05f65f3ae99b718bbd778..240cbd7275672d53a04554fe26f5f4bcf104d80b 100644 --- a/test/unittest/ams_app_life_cycle_test/BUILD.gn +++ b/test/unittest/ams_app_life_cycle_test/BUILD.gn @@ -40,7 +40,6 @@ ohos_unittest("AmsAppLifeCycleTest") { "${ability_runtime_services_path}/appmgr/src/module_running_record.cpp", "${ability_runtime_services_path}/appmgr/src/remote_client_manager.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", ] sources += [ "ams_app_life_cycle_test.cpp" ] diff --git a/test/unittest/ams_app_running_record_test/BUILD.gn b/test/unittest/ams_app_running_record_test/BUILD.gn index f14a268f81d77deda98a0cc84ea883387857bb53..724697a4439a359f3b11d2fa41765b9f90fb3b38 100644 --- a/test/unittest/ams_app_running_record_test/BUILD.gn +++ b/test/unittest/ams_app_running_record_test/BUILD.gn @@ -36,7 +36,6 @@ ohos_unittest("AmsAppRunningRecordTest") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "ams_app_running_record_test.cpp", ] diff --git a/test/unittest/ams_mgr_scheduler_second_test/BUILD.gn b/test/unittest/ams_mgr_scheduler_second_test/BUILD.gn index 8f5da579d8d151d007610bd906b496e15f7fce43..5a6902ae419e4c92ad9b8be864572284869bdb67 100644 --- a/test/unittest/ams_mgr_scheduler_second_test/BUILD.gn +++ b/test/unittest/ams_mgr_scheduler_second_test/BUILD.gn @@ -41,7 +41,6 @@ ohos_unittest("ams_mgr_scheduler_second_test") { "${ability_runtime_services_path}/appmgr/src/ams_mgr_scheduler.cpp", "${ability_runtime_test_path}/mock/common/src/mock_native_token.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "mock/src/mock_ipc_skeleton.cpp", "mock/src/mock_my_flag.cpp", "mock/src/mock_permission_verification.cpp", diff --git a/test/unittest/ams_mgr_scheduler_test/BUILD.gn b/test/unittest/ams_mgr_scheduler_test/BUILD.gn index 81afb0159e35cd9366917b57aa019cf92e37a564..a07b3439d676892010b5ede9c25aa8007888c906 100644 --- a/test/unittest/ams_mgr_scheduler_test/BUILD.gn +++ b/test/unittest/ams_mgr_scheduler_test/BUILD.gn @@ -38,7 +38,6 @@ ohos_unittest("ams_mgr_scheduler_test") { sources = [ "${ability_runtime_services_path}/appmgr/src/ams_mgr_scheduler.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "mock/src/mock_my_flag.cpp", "mock/src/mock_permission_verification.cpp", ] diff --git a/test/unittest/ams_recent_app_list_test/BUILD.gn b/test/unittest/ams_recent_app_list_test/BUILD.gn index 1c4b9e155f4f5665de8cc582a5ef62c9b652c935..8c18392a9bda255f55daf9ccd186c909047af39b 100644 --- a/test/unittest/ams_recent_app_list_test/BUILD.gn +++ b/test/unittest/ams_recent_app_list_test/BUILD.gn @@ -49,7 +49,6 @@ ohos_unittest("AmsRecentAppListTest") { "${ability_runtime_services_path}/appmgr/src/window_focus_changed_listener.cpp", "${ability_runtime_services_path}/appmgr/src/window_visibility_changed_listener.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", ] sources += [ "ams_recent_app_list_test.cpp" ] diff --git a/test/unittest/ams_service_load_ability_process_test/BUILD.gn b/test/unittest/ams_service_load_ability_process_test/BUILD.gn index 6e21ffaa9de439eb1642d9d677d4a8ca5a62aca1..2e3762b6379a7f94de9779e9aa43d22db4da1e6a 100644 --- a/test/unittest/ams_service_load_ability_process_test/BUILD.gn +++ b/test/unittest/ams_service_load_ability_process_test/BUILD.gn @@ -56,7 +56,6 @@ ohos_unittest("AmsServiceLoadAbilityProcessTest") { "${ability_runtime_services_path}/appmgr/src/window_focus_changed_listener.cpp", "${ability_runtime_services_path}/appmgr/src/window_visibility_changed_listener.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", ] sources += [ "ams_service_load_ability_process_test.cpp" ] diff --git a/test/unittest/app_mgr_service_fourth_test/mock/include/mock_bundle_mgr_helper.h b/test/unittest/app_mgr_service_fourth_test/mock/include/mock_bundle_mgr_helper.h index 68693fbcd7d6e32a11ef338cd87f39219bfe2ae3..4a11faf87aeb183e1e2de2d39fdef05056ab5f9c 100755 --- a/test/unittest/app_mgr_service_fourth_test/mock/include/mock_bundle_mgr_helper.h +++ b/test/unittest/app_mgr_service_fourth_test/mock/include/mock_bundle_mgr_helper.h @@ -55,7 +55,6 @@ public: ErrCode GetDependentBundleInfo(const std::string& sharedBundleName, BundleInfo& sharedBundleInfo, GetDependentBundleInfoFlag flag = GetDependentBundleInfoFlag::GET_APP_CROSS_HSP_BUNDLE_INFO); bool GetGroupDir(const std::string& dataGroupId, std::string& dir); - sptr GetOverlayManagerProxy(); bool QueryAbilityInfo(const Want& want, AbilityInfo& abilityInfo); bool QueryAbilityInfo(const Want& want, int32_t flags, int32_t userId, AbilityInfo& abilityInfo); bool GetBundleInfos( diff --git a/test/unittest/app_mgr_service_inner_eighth_test/mock/include/mock_my_status.h b/test/unittest/app_mgr_service_inner_eighth_test/mock/include/mock_my_status.h index 5436fc4dbf6298e3764c906f08f13655d3075f9b..6a5fba1ad0568a25743ee17a4df3b0f8e2406c5e 100755 --- a/test/unittest/app_mgr_service_inner_eighth_test/mock/include/mock_my_status.h +++ b/test/unittest/app_mgr_service_inner_eighth_test/mock/include/mock_my_status.h @@ -92,7 +92,6 @@ public: bool getApplicationInfo_ = false; AppExecFwk::ApplicationInfo applicationInfo_; int getOverlayCall_ = 0; - sptr getOverlay_ = nullptr; int getBaseSharedBundleInfos_ = 0; std::vector baseSharedBundleInfos_; bool queryDataGroupInfos_ = false; diff --git a/test/unittest/app_mgr_service_inner_eighth_test/mock/src/mock_bundle_mgr_helper.cpp b/test/unittest/app_mgr_service_inner_eighth_test/mock/src/mock_bundle_mgr_helper.cpp index 817574298de80de1e658e041752c21587e2c3061..48fc8df834fb8caea721ed5054f7bc08e7ac5452 100755 --- a/test/unittest/app_mgr_service_inner_eighth_test/mock/src/mock_bundle_mgr_helper.cpp +++ b/test/unittest/app_mgr_service_inner_eighth_test/mock/src/mock_bundle_mgr_helper.cpp @@ -148,12 +148,6 @@ bool BundleMgrHelper::GetGroupDir(const std::string& dataGroupId, std::string& d return false; } -sptr BundleMgrHelper::GetOverlayManagerProxy() -{ - AAFwk::MyStatus::GetInstance().getOverlayCall_++; - return AAFwk::MyStatus::GetInstance().getOverlay_; -} - bool BundleMgrHelper::QueryAbilityInfo(const Want& want, AbilityInfo& abilityInfo) { return false; diff --git a/test/unittest/app_mgr_service_inner_ninth_test/mock/src/mock_bundle_mgr_helper.cpp b/test/unittest/app_mgr_service_inner_ninth_test/mock/src/mock_bundle_mgr_helper.cpp index 817574298de80de1e658e041752c21587e2c3061..ba3686dd3ee9f59cfc946bb4cdb891c4d7b6cd8a 100644 --- a/test/unittest/app_mgr_service_inner_ninth_test/mock/src/mock_bundle_mgr_helper.cpp +++ b/test/unittest/app_mgr_service_inner_ninth_test/mock/src/mock_bundle_mgr_helper.cpp @@ -148,11 +148,6 @@ bool BundleMgrHelper::GetGroupDir(const std::string& dataGroupId, std::string& d return false; } -sptr BundleMgrHelper::GetOverlayManagerProxy() -{ - AAFwk::MyStatus::GetInstance().getOverlayCall_++; - return AAFwk::MyStatus::GetInstance().getOverlay_; -} bool BundleMgrHelper::QueryAbilityInfo(const Want& want, AbilityInfo& abilityInfo) { diff --git a/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp b/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp index 65aa161005ff1c310678c365d9806260c3a0c296..ea4ac0161a9948d6ff86b18b51908394bd9ea181 100644 --- a/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp +++ b/test/unittest/app_mgr_service_inner_seventh_test/app_mgr_service_inner_seventh_test.cpp @@ -1114,7 +1114,6 @@ HWTEST_F(AppMgrServiceInnerSeventhTest, SetOverlayInfo_003, TestSize.Level1) auto appMgrServiceInner = std::make_shared(); AAFwk::MyStatus::GetInstance().getBundleManagerHelper_ = std::make_shared(); AAFwk::MyStatus::GetInstance().getOverlayCall_ = 0; - AAFwk::MyStatus::GetInstance().getOverlay_ = new (std::nothrow) AppExecFwk::OverlayManagerProxy(nullptr); std::string bundleName = ""; int32_t userId = 0; diff --git a/test/unittest/app_mgr_service_inner_seventh_test/mock/src/mock_bundle_mgr_helper.cpp b/test/unittest/app_mgr_service_inner_seventh_test/mock/src/mock_bundle_mgr_helper.cpp index 88fbfdea14d87ce20d537b56ad6b06392a34dcc6..0ff691cc89a864c51da6c084fabd95c7ae1fa584 100755 --- a/test/unittest/app_mgr_service_inner_seventh_test/mock/src/mock_bundle_mgr_helper.cpp +++ b/test/unittest/app_mgr_service_inner_seventh_test/mock/src/mock_bundle_mgr_helper.cpp @@ -148,12 +148,6 @@ bool BundleMgrHelper::GetGroupDir(const std::string& dataGroupId, std::string& d return false; } -sptr BundleMgrHelper::GetOverlayManagerProxy() -{ - AAFwk::MyStatus::GetInstance().getOverlayCall_++; - return AAFwk::MyStatus::GetInstance().getOverlay_; -} - bool BundleMgrHelper::QueryAbilityInfo(const Want& want, AbilityInfo& abilityInfo) { return false; diff --git a/test/unittest/app_mgr_service_inner_sixth_test/mock/include/mock_bundle_mgr_helper.h b/test/unittest/app_mgr_service_inner_sixth_test/mock/include/mock_bundle_mgr_helper.h index e6862802f30c3093f9b542b163cf9676a2902c7e..babdbe4f78d250def757dc8776bb05ccc52260e8 100755 --- a/test/unittest/app_mgr_service_inner_sixth_test/mock/include/mock_bundle_mgr_helper.h +++ b/test/unittest/app_mgr_service_inner_sixth_test/mock/include/mock_bundle_mgr_helper.h @@ -57,7 +57,6 @@ public: ErrCode GetDependentBundleInfo(const std::string& sharedBundleName, BundleInfo& sharedBundleInfo, GetDependentBundleInfoFlag flag = GetDependentBundleInfoFlag::GET_APP_CROSS_HSP_BUNDLE_INFO); bool GetGroupDir(const std::string& dataGroupId, std::string& dir); - sptr GetOverlayManagerProxy(); bool QueryAbilityInfo(const Want& want, AbilityInfo& abilityInfo); bool QueryAbilityInfo(const Want& want, int32_t flags, int32_t userId, AbilityInfo& abilityInfo); bool GetBundleInfos( diff --git a/test/unittest/app_running_processes_info_test/BUILD.gn b/test/unittest/app_running_processes_info_test/BUILD.gn index 38ca4ebfca0f92315a2811c0068d58a9dd4fe282..acf62f7381b929b77f4cc2ca10172ed9c98c6c26 100644 --- a/test/unittest/app_running_processes_info_test/BUILD.gn +++ b/test/unittest/app_running_processes_info_test/BUILD.gn @@ -48,7 +48,6 @@ ohos_unittest("AppRunningProcessesInfoTest") { "${ability_runtime_services_path}/appmgr/src/user_record_manager.cpp", "${ability_runtime_test_path}/mock/common/src/mock_native_token.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", ] sources += [ "app_running_processes_info_test.cpp" ] diff --git a/test/unittest/appkit/main_fourth_test/BUILD.gn b/test/unittest/appkit/main_fourth_test/BUILD.gn index 1cca5d292567640e10550836e547b99be725bfef..e3276fa97de1523c65a78a9c613c2ecc6e20407f 100644 --- a/test/unittest/appkit/main_fourth_test/BUILD.gn +++ b/test/unittest/appkit/main_fourth_test/BUILD.gn @@ -25,7 +25,6 @@ ohos_unittest("main_fourth_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/sys_mgr_client_mock.cpp", "main_fourth_test.cpp", ] @@ -83,7 +82,6 @@ ohos_unittest("main_fourth_by_mock_bms_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/sys_mgr_client_mock.cpp", "main_fourth_by_mock_bms_test.cpp", ] diff --git a/test/unittest/appkit/main_fourth_test/main_fourth_by_mock_bms_test.cpp b/test/unittest/appkit/main_fourth_test/main_fourth_by_mock_bms_test.cpp index 89e6fcd84650baa65286efce8a6e4f3e4a16199a..82f0418f9dff83882464d143b801c14025084ac1 100644 --- a/test/unittest/appkit/main_fourth_test/main_fourth_by_mock_bms_test.cpp +++ b/test/unittest/appkit/main_fourth_test/main_fourth_by_mock_bms_test.cpp @@ -23,7 +23,6 @@ #include "main_thread.h" #include "mock_bundle_installer_service.h" #include "mock_bundle_manager.h" -#include "mock_overlay_manager.h" #include "mock_system_ability_manager.h" #include "ohos_application.h" #include "process_info.h" diff --git a/test/unittest/appkit/main_thread_test/BUILD.gn b/test/unittest/appkit/main_thread_test/BUILD.gn index a48709c3575f19922e96b9d8d213f4e267b1aad9..69aee4e5d07eeb626a87f1ae0290826afeaa3d06 100644 --- a/test/unittest/appkit/main_thread_test/BUILD.gn +++ b/test/unittest/appkit/main_thread_test/BUILD.gn @@ -25,7 +25,6 @@ ohos_unittest("main_thread_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/sys_mgr_client_mock.cpp", "main_thread_test.cpp", ] @@ -83,7 +82,6 @@ ohos_unittest("main_thread_by_mock_bms_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/services_appmgr_test/src/sys_mgr_client_mock.cpp", "main_thread_by_mock_bms_test.cpp", ] diff --git a/test/unittest/appkit/main_thread_test/main_thread_by_mock_bms_test.cpp b/test/unittest/appkit/main_thread_test/main_thread_by_mock_bms_test.cpp index 89e6fcd84650baa65286efce8a6e4f3e4a16199a..82f0418f9dff83882464d143b801c14025084ac1 100644 --- a/test/unittest/appkit/main_thread_test/main_thread_by_mock_bms_test.cpp +++ b/test/unittest/appkit/main_thread_test/main_thread_by_mock_bms_test.cpp @@ -23,7 +23,6 @@ #include "main_thread.h" #include "mock_bundle_installer_service.h" #include "mock_bundle_manager.h" -#include "mock_overlay_manager.h" #include "mock_system_ability_manager.h" #include "ohos_application.h" #include "process_info.h" diff --git a/test/unittest/bundle_mgr_helper_test/bundle_mgr_helper_test.cpp b/test/unittest/bundle_mgr_helper_test/bundle_mgr_helper_test.cpp index 7624899366b7e2f1f1c5bc89b700a0e696273706..b9b51706889d546749627cabd810f8e7bd0425e2 100644 --- a/test/unittest/bundle_mgr_helper_test/bundle_mgr_helper_test.cpp +++ b/test/unittest/bundle_mgr_helper_test/bundle_mgr_helper_test.cpp @@ -167,17 +167,6 @@ HWTEST_F(BundleMgrHelperTest, BundleMgrHelperTest_GetGroupDir_001, TestSize.Leve EXPECT_EQ(ret, false); } -/** - * @tc.name: BundleMgrHelperTest_GetOverlayManagerProxy_001 - * @tc.desc: GetOverlayManagerProxy - * @tc.type: FUNC - */ -HWTEST_F(BundleMgrHelperTest, BundleMgrHelperTest_GetOverlayManagerProxy_001, TestSize.Level1) -{ - auto ret = bundleMgrHelper->GetOverlayManagerProxy(); - EXPECT_NE(ret, nullptr); -} - /** * @tc.name: BundleMgrHelperTest_QueryAbilityInfo_002 * @tc.desc: QueryAbilityInfo diff --git a/test/unittest/cj_ability_stage_object_test/BUILD.gn b/test/unittest/cj_ability_stage_object_test/BUILD.gn index 2f3502ed99cbe98ceb670fc22d370db3d1503d20..62d4826c886a379d6453f252c4d867dabc410ca8 100644 --- a/test/unittest/cj_ability_stage_object_test/BUILD.gn +++ b/test/unittest/cj_ability_stage_object_test/BUILD.gn @@ -39,7 +39,6 @@ ohos_unittest("cj_ability_stage_object_test") { "${ability_runtime_path}/frameworks/native/appkit/ability_runtime/app/cj_ability_stage_context.cpp", "${ability_runtime_path}/frameworks/native/appkit/ability_runtime/app/cj_ability_stage_object.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "cj_ability_stage_object_test.cpp", ] diff --git a/test/unittest/cj_ability_stage_test/BUILD.gn b/test/unittest/cj_ability_stage_test/BUILD.gn index 65d21dfbae7f3ba0012fe27c12d5bee63c9da38c..722a8cbc1f0955a80b25119835b7956a5a456f80 100644 --- a/test/unittest/cj_ability_stage_test/BUILD.gn +++ b/test/unittest/cj_ability_stage_test/BUILD.gn @@ -38,7 +38,6 @@ ohos_unittest("cj_ability_stage_test") { "${ability_runtime_path}/frameworks/native/appkit/ability_runtime/app/cj_ability_stage.cpp", "${ability_runtime_path}/frameworks/native/appkit/ability_runtime/app/cj_ability_stage_context.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "cj_ability_stage_test.cpp", ] diff --git a/test/unittest/frameworks_kits_ability_native_test/BUILD.gn b/test/unittest/frameworks_kits_ability_native_test/BUILD.gn index 475cb31348ad87bfb25212c2eadea84272afab33..6864309cbf91d8b935cc7ca4fa26c4dd837c72e7 100644 --- a/test/unittest/frameworks_kits_ability_native_test/BUILD.gn +++ b/test/unittest/frameworks_kits_ability_native_test/BUILD.gn @@ -259,7 +259,6 @@ ohos_unittest("ability_context_test") { "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_ability_manager_clientex.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_ability_manager_service.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "ability_context_test.cpp", ] @@ -1863,7 +1862,6 @@ ohos_unittest("ability_permission_test") { sources = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_ability_manager_service.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "ability_permission_test.cpp", ] diff --git a/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn b/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn index edff3a58eaa9403e39a0d777773e2327a2a30ce7..9b4e0f03fa0b2d664add9c401b50ea86e0e898eb 100644 --- a/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn +++ b/test/unittest/frameworks_kits_appkit_native_test/BUILD.gn @@ -101,7 +101,6 @@ ohos_unittest("application_test") { "${ability_runtime_native_path}/appkit/app/application_cleaner.cpp", "${ability_runtime_native_path}/appkit/app/ohos_application.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "application_test.cpp", ] @@ -343,7 +342,6 @@ ohos_unittest("context_container_test") { "${ability_runtime_native_path}/appkit/app/application_cleaner.cpp", "${ability_runtime_native_path}/appkit/app/ohos_application.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "context_container_test.cpp", ] @@ -536,7 +534,6 @@ ohos_unittest("context_deal_test") { "${ability_runtime_native_path}/appkit/app/application_cleaner.cpp", "${ability_runtime_native_path}/appkit/app/ohos_application.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_appkit_native_test/include/mock_ability_manager_client.cpp", "context_deal_test.cpp", @@ -692,7 +689,6 @@ ohos_unittest("ability_stage_test") { sources = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/mock_overlay_manager.cpp", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", "ability_stage_test.cpp", "application_data_manager_test.cpp", diff --git a/test/unittest/quick_fix/quick_fix_manager_service_second_test/BUILD.gn b/test/unittest/quick_fix/quick_fix_manager_service_second_test/BUILD.gn index fae57fb64e6ba3112ec24b1c666bf0bec5bd1096..1392b0e33d8eeea0294d2c51d8ee70747bd154f2 100644 --- a/test/unittest/quick_fix/quick_fix_manager_service_second_test/BUILD.gn +++ b/test/unittest/quick_fix/quick_fix_manager_service_second_test/BUILD.gn @@ -28,7 +28,6 @@ ohos_unittest("quick_fix_manager_service_second_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/unittest/quick_fix/mock/src/mock_quick_fix_util.cpp", "mock/src/mock_my_flag.cpp", "mock/src/mock_permission_verification.cpp", diff --git a/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn b/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn index e35e6e9b2e2805d76a2f31464c1bbdc23962e566..4a5e0824bd2edbf2cb8a097d29ea30e652fc58d8 100644 --- a/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn +++ b/test/unittest/quick_fix/quick_fix_manager_service_test/BUILD.gn @@ -27,7 +27,6 @@ ohos_unittest("quick_fix_manager_service_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/unittest/quick_fix/mock/src/mock_quick_fix_util.cpp", "quick_fix_manager_service_test.cpp", ] @@ -77,7 +76,6 @@ ohos_unittest("quick_fix_manager_apply_task_test") { sources = [ "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_bundle_manager.cpp", - "${ability_runtime_test_path}/mock/services_appmgr_test/src/mock_overlay_manager.cpp", "${ability_runtime_test_path}/unittest/quick_fix/mock/src/mock_quick_fix_util.cpp", "quick_fix_manager_apply_task_test.cpp", ]