Signed-off-by: ht <hutao105@huawei.com>
This commit is contained in:
ht 2024-08-29 09:39:01 +00:00 committed by htt1997
parent 6f9440ee57
commit 26d8325d68
2 changed files with 6 additions and 5 deletions

View File

@ -173,7 +173,6 @@ void InputMethodController::RemoveDeathRecipient()
std::lock_guard<std::mutex> lock(abilityLock_);
if (abilityManager_ != nullptr && abilityManager_->AsObject() != nullptr && deathRecipient_ != nullptr) {
abilityManager_->AsObject()->RemoveDeathRecipient(deathRecipient_);
return;
}
deathRecipient_ = nullptr;
abilityManager_ = nullptr;
@ -357,7 +356,7 @@ int32_t InputMethodController::Close()
return ReleaseInput(clientInfo_.client);
}
void InputMethodController::Release()
void InputMethodController::Reset()
{
Close();
RemoveDeathRecipient();

View File

@ -767,6 +767,7 @@ public:
*/
int32_t FinishTextPreview();
/**
* @brief Query whether an process id current inputmethod.
*
* This function is used to query whether an process id is inputmethod.
@ -781,13 +782,14 @@ public:
IMF_API bool IsCurrentImeByPid(int32_t pid);
/**
* @brief Release resource.
* @brief Reset controller.
*
* This function is used to Release resource.
* This function is used to reset controller.
* Do not call this interface unless you know what you are doing
*
* @since 12
*/
IMF_API void Release();
IMF_API void Reset();
private:
InputMethodController();