Signed-off-by: ma-shaoyin <mashaoyin1@huawei.com>

Changes to be committed:
This commit is contained in:
ma-shaoyin 2022-08-04 09:08:06 +08:00
parent a396456c60
commit e2a3d55267

View File

@ -483,7 +483,12 @@ using namespace MessageID;
{
IMSA_HILOGI("run in SetInputMethodAgent");
std::lock_guard<std::mutex> lock(mAgentLock_);
mAgent = std::make_shared<InputMethodAgentProxy>(object);
std::shared_ptr<InputMethodAgentProxy> agent = std::make_shared<InputMethodAgentProxy>(object);
if (agent == nullptr) {
IMSA_HILOGI("InputMethodController::SetInputMethodAgent agent is nullptr");
return;
}
mAgent = agent;
}
std::shared_ptr<InputMethodAgentProxy> InputMethodController::GetInputMethodAgent()