From ca13e7a3de4c5fb0fdb5ab2764cba943baf81ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=BB=BA=E8=B4=9E?= Date: Thu, 23 May 2024 08:28:39 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=AD=E8=A8=80=E4=B8=BA?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E6=97=B6=EF=BC=8C=E6=89=8B=E5=8A=A8=E6=90=9C?= =?UTF-8?q?=E7=BD=91=E7=95=8C=E9=9D=A2=E8=BF=90=E8=90=A5=E5=95=86=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=BB=8D=E6=98=BE=E7=A4=BA=E4=B8=AD=E6=96=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 罗建贞 --- services/network_search/src/network_selection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/network_search/src/network_selection.cpp b/services/network_search/src/network_selection.cpp index efc17b01..968db7a3 100755 --- a/services/network_search/src/network_selection.cpp +++ b/services/network_search/src/network_selection.cpp @@ -19,6 +19,7 @@ #include "telephony_errors.h" #include "telephony_log_wrapper.h" #include "telephony_ext_wrapper.h" +#include "operator_name_utils.h" namespace OHOS { namespace Telephony { @@ -186,9 +187,10 @@ bool NetworkSelection::AvailNetworkResult( std::vector networkInformation; if (availableSize > 0) { for (auto &availableNetworkInfoItem : availableNetworkInfo) { - std::string longName = availableNetworkInfoItem.longName; - std::string shortName = availableNetworkInfoItem.shortName; std::string numeric = availableNetworkInfoItem.numeric; + std::string customName = OperatorNameUtils::GetInstance().GetCustomName(numeric); + std::string longName = customName.empty()? availableNetworkInfoItem.longName : customName; + std::string shortName = availableNetworkInfoItem.shortName; int32_t status = availableNetworkInfoItem.status; int32_t rat = availableNetworkInfoItem.rat; NetworkInformation networkStateItem;