Signed-off-by: ma-shaoyin <mashaoyin1@huawei.com>

Changes to be committed:
This commit is contained in:
ma-shaoyin 2023-12-30 15:53:32 +08:00
parent a61318e989
commit 3db7f5dff4
2 changed files with 5 additions and 1 deletions

View File

@ -69,7 +69,7 @@ void EnableImeDataParser::OnUserChanged(const int32_t targetUserId)
currrentUserId_ = targetUserId;
if (GetEnableData(ENABLE_IME, enableList_[std::string(ENABLE_IME)], targetUserId) != ErrorCode::NO_ERROR
|| GetEnableData(ENABLE_KEYBOARD, enableList_[std::string(ENABLE_KEYBOARD)], targetUserId)
!= ErrorCode::NO_ERROR) {
!= ErrorCode::NO_ERROR) {
IMSA_HILOGE("get enable list failed.");
return;
}

View File

@ -715,6 +715,10 @@ int32_t ImeInfoInquirer::GetDefaultInputMethod(const int32_t userId, std::shared
std::shared_ptr<ImeInfo> ImeInfoInquirer::GetDefaultImeInfo(int32_t userId)
{
auto defaultIme = GetDefaultImeCfgProp();
if (defaultIme == nullptr) {
IMSA_HILOGE("defaultIme is nullptr.");
return nullptr;
}
auto info = GetImeInfoFromBundleMgr(userId, defaultIme->name, "");
if (info == nullptr) {
IMSA_HILOGE("userId: %{public}d, bundleName: %{public}s getImeInfoFromBundleMgr failed", userId,