From 16e7ee19310f4ddffe14821b9b6c697750c063a4 Mon Sep 17 00:00:00 2001 From: tantingting Date: Mon, 29 Jul 2024 19:24:17 +0800 Subject: [PATCH] update code diff Signed-off-by: tantingting --- .../native/appkit/app/application_impl.cpp | 1 + .../app_manager/src/appmgr/app_mgr_client.cpp | 20 +++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/frameworks/native/appkit/app/application_impl.cpp b/frameworks/native/appkit/app/application_impl.cpp index 5a57cec551..35d3622ec9 100644 --- a/frameworks/native/appkit/app/application_impl.cpp +++ b/frameworks/native/appkit/app/application_impl.cpp @@ -117,6 +117,7 @@ bool ApplicationImpl::PerformTerminate(bool isLastProcess) curState_ = APP_STATE_TERMINATED; return true; } + TAG_LOGE(AAFwkTag::APPKIT, "curState is %{public}d", curState_); return false; } diff --git a/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp b/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp index b1a3e49b8d..a9fd92900b 100644 --- a/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp +++ b/interfaces/inner_api/app_manager/src/appmgr/app_mgr_client.cpp @@ -1084,16 +1084,6 @@ int32_t AppMgrClient::UnregisterAppRunningStatusListener(const sptrUnregisterAppRunningStatusListener(listener); } -bool AppMgrClient::IsFinalAppProcess() -{ - sptr service = iface_cast(mgrHolder_->GetRemoteObject()); - if (service == nullptr) { - TAG_LOGE(AAFwkTag::APPMGR, "Service is nullptr."); - return false; - } - return service->IsFinalAppProcess(); -} - void AppMgrClient::ClearProcessByToken(sptr token) const { sptr service = iface_cast(mgrHolder_->GetRemoteObject()); @@ -1109,6 +1099,16 @@ void AppMgrClient::ClearProcessByToken(sptr token) const amsService->ClearProcessByToken(token); } +bool AppMgrClient::IsFinalAppProcess() +{ + sptr service = iface_cast(mgrHolder_->GetRemoteObject()); + if (service == nullptr) { + TAG_LOGE(AAFwkTag::APPMGR, "Service is nullptr."); + return false; + } + return service->IsFinalAppProcess(); +} + int32_t AppMgrClient::RegisterRenderStateObserver(const sptr &observer) { sptr service = iface_cast(mgrHolder_->GetRemoteObject());