modify switch

Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
zhaolinglan 2023-05-20 17:55:37 +08:00
parent 05fb57d2d8
commit 858db66da2

View File

@ -361,7 +361,6 @@ void InputMethodSystemAbility::PushToSwitchQueue(const SwitchInfo &info)
void InputMethodSystemAbility::PopSwitchQueue()
{
std::lock_guard<std::mutex> lock(switchQueueMutex_);
auto info = switchQueue_.front();
switchQueue_.pop();
switchCV_.notify_all();
}
@ -369,7 +368,6 @@ void InputMethodSystemAbility::PopSwitchQueue()
bool InputMethodSystemAbility::CheckReadyToSwitch(const SwitchInfo &info)
{
std::lock_guard<std::mutex> lock(switchQueueMutex_);
auto frontInfo = switchQueue_.front();
return info == switchQueue_.front();
}