mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-27 08:51:48 +00:00
commit
5539af757c
@ -294,7 +294,12 @@ namespace MiscServices {
|
|||||||
IMSA_HILOGE("%s %d\n", ErrorCode::ToString(ErrorCode::ERROR_USER_NOT_UNLOCKED), userId);
|
IMSA_HILOGE("%s %d\n", ErrorCode::ToString(ErrorCode::ERROR_USER_NOT_UNLOCKED), userId);
|
||||||
return ErrorCode::ERROR_USER_NOT_UNLOCKED;
|
return ErrorCode::ERROR_USER_NOT_UNLOCKED;
|
||||||
}
|
}
|
||||||
retMode = GetUserSession(userId)->GetDisplayMode();
|
PerUserSession *session = GetUserSession(userId);
|
||||||
|
if (session == nullptr) {
|
||||||
|
IMSA_HILOGI("InputMethodSystemAbility::getDisplayMode session is nullptr");
|
||||||
|
return ErrorCode::ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
retMode = session->GetDisplayMode();
|
||||||
return ErrorCode::NO_ERROR;
|
return ErrorCode::NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +319,12 @@ namespace MiscServices {
|
|||||||
return ErrorCode::ERROR_USER_NOT_UNLOCKED;
|
return ErrorCode::ERROR_USER_NOT_UNLOCKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ret = GetUserSession(userId)->GetKeyboardWindowHeight(retHeight);
|
PerUserSession *session = GetUserSession(userId);
|
||||||
|
if (session == nullptr) {
|
||||||
|
IMSA_HILOGI("InputMethodSystemAbility::getKeyboardWindowHeight session is nullptr");
|
||||||
|
return ErrorCode::ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
int32_t ret = session->GetKeyboardWindowHeight(retHeight);
|
||||||
if (ret != ErrorCode::NO_ERROR) {
|
if (ret != ErrorCode::NO_ERROR) {
|
||||||
IMSA_HILOGE("Failed to get keyboard window height. ErrorCode=%d\n", ret);
|
IMSA_HILOGE("Failed to get keyboard window height. ErrorCode=%d\n", ret);
|
||||||
}
|
}
|
||||||
@ -769,6 +779,12 @@ namespace MiscServices {
|
|||||||
InputMethodProperty *securityIme = setting->GetSecurityInputMethod();
|
InputMethodProperty *securityIme = setting->GetSecurityInputMethod();
|
||||||
InputMethodProperty *defaultIme = setting->GetCurrentInputMethod();
|
InputMethodProperty *defaultIme = setting->GetCurrentInputMethod();
|
||||||
GetUserSession(userId)->ResetIme(defaultIme, securityIme);
|
GetUserSession(userId)->ResetIme(defaultIme, securityIme);
|
||||||
|
PerUserSession *session = GetUserSession(userId);
|
||||||
|
if (session == nullptr) {
|
||||||
|
IMSA_HILOGI("InputMethodSystemAbility::OnPackageAdded session is nullptr");
|
||||||
|
return ErrorCode::ERROR_NULL_POINTER;
|
||||||
|
}
|
||||||
|
session->ResetIme(defaultIme, securityIme);
|
||||||
}
|
}
|
||||||
IMSA_HILOGI("End...\n");
|
IMSA_HILOGI("End...\n");
|
||||||
return 0;
|
return 0;
|
||||||
@ -817,7 +833,7 @@ namespace MiscServices {
|
|||||||
if (securityImeFlag) {
|
if (securityImeFlag) {
|
||||||
InputMethodProperty *securityIme = setting->GetSecurityInputMethod();
|
InputMethodProperty *securityIme = setting->GetSecurityInputMethod();
|
||||||
InputMethodProperty *defaultIme = setting->GetCurrentInputMethod();
|
InputMethodProperty *defaultIme = setting->GetCurrentInputMethod();
|
||||||
GetUserSession(userId)->ResetIme(defaultIme, securityIme);
|
session->ResetIme(defaultIme, securityIme);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -447,12 +447,12 @@ namespace MiscServices {
|
|||||||
|
|
||||||
IMSA_HILOGD("unbindInputMethodService...\n");
|
IMSA_HILOGD("unbindInputMethodService...\n");
|
||||||
|
|
||||||
IMSA_HILOGD("destroyWindowToken...\n");
|
IMSA_HILOGD("destroyWindowTaskId...\n");
|
||||||
int errorCode = ErrorCode::NO_ERROR;
|
int errorCode = ErrorCode::NO_ERROR;
|
||||||
int ret = Platform::Instance()->DestroyWindowToken(userId_, currentIme[index]->mPackageName);
|
int ret = Platform::Instance()->DestroyWindowToken(userId_, currentIme[index]->mPackageName);
|
||||||
inputMethodToken[index] = nullptr;
|
inputMethodToken[index] = nullptr;
|
||||||
if (ret != ErrorCode::NO_ERROR) {
|
if (ret != ErrorCode::NO_ERROR) {
|
||||||
IMSA_HILOGE("destroyWindowToken return : %{public}s [%{public}d]\n", ErrorCode::ToString(ret), userId_);
|
IMSA_HILOGE("destroyWindowTaskId return : %{public}s [%{public}d]\n", ErrorCode::ToString(ret), userId_);
|
||||||
errorCode = ErrorCode::ERROR_TOKEN_DESTROY_FAILED;
|
errorCode = ErrorCode::ERROR_TOKEN_DESTROY_FAILED;
|
||||||
}
|
}
|
||||||
sptr<IRemoteObject> b = imsCore[index]->AsObject();
|
sptr<IRemoteObject> b = imsCore[index]->AsObject();
|
||||||
|
Loading…
Reference in New Issue
Block a user