mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 06:40:06 +00:00
fix
Signed-off-by: htt1997 <hutao105@huawei.com>
This commit is contained in:
parent
a63e339066
commit
f4bccbf0ce
@ -164,6 +164,16 @@ sptr<IInputMethodSystemAbility> InputMethodController::GetSystemAbilityProxy()
|
||||
return abilityManager_;
|
||||
}
|
||||
|
||||
void InputMethodController::RemoveDeathRecipient()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(abilityLock_);
|
||||
if (abilityManager_ == nullptr || deathRecipient_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
abilityManager_->AsObject()->RemoveDeathRecipient(deathRecipient_);
|
||||
deathRecipient_ = nullptr;
|
||||
}
|
||||
|
||||
void InputMethodController::DeactivateClient()
|
||||
{
|
||||
{
|
||||
@ -461,6 +471,8 @@ int32_t InputMethodController::ReleaseInput(sptr<IInputClient> &client)
|
||||
if (ret == ErrorCode::NO_ERROR) {
|
||||
OnInputStop();
|
||||
}
|
||||
RemoveDeathRecipient();
|
||||
SetTextListener(nullptr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -916,7 +928,6 @@ void InputMethodController::OnInputStop()
|
||||
}
|
||||
listener->SendKeyboardStatus(KeyboardStatus::HIDE);
|
||||
}
|
||||
SetTextListener(nullptr);
|
||||
isBound_.store(false);
|
||||
isEditable_.store(false);
|
||||
}
|
||||
|
@ -770,6 +770,7 @@ private:
|
||||
|
||||
int32_t Initialize();
|
||||
sptr<IInputMethodSystemAbility> GetSystemAbilityProxy();
|
||||
void RemoveDeathRecipient();
|
||||
int32_t StartInput(InputClientInfo &inputClientInfo, sptr<IRemoteObject> &agent);
|
||||
int32_t ShowInput(sptr<IInputClient> &client);
|
||||
int32_t HideInput(sptr<IInputClient> &client);
|
||||
|
Loading…
Reference in New Issue
Block a user