mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-30 18:31:01 +00:00
add focus check to input client
Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
parent
e8accf090f
commit
14bbe16956
@ -166,15 +166,6 @@ int32_t PerUserSession::ShowKeyboard(
|
||||
int32_t PerUserSession::HideKeyboard(const sptr<IInputClient> &inputClient)
|
||||
{
|
||||
IMSA_HILOGD("PerUserSession::HideKeyboard");
|
||||
auto client = GetCurrentClient();
|
||||
if (client == nullptr || inputClient == nullptr) {
|
||||
IMSA_HILOGE("client is nullptr");
|
||||
return ErrorCode::ERROR_CLIENT_NULL_POINTER;
|
||||
}
|
||||
if (client->AsObject().GetRefPtr() == inputClient->AsObject().GetRefPtr()) {
|
||||
IMSA_HILOGE("not current client");
|
||||
return ErrorCode::ERROR_CLIENT_NOT_EDITABLE;
|
||||
}
|
||||
sptr<IInputMethodCore> core = GetImsCore(CURRENT_IME);
|
||||
if (core == nullptr) {
|
||||
IMSA_HILOGE("imsCore is nullptr");
|
||||
|
Loading…
Reference in New Issue
Block a user