解决输入法偶尔白屏问题

Signed-off-by: zhouyongfei <zhouyongfei@huawei.com>
This commit is contained in:
zhouyongfei
2021-10-20 14:56:20 +08:00
parent 397e0dc25a
commit b2a71d0099
3 changed files with 14 additions and 10 deletions
@@ -38,6 +38,8 @@ namespace MiscServices {
InputMethodAbility::~InputMethodAbility()
{
IMSA_HILOGI("InputMethodAbility::~InputMethodAbility");
instance_ = nullptr;
if (msgHandler != nullptr) {
delete msgHandler;
msgHandler = nullptr;
+3 -3
View File
@@ -329,8 +329,8 @@ namespace MiscServices {
IMSA_HILOGI("PerUserSession::AddClient");
ClientInfo *clientInfo = GetClientInfo(inputClient);
if (clientInfo != nullptr) {
IMSA_HILOGE("PerUserSession::AddClient clientInfo is not nullptr");
return ErrorCode::ERROR_CLIENT_DUPLICATED;
IMSA_HILOGE("PerUserSession::AddClient clientInfo is exist, not need add.");
return ErrorCode::NO_ERROR;
}
sptr<IRemoteObject> obj = inputClient->AsObject();
@@ -1296,7 +1296,6 @@ namespace MiscServices {
}
if (imsCore[index] != nullptr) {
IMSA_HILOGI("PerUserSession::onSetInputMethodCore End... Input Method Service has already been started ! ");
return;
}
imsCore[index] = core;
int ret = StartInputMethod(index);
@@ -1314,6 +1313,7 @@ namespace MiscServices {
IMSA_HILOGI("PerUserSession::OnStartInput End...[%{public}d]\n", userId_);
}
}
IMSA_HILOGI("PerUserSession::OnStartInput End. currentClient is nullptr");
}
/*! Stop input. Called by an input client.
+9 -7
View File
@@ -117,13 +117,15 @@ namespace MiscServices {
return ErrorCode::NO_ERROR;
}
/*! Remove an input method engine.
\n It's called when a package is removed from the system.
\param packageName the package name of installed package.
\param[out] isSecurityIme check if the removed ime is a security ime.
\return ErrorCode::NO_ERROR The removed package is an IME package, and is removed from the input method management system
\return ErrorCode::ERROR_NOT_IME_PACKAGE The removed package is not an IME package.
*/
/**
* Remove an input method engine.
* It's called when a package is removed from the system.
* @param packageName the package name of installed package.
* @param isSecurityIme check if the removed ime is a security ime.
* @return ErrorCode::NO_ERROR The removed package is an IME package,
* and is removed from the input method management system
* ErrorCode::ERROR_NOT_IME_PACKAGE The removed package is not an IME package.
*/
int PerUserSetting::OnPackageRemoved(std::u16string& packageName, bool isSecurityIme)
{
if (isSecurityIme) {