mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-27 02:00:45 +00:00
commit
df99d97527
@ -402,6 +402,9 @@ void MultiSimController::SortCache()
|
||||
sortCache[localCacheInfo_[j].slotIndex] = localCacheInfo_[j];
|
||||
}
|
||||
localCacheInfo_ = sortCache;
|
||||
count = localCacheInfo_.size();
|
||||
TELEPHONY_LOGI("localCacheInfo_.size() = %{public}lu, maxCount_ = %{public}d",
|
||||
static_cast<unsigned long>(count), maxCount_);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -648,7 +651,9 @@ int32_t MultiSimController::GetDefaultVoiceSlotId()
|
||||
}
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (localCacheInfo_.size() != static_cast<size_t>(maxCount_)) {
|
||||
TELEPHONY_LOGE("localCacheInfo_ is empty or invalid");
|
||||
size_t count = localCacheInfo_.size();
|
||||
TELEPHONY_LOGE("localCacheInfo_.size() = %{public}lu, maxCount_ = %{public}d",
|
||||
static_cast<unsigned long>(count), maxCount_);
|
||||
return INVALID_VALUE;
|
||||
}
|
||||
int32_t i = DEFAULT_SIM_SLOT_ID;
|
||||
@ -709,7 +714,9 @@ int32_t MultiSimController::SetDefaultVoiceSlotId(int32_t slotId)
|
||||
int32_t i = DEFAULT_SIM_SLOT_ID;
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (localCacheInfo_.size() != static_cast<size_t>(maxCount_)) {
|
||||
TELEPHONY_LOGE("no sim card");
|
||||
size_t count = localCacheInfo_.size();
|
||||
TELEPHONY_LOGE("localCacheInfo_.size() = %{public}lu, maxCount_ = %{public}d",
|
||||
static_cast<unsigned long>(count), maxCount_);
|
||||
return TELEPHONY_ERR_NO_SIM_CARD;
|
||||
}
|
||||
for (; i < maxCount_; i++) { // save to cache
|
||||
@ -744,7 +751,9 @@ int32_t MultiSimController::GetDefaultSmsSlotId()
|
||||
}
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (localCacheInfo_.size() != static_cast<size_t>(maxCount_)) {
|
||||
TELEPHONY_LOGE("localCacheInfo_ is empty or invalid");
|
||||
size_t count = localCacheInfo_.size();
|
||||
TELEPHONY_LOGE("localCacheInfo_.size() = %{public}lu, maxCount_ = %{public}d",
|
||||
static_cast<unsigned long>(count), maxCount_);
|
||||
return INVALID_VALUE;
|
||||
}
|
||||
int32_t i = DEFAULT_SIM_SLOT_ID;
|
||||
@ -777,7 +786,9 @@ int32_t MultiSimController::SetDefaultSmsSlotId(int32_t slotId)
|
||||
int32_t i = DEFAULT_SIM_SLOT_ID;
|
||||
std::unique_lock<std::mutex> lock(mutex_);
|
||||
if (localCacheInfo_.size() != static_cast<size_t>(maxCount_)) {
|
||||
TELEPHONY_LOGE("localCacheInfo_ is empty");
|
||||
size_t count = localCacheInfo_.size();
|
||||
TELEPHONY_LOGE("localCacheInfo_.size() = %{public}lu, maxCount_ = %{public}d",
|
||||
static_cast<unsigned long>(count), maxCount_);
|
||||
return TELEPHONY_ERR_NO_SIM_CARD;
|
||||
}
|
||||
for (; i < maxCount_; i++) { // save to cache
|
||||
|
Loading…
Reference in New Issue
Block a user