From 783ba0c6e8bbcaec96c024f64535e4388c2cf3fb Mon Sep 17 00:00:00 2001 From: jsy Date: Wed, 13 Nov 2024 15:39:31 +0800 Subject: [PATCH] add ability stage Signed-off-by: jsy --- frameworks/native/appkit/app/main_thread.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/frameworks/native/appkit/app/main_thread.cpp b/frameworks/native/appkit/app/main_thread.cpp index 0c7c16778f..88d855cf1b 100644 --- a/frameworks/native/appkit/app/main_thread.cpp +++ b/frameworks/native/appkit/app/main_thread.cpp @@ -1864,18 +1864,7 @@ void MainThread::PreloadModule(const AppExecFwk::HapModuleInfo &entryHapModuleIn const std::unique_ptr& runtime) { TAG_LOGI(AAFwkTag::APPKIT, "preload module %{public}s", entryHapModuleInfo.moduleName.c_str()); - wptr weak = this; - auto callback = [weak]() { - auto appThread = weak.promote(); - if (appThread == nullptr) { - TAG_LOGE(AAFwkTag::APPKIT, "appThread is nullptr"); - return; - } - if (!appThread->appMgr_ || !appThread->applicationImpl_) { - TAG_LOGE(AAFwkTag::APPKIT, "appMgr_ is nullptr"); - return; - } - }; + auto callback = []() {}; bool isAsyncCallback = false; application_->AddAbilityStage(entryHapModuleInfo, callback, isAsyncCallback); if (isAsyncCallback) {