mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 06:40:06 +00:00
!1517 动态变化属性时,如果涉及安全键盘切换,需要触发StartInput
Merge pull request !1517 from guojin31/master
This commit is contained in:
commit
0959ba8141
@ -688,6 +688,7 @@ int32_t InputMethodController::OnConfigurationChange(Configuration info)
|
||||
IMSA_HILOGD("not bound.");
|
||||
return ErrorCode::ERROR_CLIENT_NOT_BOUND;
|
||||
}
|
||||
bool oldSecurityFlag = textConfig_.inputAttribute.GetSecurityFlag();
|
||||
InputAttribute attribute;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(textConfigLock_);
|
||||
@ -701,6 +702,15 @@ int32_t InputMethodController::OnConfigurationChange(Configuration info)
|
||||
}
|
||||
IMSA_HILOGI("IMC enterKeyType: %{public}d, textInputType: %{public}d.", attribute.enterKeyType,
|
||||
attribute.inputPattern);
|
||||
if (oldSecurityFlag != attribute.GetSecurityFlag()) {
|
||||
GetTextConfig(clientInfo_.config);
|
||||
sptr<IRemoteObject> agent = nullptr;
|
||||
int32_t ret = StartInput(clientInfo_, agent);
|
||||
if (ret != ErrorCode::NO_ERROR) {
|
||||
return ret;
|
||||
}
|
||||
OnInputReady(agent);
|
||||
}
|
||||
auto agent = GetAgent();
|
||||
if (agent == nullptr) {
|
||||
IMSA_HILOGE("agent is nullptr!");
|
||||
|
@ -260,11 +260,11 @@ void PerUserSession::OnImeDied(const sptr<IInputMethodCore> &remote, ImeType typ
|
||||
auto imeData = GetImeData(type);
|
||||
auto ime = InputTypeManager::GetInstance().GetCurrentIme();
|
||||
if (ime.bundleName == imeData->ime.first) {
|
||||
InputTypeManager::GetInstance().Set(false);
|
||||
}
|
||||
if (imeData != nullptr && imeData->imeStatus == ImeStatus::EXITING) {
|
||||
RemoveImeData(type, true);
|
||||
NotifyImeStopFinished();
|
||||
InputTypeManager::GetInstance().Set(false);
|
||||
IMSA_HILOGI("%{public}d not current imeData.", type);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user