Signed-off-by: lovechinamo <wangdongqi2@huawei.com>

Changes to be committed:
This commit is contained in:
lovechinamo
2022-05-05 14:28:41 +08:00
parent 83d6701f1a
commit baaafe21aa
@@ -777,7 +777,15 @@ namespace MiscServices {
}
if (securityImeFlag) {
InputMethodProperty *securityIme = setting->GetSecurityInputMethod();
if (securityIme == nullptr) {
IMSA_HILOGI("InputMethodSystemAbility::OnPackageAdded securityIme is nullptr");
return ErrorCode::ERROR_NULL_POINTER;
}
InputMethodProperty *defaultIme = setting->GetCurrentInputMethod();
if (defaultIme == nullptr) {
IMSA_HILOGI("InputMethodSystemAbility::OnPackageAdded defaultIme is nullptr");
return ErrorCode::ERROR_NULL_POINTER;
}
GetUserSession(userId)->ResetIme(defaultIme, securityIme);
PerUserSession *session = GetUserSession(userId);
if (session == nullptr) {