!1436 修复多线程show两次和保证Onkeyboardhide的回调

Merge pull request !1436 from ZSY/master
This commit is contained in:
openharmony_ci 2024-08-31 13:38:17 +00:00 committed by Gitee
commit bd6f82d248
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -221,9 +221,9 @@ int32_t InputMethodAbility::StartInput(const InputClientInfo &clientInfo, bool i
return ret;
}
isPendingShowKeyboard_ = clientInfo.isShowKeyboard;
auto showPanel = [&, needShow = clientInfo.isShowKeyboard] {
if (needShow) {
isPendingShowKeyboard_ = clientInfo.isShowKeyboard;
ShowKeyboardImplWithoutLock(cmdId_);
}
};
@ -1080,6 +1080,7 @@ void InputMethodAbility::OnClientInactive(const sptr<IRemoteObject> &channel)
IMSA_HILOGE("failed, ret: %{public}d", ret);
return false;
}
imeListener_->OnKeyboardStatus(false);
NotifyPanelStatusInfo({ { panel->GetPanelType(), panel->GetPanelFlag() }, false, Trigger::IME_APP },
channelProxy);
// finish previewing text when soft keyboard hides