!2455 增加控制项,将网络下发的运营商名称作为最高优先级显示

Merge pull request !2455 from wangzhan/master
This commit is contained in:
openharmony_ci 2024-11-15 10:05:33 +00:00 committed by Gitee
commit af2dbfec3d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 10 additions and 2 deletions

View File

@ -39,7 +39,7 @@
namespace OHOS {
namespace Telephony {
constexpr int DEFAULT_ERROR = ERROR_SERVICE_UNAVAILABLE;
constexpr int BUF_SIZE = 32;
constexpr int BUF_SIZE = 192;
constexpr int CALLBACK_VALUES_SIZE = 1;
constexpr int WAIT_TIME_SECOND = 60 * 3;
constexpr int WAIT_NETWORK_MANUAL_SEARCH_TIME_SECOND = 60 * 5;

View File

@ -127,6 +127,10 @@ constexpr const char *KEY_VOICE_MAIL_TAG_STRING = "voice_mail_tag_string";
* Indicates whether to edit voice mail information to sim card.
*/
constexpr const char *KEY_VOICE_MAIL_EDIT_NOT_TO_SIM_BOOL = "voice_mail_edit_not_to_sim_bool";
/**
* Indicates whether the carrier name delivered by network has the highest priority.
*/
constexpr const char *KEY_NET_FIRST_PRI_CUST_BOOL = "net_fisrt_pri_cust_bool";
constexpr const char *KEY_NR_MODE_SUPPORTED_INT = "nr_mode_supported_int";

View File

@ -98,6 +98,7 @@ private:
const std::vector<std::string> ctDomesticMccMnc_ { "46021", "46060" };
const std::vector<std::string> cbDomesticnMccMnc_ { "46032", "46051" };
bool enableCust_ = false;
bool netPriCust_ = false;
std::string spnCust_ = "";
int32_t displayConditionCust_ = SPN_INVALID;
std::vector<std::shared_ptr<PlmnNetworkName>> pnnCust_;

View File

@ -404,7 +404,7 @@ std::string OperatorName::GetPlmn(const sptr<NetworkState> &networkState, bool l
if (plmn.empty()) {
plmn = GetEons(numeric, lac, longNameRequired);
}
if (plmn.empty()) {
if (plmn.empty() || netPriCust_) {
plmn = networkState->GetLongOperatorName();
}
TELEPHONY_LOGD(
@ -679,6 +679,9 @@ void OperatorName::UpdateOperatorConfig()
if (operatorConfig.stringArrayValue.find(KEY_OPL_CUST_STRING_ARRAY) != operatorConfig.stringArrayValue.end()) {
UpdateOplCust(operatorConfig.stringArrayValue[KEY_OPL_CUST_STRING_ARRAY]);
}
if (operatorConfig.boolValue.find(KEY_NET_FIRST_PRI_CUST_BOOL) != operatorConfig.boolValue.end()) {
netPriCust_ = operatorConfig.boolValue[KEY_NET_FIRST_PRI_CUST_BOOL];
}
}
void OperatorName::UpdatePnnCust(const std::vector<std::string> &pnnCust)