diff --git a/frameworks/inputmethod_ability/src/input_method_ability.cpp b/frameworks/inputmethod_ability/src/input_method_ability.cpp index 3d7c395..c14fd5f 100644 --- a/frameworks/inputmethod_ability/src/input_method_ability.cpp +++ b/frameworks/inputmethod_ability/src/input_method_ability.cpp @@ -38,6 +38,8 @@ namespace MiscServices { InputMethodAbility::~InputMethodAbility() { + IMSA_HILOGI("InputMethodAbility::~InputMethodAbility"); + instance_ = nullptr; if (msgHandler != nullptr) { delete msgHandler; msgHandler = nullptr; diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index 7884b3c..e7c7de9 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -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 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. diff --git a/services/src/peruser_setting.cpp b/services/src/peruser_setting.cpp index 6b241c3..5dcdf45 100644 --- a/services/src/peruser_setting.cpp +++ b/services/src/peruser_setting.cpp @@ -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) {