mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 06:40:06 +00:00
commit
07c35149bb
@ -92,23 +92,15 @@ bool InputTypeManager::IsStarted()
|
||||
|
||||
bool InputTypeManager::IsSecurityImeStarted()
|
||||
{
|
||||
if (!IsStarted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(typesLock_);
|
||||
return inputTypes_.find(InputType::SECURITY_INPUT) != inputTypes_.end() &&
|
||||
std::lock_guard<std::mutex> lock(stateLock_);
|
||||
return isStarted_ && inputTypes_.find(InputType::SECURITY_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::SECURITY_INPUT] == currentTypeIme_;
|
||||
}
|
||||
|
||||
bool InputTypeManager::IsCameraImeStarted()
|
||||
{
|
||||
if (!IsStarted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(typesLock_);
|
||||
return inputTypes_.find(InputType::CAMERA_INPUT) != inputTypes_.end() &&
|
||||
std::lock_guard<std::mutex> lock(stateLock_);
|
||||
return isStarted_ && inputTypes_.find(InputType::CAMERA_INPUT) != inputTypes_.end() &&
|
||||
inputTypes_[InputType::CAMERA_INPUT] == currentTypeIme_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user