mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 14:49:59 +00:00
commit
16004b72bc
@ -44,7 +44,7 @@ constexpr double INVALID_CURSOR_VALUE = -1.0;
|
||||
constexpr int32_t INVALID_SELECTION_VALUE = -1;
|
||||
constexpr uint32_t FIND_PANEL_RETRY_INTERVAL = 10;
|
||||
constexpr uint32_t MAX_RETRY_TIMES = 100;
|
||||
constexpr int32_t START_INPUT_PROCESS_TIMEOUT = 1500;
|
||||
constexpr int32_t START_INPUT_PROCESS_TIMEOUT = 500;
|
||||
InputMethodAbility::InputMethodAbility() : msgHandler_(nullptr), stop_(false)
|
||||
{
|
||||
}
|
||||
|
@ -227,6 +227,16 @@ void PerUserSession::OnImeDied(const sptr<IInputMethodCore> &remote, ImeType typ
|
||||
IMSA_HILOGI("type: %{public}d", type);
|
||||
RemoveImeData(type, true);
|
||||
InputTypeManager::GetInstance().Set(false);
|
||||
auto currentImeInfo = ImeCfgManager::GetInstance().GetCurrentImeCfg(userId_);
|
||||
if (currentImeInfo == nullptr) {
|
||||
IMSA_HILOGE("currentImeInfo is nullptr");
|
||||
return;
|
||||
}
|
||||
auto defaultImeInfo = ImeInfoInquirer::GetInstance().GetDefaultImeCfgProp();
|
||||
if (defaultImeInfo == nullptr) {
|
||||
IMSA_HILOGE("defaultImeInfo is nullptr");
|
||||
return;
|
||||
}
|
||||
auto client = GetCurrentClient();
|
||||
auto clientInfo = client != nullptr ? GetClientInfo(client->AsObject()) : nullptr;
|
||||
if (clientInfo != nullptr && clientInfo->bindImeType == type) {
|
||||
@ -234,8 +244,14 @@ void PerUserSession::OnImeDied(const sptr<IInputMethodCore> &remote, ImeType typ
|
||||
if (type == ImeType::IME && !isSwitching_.load()) {
|
||||
RestartIme();
|
||||
}
|
||||
} else {
|
||||
if (type == ImeType::IME && !isSwitching_.load() && currentImeInfo->bundleName == defaultImeInfo->name) {
|
||||
RestartIme();
|
||||
}
|
||||
}
|
||||
if (!isSwitching_.load()) {
|
||||
NotifyImeStopFinished();
|
||||
}
|
||||
NotifyImeStopFinished();
|
||||
}
|
||||
|
||||
int32_t PerUserSession::RemoveIme(const sptr<IInputMethodCore> &core, ImeType type)
|
||||
|
Loading…
Reference in New Issue
Block a user