From 46d9c767fca467755b28d20915698fea76b52a70 Mon Sep 17 00:00:00 2001 From: zhaolinglan Date: Mon, 19 Sep 2022 14:47:10 +0800 Subject: [PATCH] modify some code Signed-off-by: zhaolinglan --- services/include/peruser_session.h | 2 +- services/src/peruser_session.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/include/peruser_session.h b/services/include/peruser_session.h index 42fccc66..375edd04 100644 --- a/services/include/peruser_session.h +++ b/services/include/peruser_session.h @@ -164,7 +164,7 @@ namespace MiscServices { int AddClient(int pid, int uid, int displayId, const sptr& inputClient, const sptr& channel, const InputAttribute& attribute); - int RemoveClient(const sptr& inputClient); + int RemoveClient(IRemoteObject *inputClient); int StartInputMethod(int index); int StopInputMethod(int index); int ShowKeyboard(const sptr& inputClient, bool isShowKeyboard); diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index 9837432d..beb8ad9a 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -379,7 +379,7 @@ namespace MiscServices { \return ErrorCode::NO_ERROR no error \return ErrorCode::ERROR_CLIENT_NOT_FOUND client is not found */ - int PerUserSession::RemoveClient(const sptr &inputClient) + int PerUserSession::RemoveClient(IRemoteObject *inputClient) { IMSA_HILOGE("PerUserSession::RemoveClient"); auto it = mapClients.find(inputClient); @@ -1203,7 +1203,7 @@ namespace MiscServices { imsCore[0]->SetClientState(false); } HideKeyboard(client); - int ret = RemoveClient(clientObject); + int ret = RemoveClient(clientObject.GetRefPtr()); if (ret != ErrorCode::NO_ERROR) { IMSA_HILOGE("PerUserSession::OnReleaseInput Aborted! Failed to RemoveClient [%{public}d]\n", userId_); }