mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2025-03-07 01:07:18 +00:00
fix: fix circle deps between i18n and coreservice
Signed-off-by: liujiandong <liujiandong1@huawei.com>
This commit is contained in:
parent
52e1869a98
commit
bf91569f91
@ -37,6 +37,7 @@ inline constexpr const char *DEFAULT_PREFERRED_NETWORK_TYPE = "5"; // CORE_NETWO
|
||||
inline constexpr const char *TEL_PREFERRED_NETWORK_TYPE = "const.telephony.preferredNetworkType";
|
||||
inline constexpr const char *DEFAULT_OPERATOR_KEY = "";
|
||||
inline constexpr const char *OPKEY_PROP_PREFIX = "persist.telephony.opkey";
|
||||
inline constexpr const char *COUNTRY_CODE_KEY = "telephony.sim.countryCode";
|
||||
|
||||
template<typename T>
|
||||
inline T GetMaxSlotCount()
|
||||
|
@ -12,3 +12,4 @@
|
||||
# limitations under the License.
|
||||
|
||||
persist.telephony.="radio:radio:775"
|
||||
telephony.="radio:radio:775"
|
@ -93,6 +93,7 @@ protected:
|
||||
virtual void OnAllFilesFetched() = 0;
|
||||
bool LockQueriedOrNot();
|
||||
void UpdateSPN(const std::string spn);
|
||||
void SaveCountryCode();
|
||||
std::shared_ptr<Telephony::ITelRilManager> telRilManager_ = nullptr;
|
||||
std::shared_ptr<IccFileController> fileController_ = nullptr;
|
||||
std::shared_ptr<SimStateManager> stateManager_ = nullptr;
|
||||
|
@ -539,5 +539,12 @@ void IccFile::UnInit()
|
||||
}
|
||||
ClearData();
|
||||
}
|
||||
|
||||
void IccFile::SaveCountryCode()
|
||||
{
|
||||
std::string countryCode = ObtainIsoCountryCode();
|
||||
std::string key = COUNTRY_CODE_KEY + std::to_string(slotId_);
|
||||
SetParameter(key.c_str(), countryCode.c_str());
|
||||
}
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
@ -134,6 +134,7 @@ bool IsimFile::ProcessGetImsiDone(const AppExecFwk::InnerEvent::Pointer &event)
|
||||
if (sharedObject != nullptr) {
|
||||
imsi_ = *sharedObject;
|
||||
TELEPHONY_LOGI("IsimFile::ProcessEvent MSG_SIM_OBTAIN_IMSI_DONE");
|
||||
SaveCountryCode();
|
||||
if (!imsi_.empty()) {
|
||||
imsiReadyObser_->NotifyObserver(RadioEvent::RADIO_IMSI_LOADED_READY);
|
||||
}
|
||||
|
@ -191,6 +191,7 @@ bool RuimFile::ProcessGetImsiDone(const AppExecFwk::InnerEvent::Pointer &event)
|
||||
if (sharedObject != nullptr) {
|
||||
imsi_ = *sharedObject;
|
||||
TELEPHONY_LOGI("RuimFile::ProcessEvent MSG_SIM_OBTAIN_IMSI_DONE");
|
||||
SaveCountryCode();
|
||||
if (!imsi_.empty()) {
|
||||
imsiReadyObser_->NotifyObserver(RadioEvent::RADIO_IMSI_LOADED_READY);
|
||||
}
|
||||
|
@ -736,7 +736,7 @@ bool SimFile::ProcessObtainIMSIDone(const AppExecFwk::InnerEvent::Pointer &event
|
||||
if (sharedObject != nullptr) {
|
||||
imsi_ = *sharedObject;
|
||||
TELEPHONY_LOGI("SimFile::ProcessEvent IMSI received success");
|
||||
std::string iso = ObtainIsoCountryCode();
|
||||
SaveCountryCode();
|
||||
TELEPHONY_LOGI("SimFile::ObtainIsoCountryCode result success");
|
||||
if (!imsi_.empty()) {
|
||||
imsiReadyObser_->NotifyObserver(RadioEvent::RADIO_IMSI_LOADED_READY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user