mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 22:59:45 +00:00
bugfix
Signed-off-by: guojin31 <guojin31@huawei.com>
This commit is contained in:
parent
39d61b3129
commit
7bd28e68e2
@ -149,7 +149,7 @@ private:
|
||||
int32_t ShowPanel(const std::shared_ptr<InputMethodPanel> &inputMethodPanel, PanelFlag flag, Trigger trigger);
|
||||
int32_t HidePanel(const std::shared_ptr<InputMethodPanel> &inputMethodPanel, PanelFlag flag, Trigger trigger);
|
||||
int32_t NotifyIsShowSysPanel(const std::shared_ptr<InputMethodPanel> &inputMethodPanel, PanelFlag flag);
|
||||
void SaveInputAttribute(const InputAttribute &inputAttribute);
|
||||
void SetInputAttribute(const InputAttribute &inputAttribute);
|
||||
InputAttribute GetInputAttribute();
|
||||
void ClearInputAttribute();
|
||||
void NotifyPanelStatusInfo(const PanelStatusInfo &info);
|
||||
|
@ -241,7 +241,7 @@ int32_t InputMethodAbility::StartInput(const InputClientInfo &clientInfo, bool i
|
||||
"IMA isShowKeyboard: %{public}d, isBindFromClient: %{public}d", clientInfo.isShowKeyboard, isBindFromClient);
|
||||
SetInputDataChannel(clientInfo.channel->AsObject());
|
||||
isBindFromClient ? InvokeTextChangeCallback(clientInfo.config) : NotifyAllTextConfig();
|
||||
SaveInputAttribute(clientInfo.config.inputAttribute);
|
||||
SetInputAttribute(clientInfo.config.inputAttribute);
|
||||
if (imeListener_ == nullptr) {
|
||||
IMSA_HILOGE("imeListener is nullptr");
|
||||
return ErrorCode::ERROR_IME;
|
||||
@ -371,7 +371,7 @@ void InputMethodAbility::OnConfigurationChange(Message *msg)
|
||||
attribute.inputPattern = data->ReadInt32();
|
||||
IMSA_HILOGD("InputMethodAbility, enterKeyType: %{public}d, inputPattern: %{public}d", attribute.enterKeyType,
|
||||
attribute.inputPattern);
|
||||
SaveInputAttribute(attribute);
|
||||
SetInputAttribute(attribute);
|
||||
// add for mod inputPattern when panel show
|
||||
auto panel = GetSoftKeyboardPanel();
|
||||
if (panel != nullptr) {
|
||||
@ -905,7 +905,7 @@ int32_t InputMethodAbility::NotifyIsShowSysPanel(
|
||||
return systemChannel->NotifyIsShowSysPanel(isShow);
|
||||
}
|
||||
|
||||
void InputMethodAbility::SaveInputAttribute(const InputAttribute &inputAttribute)
|
||||
void InputMethodAbility::SetInputAttribute(const InputAttribute &inputAttribute)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(inputAttrLock_);
|
||||
inputAttribute_ = inputAttribute;
|
||||
|
@ -45,7 +45,7 @@ int32_t SystemCmdChannelProxy::SendRequest(int code, ParcelHandler input, Parcel
|
||||
IMSA_HILOGD("SystemCmdChannelProxy run in, code = %{public}d", code);
|
||||
MessageParcel data;
|
||||
MessageParcel reply;
|
||||
MessageOption option{ MessageOption::TF_SYNC };
|
||||
MessageOption option{ MessageOption::TF_ASYNC };
|
||||
if (!data.WriteInterfaceToken(GetDescriptor())) {
|
||||
IMSA_HILOGE("SystemCmdChannelProxy::write interface token failed");
|
||||
return ErrorCode::ERROR_EX_ILLEGAL_ARGUMENT;
|
||||
|
@ -482,14 +482,13 @@ int32_t PerUserSession::OnStartInput(const InputClientInfo &inputClientInfo, spt
|
||||
InputClientInfo infoTemp = *clientInfo;
|
||||
infoTemp.isShowKeyboard = inputClientInfo.isShowKeyboard;
|
||||
infoTemp.isNotifyInputStart = inputClientInfo.isNotifyInputStart;
|
||||
infoTemp.config = inputClientInfo.config;
|
||||
auto imeType = IsProxyImeEnable() ? ImeType::PROXY_IME : ImeType::IME;
|
||||
int32_t ret = BindClientWithIme(std::make_shared<InputClientInfo>(infoTemp), imeType, true);
|
||||
if (ret != ErrorCode::NO_ERROR) {
|
||||
IMSA_HILOGE("bind failed, ret: %{public}d", ret);
|
||||
return ret;
|
||||
}
|
||||
auto data = GetImeData(imeType);
|
||||
auto data = GetImeData(imeType);
|
||||
if (data == nullptr || data->agent == nullptr) {
|
||||
IMSA_HILOGE("data or agent is nullptr.");
|
||||
return ErrorCode::ERROR_IME_NOT_STARTED;
|
||||
|
Loading…
Reference in New Issue
Block a user