mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-27 08:51:48 +00:00
commit
663fe38220
@ -106,6 +106,7 @@ public:
|
||||
bool CheckSecurityMode();
|
||||
bool IsWmsReady();
|
||||
int32_t OnConnectSystemCmd(const sptr<IRemoteObject> &channel, sptr<IRemoteObject> &agent);
|
||||
int32_t RemoveCurrentClient();
|
||||
|
||||
private:
|
||||
struct ResetManager {
|
||||
|
@ -200,6 +200,11 @@ void InputMethodSystemAbility::HandleWmsReady(int32_t userId)
|
||||
if (userId != userId_) {
|
||||
HandleUserChanged(userId);
|
||||
}
|
||||
//clear client
|
||||
auto ret = userSession_->RemoveCurrentClient();
|
||||
if (ret != ErrorCode::NO_ERROR) {
|
||||
IMSA_HILOGE("RemoveCurrentClient failed");
|
||||
}
|
||||
RestartCurrentIme();
|
||||
}
|
||||
|
||||
|
@ -1277,5 +1277,15 @@ void PerUserSession::NotifyImeStopFinished()
|
||||
isSwitching_.store(false);
|
||||
imeStopCv_.notify_one();
|
||||
}
|
||||
|
||||
int32_t PerUserSession::RemoveCurrentClient()
|
||||
{
|
||||
auto currentClient = GetCurrentClient();
|
||||
if (currentClient == nullptr) {
|
||||
IMSA_HILOGE("currentClient is null");
|
||||
return ErrorCode::ERROR_CLIENT_NULL_POINTER;
|
||||
}
|
||||
return RemoveClient(currentClient, false);
|
||||
}
|
||||
} // namespace MiscServices
|
||||
} // namespace OHOS
|
||||
|
Loading…
Reference in New Issue
Block a user