modify some code

Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
zhaolinglan 2022-09-19 14:47:10 +08:00
parent 6f9d49c1da
commit 46d9c767fc
2 changed files with 3 additions and 3 deletions

View File

@ -164,7 +164,7 @@ namespace MiscServices {
int AddClient(int pid, int uid, int displayId, const sptr<IInputClient>& inputClient,
const sptr<IInputDataChannel>& channel,
const InputAttribute& attribute);
int RemoveClient(const sptr<IRemoteObject>& inputClient);
int RemoveClient(IRemoteObject *inputClient);
int StartInputMethod(int index);
int StopInputMethod(int index);
int ShowKeyboard(const sptr<IInputClient>& inputClient, bool isShowKeyboard);

View File

@ -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<IRemoteObject> &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_);
}