Merge pull request !1491 from wangdongqi/master
This commit is contained in:
openharmony_ci 2024-09-24 09:06:32 +00:00 committed by Gitee
commit b2842105f0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 8 additions and 4 deletions

View File

@ -1070,7 +1070,9 @@ void InputMethodAbility::OnClientInactive(const sptr<IRemoteObject> &channel)
IMSA_HILOGE("failed to create channel proxy!");
return;
}
imeListener_->OnKeyboardStatus(false);
if (imeListener_ != nullptr) {
imeListener_->OnKeyboardStatus(false);
}
panels_.ForEach([this, &channelProxy](const PanelType &panelType, const std::shared_ptr<InputMethodPanel> &panel) {
if (panelType != PanelType::SOFT_KEYBOARD || panel->GetPanelFlag() != PanelFlag::FLG_FIXED) {
auto ret = panel->HidePanel(false);

View File

@ -349,7 +349,9 @@ int32_t InputMethodController::Close()
OperateIMEInfoCode infoCode = OperateIMEInfoCode::IME_UNBIND;
{
std::lock_guard<std::recursive_mutex> lock(clientInfoLock_);
infoCode = clientInfo_.isShowKeyboard ? OperateIMEInfoCode::IME_HIDE_UNBIND : OperateIMEInfoCode::IME_UNBIND;
if (clientInfo_.isShowKeyboard) {
infoCode = OperateIMEInfoCode::IME_HIDE_UNBIND;
}
}
InputMethodSyncTrace tracer("InputMethodController Close trace.");
InputMethodSysEvent::GetInstance().OperateSoftkeyboardBehaviour(infoCode);

View File

@ -32,8 +32,8 @@ public:
std::shared_ptr<ImeInfo> GetDefaultImeInfo(int32_t userId);
std::shared_ptr<Property> GetCurrentInputMethod(int32_t userId);
std::shared_ptr<Property> GetDefaultImeCfgProp();
bool GetImeAppId(int32_t userId, const std::string &bundleName, std::string &appId);
bool GetImeVersionCode(int32_t userId, const std::string &bundleName, uint32_t &versionCode);
static bool GetImeAppId(int32_t userId, const std::string &bundleName, std::string &appId);
static bool GetImeVersionCode(int32_t userId, const std::string &bundleName, uint32_t &versionCode);
private:
static std::shared_ptr<ImeInfo> defaultIme_;