From 0dadf595b94a79fee56595753ddd45a36526e310 Mon Sep 17 00:00:00 2001 From: wangkailong Date: Fri, 22 Nov 2024 15:19:29 +0800 Subject: [PATCH] diji Signed-off-by: wangkailong Change-Id: I92fe5235b21e43e6617d3d51ca36b3b2c3655171 --- frameworks/cj/ffi/cj_ability_delegator.cpp | 7 ++++--- services/abilitymgr/src/user_controller.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frameworks/cj/ffi/cj_ability_delegator.cpp b/frameworks/cj/ffi/cj_ability_delegator.cpp index 5d9dfeaf28..29e065a64f 100644 --- a/frameworks/cj/ffi/cj_ability_delegator.cpp +++ b/frameworks/cj/ffi/cj_ability_delegator.cpp @@ -26,7 +26,7 @@ namespace OHOS { namespace AbilityDelegatorCJ { using namespace OHOS::FFI; using namespace OHOS::AbilityRuntime; - + int32_t CJAbilityDelegator::StartAbility(const AAFwk::Want &want) { return delegator_->StartAbility(want); @@ -68,7 +68,7 @@ void CJAbilityDelegator::FinishTest(const char* msg, int64_t code) { delegator_->FinishUserTest(msg, code); } - + extern "C" { int64_t FFIAbilityDelegatorRegistryGetAbilityDelegator() { @@ -84,7 +84,7 @@ int64_t FFIAbilityDelegatorRegistryGetAbilityDelegator() } return cjDelegator->GetID(); } - + int32_t FFIAbilityDelegatorStartAbility(int64_t id, WantHandle want) { auto cjDelegator = FFI::FFIData::GetData(id); @@ -163,6 +163,7 @@ void FFIAbilityDelegatorFinishTest(int64_t id, const char* msg, int64_t code) auto cjDelegator = FFI::FFIData::GetData(id); if (cjDelegator == nullptr) { TAG_LOGE(AAFwkTag::DELEGATOR, "null cj delegator"); + return; } cjDelegator->FinishTest(msg, code); } diff --git a/services/abilitymgr/src/user_controller.cpp b/services/abilitymgr/src/user_controller.cpp index 8e646a9631..52b064e019 100644 --- a/services/abilitymgr/src/user_controller.cpp +++ b/services/abilitymgr/src/user_controller.cpp @@ -306,7 +306,7 @@ void UserController::UserBootDone(std::shared_ptr &item) std::lock_guard guard(userLock_); auto it = userItems_.find(userId); - if (it != userItems_.end()) { + if (it == userItems_.end()) { return; }