mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-23 16:09:48 +00:00
命名的修改
Signed-off-by: 刘峻朋 <liujunpeng20@huawei.com>
This commit is contained in:
parent
14df0b9f0d
commit
3e60efd5f5
@ -69,10 +69,10 @@ public:
|
||||
bool responseSimUnlockPinReady_ = false;
|
||||
std::mutex ctx_;
|
||||
std::mutex stx_;
|
||||
std::mutex rtx_;
|
||||
std::mutex UnlockPin_ctx_;
|
||||
std::condition_variable cv_;
|
||||
std::condition_variable sv_;
|
||||
std::condition_variable rv_;
|
||||
std::condition_variable UnlockPin_cv_;
|
||||
|
||||
private:
|
||||
void RequestUnlock(UnlockCmd type);
|
||||
|
@ -175,11 +175,11 @@ void SimStateManager::SyncSimMatchResponse()
|
||||
|
||||
void SimStateManager::SyncSimUnlockPinResponse()
|
||||
{
|
||||
std::unique_lock<std::mutex> lck(rtx_);
|
||||
std::unique_lock<std::mutex> lck(UnlockPin_ctx_);
|
||||
responseSimUnlockPinReady_ = true;
|
||||
TELEPHONY_LOGI(
|
||||
"SimStateManager::SyncSimUnlockPinResponse(), responsSimUnlockPinReady = %{public}d", responseSimUnlockPinReady_);
|
||||
rv_.notify_one();
|
||||
UnlockPin_cv_.notify_one();
|
||||
}
|
||||
|
||||
int32_t SimStateManager::UnlockPin(int32_t slotId, const std::string &pin, LockStatusResponse &response)
|
||||
@ -188,13 +188,13 @@ int32_t SimStateManager::UnlockPin(int32_t slotId, const std::string &pin, LockS
|
||||
TELEPHONY_LOGE("simStateHandle_ is nullptr");
|
||||
return TELEPHONY_ERR_LOCAL_PTR_NULL;
|
||||
}
|
||||
std::unique_lock<std::mutex> lck(rtx_);
|
||||
std::unique_lock<std::mutex> lck(UnlockPin_ctx_);
|
||||
TELEPHONY_LOGD("SimStateManager::UnlockPin slotId = %{public}d", slotId);
|
||||
responseSimUnlockPinReady_ = false;
|
||||
simStateHandle_->UnlockPin(slotId, pin);
|
||||
while (!responseSimUnlockPinReady_) {
|
||||
TELEPHONY_LOGI("UnlockPin::wait(), response = false");
|
||||
if (rv_.wait_for(lck, std::chrono::seconds(WAIT_TIME_LONG_SECOND)) == std::cv_status::timeout) {
|
||||
if (UnlockPin_cv_.wait_for(lck, std::chrono::seconds(WAIT_TIME_LONG_SECOND)) == std::cv_status::timeout) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user