From 42bc981818f67ffbcbfe76f2bb6dfe8bb4f233e4 Mon Sep 17 00:00:00 2001 From: cy7717 Date: Wed, 23 Jul 2025 16:18:14 +0800 Subject: [PATCH 1/2] mod Signed-off-by: cy7717 --- services/src/peruser_session.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index c67651e7e..8f73d5e4c 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -1083,6 +1083,8 @@ void PerUserSession::OnScreenLock() auto imeData = GetImeData(ImeType::IME); if (imeData == nullptr) { IMSA_HILOGD("imeData is nullptr"); + std::pair ime{ "", "" }; + SetImeUsedBeforeScreenLocked(ime); return; } SetImeUsedBeforeScreenLocked(imeData->ime); -- Gitee From 2f87cad26bb5dd6991e7ac34b7a37d39d555cdd5 Mon Sep 17 00:00:00 2001 From: cy7717 Date: Mon, 28 Jul 2025 09:44:04 +0800 Subject: [PATCH 2/2] add Signed-off-by: cy7717 --- services/src/peruser_session.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index a47216f11..c49452e2a 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -845,7 +845,7 @@ int32_t PerUserSession::InitInputControlChannel() return ErrorCode::ERROR_NULL_POINTER; } auto data = GetReadyImeData(ImeType::IME); - if (data == nullptr) { + if (data == nullptr) { // data->core 統一排查所有GetReadyImeData的調用処 TODO IMSA_HILOGE("ime: %{public}d is not exist!", ImeType::IME); return ErrorCode::ERROR_IME_NOT_STARTED; } @@ -984,7 +984,7 @@ std::shared_ptr PerUserSession::GetReadyImeData(ImeType type) if (it == imeData_.end()) { return nullptr; } - if (it->second->imeStatus != ImeStatus::READY) { + if (it->second->imeStatus != ImeStatus::READY) { // TODO it->second return nullptr; } return it->second; @@ -1010,7 +1010,7 @@ void PerUserSession::RemoveImeData(ImeType type, bool isImeDied) return; } auto data = it->second; - if (isImeDied && data->core != nullptr && data->core->AsObject() != nullptr) { + if (isImeDied && data->core != nullptr && data->core->AsObject() != nullptr) { // data TODO data->core->AsObject()->RemoveDeathRecipient(data->deathRecipient); } imeData_.erase(type); @@ -1784,7 +1784,7 @@ int32_t PerUserSession::UpdateImeData(sptr core, sptrsecond->core = core; + it->second->core = core; // it->second TODO it->second->agent = agent; it->second->pid = pid; it->second->imeStateManager = ImeStateManagerFactory::GetInstance().CreateImeStateManager(pid, [this] { @@ -1813,7 +1813,7 @@ int32_t PerUserSession::InitConnect(pid_t pid) if (it == imeData_.end()) { return ErrorCode::ERROR_NULL_POINTER; } - it->second->pid = pid; + it->second->pid = pid; // it->second TODO return ErrorCode::NO_ERROR; } @@ -1857,7 +1857,7 @@ ImeAction PerUserSession::GetImeAction(ImeEvent action) if (it == imeData_.end()) { return ImeAction::DO_ACTION_IN_NULL_IME_DATA; } - auto iter = imeEventConverter_.find({ it->second->imeStatus, action }); + auto iter = imeEventConverter_.find({ it->second->imeStatus, action }); // it->second TODO if (iter == imeEventConverter_.end()) { IMSA_HILOGE("abnormal!"); return ImeAction::DO_ACTION_IN_IME_EVENT_CONVERT_FAILED; -- Gitee