mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 06:40:06 +00:00
Signed-off-by: wangdongqi <wangdongqi2@huawei.com>
Changes to be committed:
This commit is contained in:
parent
07c35149bb
commit
a0311739fe
@ -92,23 +92,35 @@ bool InputTypeManager::IsStarted()
|
||||
|
||||
bool InputTypeManager::IsSecurityImeStarted()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(stateLock_);
|
||||
return isStarted_ && inputTypes_.find(InputType::SECURITY_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::SECURITY_INPUT] == currentTypeIme_;
|
||||
if (!IsStarted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(typesLock_);
|
||||
return inputTypes_.find(InputType::SECURITY_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::SECURITY_INPUT] == GetCurrentIme();
|
||||
}
|
||||
|
||||
bool InputTypeManager::IsCameraImeStarted()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(stateLock_);
|
||||
return isStarted_ && inputTypes_.find(InputType::CAMERA_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::CAMERA_INPUT] == currentTypeIme_;
|
||||
if (!IsStarted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(typesLock_);
|
||||
return inputTypes_.find(InputType::CAMERA_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::CAMERA_INPUT] == GetCurrentIme();
|
||||
}
|
||||
|
||||
bool InputTypeManager::IsVoiceImeStarted()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(stateLock_);
|
||||
return isStarted_ && inputTypes_.find(InputType::VOICE_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::VOICE_INPUT] == currentTypeIme_;
|
||||
if (!IsStarted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(typesLock_);
|
||||
return inputTypes_.find(InputType::VOICE_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::VOICE_INPUT] == GetCurrentIme();
|
||||
}
|
||||
|
||||
InputType InputTypeManager::GetCurrentInputType()
|
||||
|
Loading…
Reference in New Issue
Block a user