• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "network_search_state.h"
17 
18 #include <securec.h>
19 
20 #include "network_search_manager.h"
21 #include "network_search_notify.h"
22 #include "telephony_errors.h"
23 #include "telephony_log_wrapper.h"
24 #include "telephony_ext_wrapper.h"
25 
26 namespace OHOS {
27 namespace Telephony {
NetworkSearchState(const std::weak_ptr<NetworkSearchManager> & networkSearchManager,int32_t slotId)28 NetworkSearchState::NetworkSearchState(const std::weak_ptr<NetworkSearchManager> &networkSearchManager, int32_t slotId)
29     : networkSearchManager_(networkSearchManager), slotId_(slotId)
30 {}
31 
Init()32 bool NetworkSearchState::Init()
33 {
34     TELEPHONY_LOGI("NetworkSearchState Init slotId:%{public}d", slotId_);
35     networkStateOld_ = std::make_unique<NetworkState>();
36     if (networkStateOld_ == nullptr) {
37         TELEPHONY_LOGE("failed to create old networkState slotId:%{public}d", slotId_);
38         return false;
39     }
40     networkState_ = std::make_unique<NetworkState>();
41     if (networkState_ == nullptr) {
42         TELEPHONY_LOGE("failed to create new networkState slotId:%{public}d", slotId_);
43         return false;
44     }
45     imsServiceStatus_ = std::make_unique<ImsServiceStatus>();
46     if (imsServiceStatus_ == nullptr) {
47         TELEPHONY_LOGE("failed to create new imsServiceStatus_ slotId:%{public}d", slotId_);
48         return false;
49     }
50     return true;
51 }
52 
SetOperatorInfo(const std::string & longName,const std::string & shortName,const std::string & numeric,DomainType domainType)53 void NetworkSearchState::SetOperatorInfo(
54     const std::string &longName, const std::string &shortName, const std::string &numeric, DomainType domainType)
55 {
56     std::lock_guard<std::mutex> lock(mutex_);
57     if (networkState_ != nullptr) {
58         networkState_->SetOperatorInfo(longName, shortName, numeric, domainType);
59         TELEPHONY_LOGD("NetworkSearchState::SetOperatorInfo longName : %{public}s, shortName : %{public}s, numeric : "
60                        "%{public}s, slotId:%{public}d",
61             networkState_->GetLongOperatorName().c_str(), networkState_->GetShortOperatorName().c_str(),
62             networkState_->GetPlmnNumeric().c_str(), slotId_);
63     }
64 }
65 
SetEmergency(bool isEmergency)66 void NetworkSearchState::SetEmergency(bool isEmergency)
67 {
68     std::lock_guard<std::mutex> lock(mutex_);
69     if (networkState_ != nullptr) {
70         networkState_->SetEmergency(isEmergency);
71     }
72 }
73 
IsEmergency()74 bool NetworkSearchState::IsEmergency()
75 {
76     std::lock_guard<std::mutex> lock(mutex_);
77     if (networkState_ != nullptr) {
78         return networkState_->IsEmergency();
79     }
80     return false;
81 }
82 
SetNetworkType(RadioTech tech,DomainType domainType)83 void NetworkSearchState::SetNetworkType(RadioTech tech, DomainType domainType)
84 {
85     std::lock_guard<std::mutex> lock(mutex_);
86     if (networkState_ != nullptr) {
87         networkState_->SetNetworkType(tech, domainType);
88     }
89 }
90 
SetNetworkState(RegServiceState state,DomainType domainType)91 void NetworkSearchState::SetNetworkState(RegServiceState state, DomainType domainType)
92 {
93     std::lock_guard<std::mutex> lock(mutex_);
94     if (networkState_ != nullptr) {
95         networkState_->SetNetworkState(state, domainType);
96     }
97 }
98 
SetNetworkStateToRoaming(RoamingType roamingType,DomainType domainType)99 void NetworkSearchState::SetNetworkStateToRoaming(RoamingType roamingType, DomainType domainType)
100 {
101     std::lock_guard<std::mutex> lock(mutex_);
102     if (networkState_ != nullptr) {
103         networkState_->SetRoaming(roamingType, domainType);
104     }
105 }
106 
GetImsStatus(ImsServiceType imsSrvType,ImsRegInfo & info)107 int32_t NetworkSearchState::GetImsStatus(ImsServiceType imsSrvType, ImsRegInfo &info)
108 {
109     std::lock_guard<std::mutex> lock(imsMutex_);
110     if (imsServiceStatus_ == nullptr) {
111         TELEPHONY_LOGE("imsServiceStatus_ is null!");
112         return TELEPHONY_ERR_LOCAL_PTR_NULL;
113     }
114     bool isRegister = false;
115     switch (imsSrvType) {
116         case ImsServiceType::TYPE_VOICE:
117             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsVoice;
118             break;
119         case ImsServiceType::TYPE_VIDEO:
120             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsVideo;
121             break;
122         case ImsServiceType::TYPE_UT:
123             isRegister = imsServiceStatus_->supportImsUt;
124             break;
125         case ImsServiceType::TYPE_SMS:
126             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsSms;
127             break;
128         default:
129             TELEPHONY_LOGE("%{public}d unkunow ims service type!", imsSrvType);
130             return TELEPHONY_ERR_ARGUMENT_INVALID;
131     }
132     info.imsRegState = isRegister ? ImsRegState::IMS_REGISTERED : ImsRegState::IMS_UNREGISTERED;
133     info.imsRegTech = imsServiceStatus_->imsRegTech;
134     return TELEPHONY_SUCCESS;
135 }
136 
SetImsStatus(bool imsRegStatus)137 void NetworkSearchState::SetImsStatus(bool imsRegStatus)
138 {
139     std::lock_guard<std::mutex> lock(imsMutex_);
140     bool imsRegStateChanged = imsRegStatus_ != imsRegStatus;
141     if (!imsRegStateChanged) {
142         return;
143     }
144     imsRegStatus_ = imsRegStatus;
145 
146     ImsRegInfo imsRegInfo;
147     bool isRegister = false;
148     imsRegInfo.imsRegTech = imsServiceStatus_->imsRegTech;
149     if (imsServiceStatus_->supportImsVoice) {
150         isRegister = imsRegStatus_ && imsServiceStatus_->supportImsVoice;
151         imsRegInfo.imsRegState = isRegister ? ImsRegState::IMS_REGISTERED : ImsRegState::IMS_UNREGISTERED;
152         NotifyImsStateChange(ImsServiceType::TYPE_VOICE, imsRegInfo);
153     }
154     if (imsServiceStatus_->supportImsVideo) {
155         isRegister = imsRegStatus_ && imsServiceStatus_->supportImsVideo;
156         imsRegInfo.imsRegState = isRegister ? ImsRegState::IMS_REGISTERED : ImsRegState::IMS_UNREGISTERED;
157         NotifyImsStateChange(ImsServiceType::TYPE_VIDEO, imsRegInfo);
158     }
159     if (imsServiceStatus_->supportImsUt) {
160         isRegister = imsRegStatus_ && imsServiceStatus_->supportImsUt;
161         imsRegInfo.imsRegState = isRegister ? ImsRegState::IMS_REGISTERED : ImsRegState::IMS_UNREGISTERED;
162         NotifyImsStateChange(ImsServiceType::TYPE_UT, imsRegInfo);
163     }
164     if (imsServiceStatus_->supportImsSms) {
165         isRegister = imsRegStatus_ && imsServiceStatus_->supportImsSms;
166         imsRegInfo.imsRegState = isRegister ? ImsRegState::IMS_REGISTERED : ImsRegState::IMS_UNREGISTERED;
167         NotifyImsStateChange(ImsServiceType::TYPE_SMS, imsRegInfo);
168     }
169 }
170 
SetImsServiceStatus(const ImsServiceStatus & imsServiceStatus)171 void NetworkSearchState::SetImsServiceStatus(const ImsServiceStatus &imsServiceStatus)
172 {
173     std::lock_guard<std::mutex> lock(imsMutex_);
174     bool voiceChanged = imsServiceStatus_->supportImsVoice != imsServiceStatus.supportImsVoice;
175     bool videoChanged = imsServiceStatus_->supportImsVideo != imsServiceStatus.supportImsVideo;
176     bool utChanged = imsServiceStatus_->supportImsUt != imsServiceStatus.supportImsUt;
177     bool smsChanged = imsServiceStatus_->supportImsSms != imsServiceStatus.supportImsSms;
178     bool radioTechChanged = imsServiceStatus_->imsRegTech != imsServiceStatus.imsRegTech;
179     if (!voiceChanged && !videoChanged && !utChanged && !smsChanged && !radioTechChanged) {
180         TELEPHONY_LOGD("Nothing need update for slotId:%{public}d", slotId_);
181         return;
182     }
183 
184     *imsServiceStatus_ = imsServiceStatus;
185 
186     if (!imsRegStatus_) {
187         TELEPHONY_LOGI("Nothing need to do since IMS haven't register");
188         return;
189     }
190     ImsRegInfo imsRegInfo;
191     imsRegInfo.imsRegTech = imsServiceStatus.imsRegTech;
192     if (voiceChanged || (radioTechChanged && imsServiceStatus_->supportImsVoice)) {
193         imsRegInfo.imsRegState = GetImsRegState(ImsServiceType::TYPE_VOICE);
194         NotifyImsStateChange(ImsServiceType::TYPE_VOICE, imsRegInfo);
195     }
196     if (videoChanged || (radioTechChanged && imsServiceStatus_->supportImsVideo)) {
197         imsRegInfo.imsRegState = GetImsRegState(ImsServiceType::TYPE_VIDEO);
198         NotifyImsStateChange(ImsServiceType::TYPE_VIDEO, imsRegInfo);
199     }
200     if (utChanged || (radioTechChanged && imsServiceStatus_->supportImsUt)) {
201         imsRegInfo.imsRegState = GetImsRegState(ImsServiceType::TYPE_UT);
202         NotifyImsStateChange(ImsServiceType::TYPE_UT, imsRegInfo);
203     }
204     if (smsChanged || (radioTechChanged && imsServiceStatus_->supportImsSms)) {
205         imsRegInfo.imsRegState = GetImsRegState(ImsServiceType::TYPE_SMS);
206         NotifyImsStateChange(ImsServiceType::TYPE_SMS, imsRegInfo);
207     }
208 }
209 
GetImsRegState(const ImsServiceType type)210 ImsRegState NetworkSearchState::GetImsRegState(const ImsServiceType type)
211 {
212     bool isRegister = false;
213     switch (type) {
214         case ImsServiceType::TYPE_VOICE:
215             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsVoice;
216             break;
217         case ImsServiceType::TYPE_VIDEO:
218             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsVideo;
219             break;
220         case ImsServiceType::TYPE_UT:
221             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsUt;
222             break;
223         case ImsServiceType::TYPE_SMS:
224             isRegister = imsRegStatus_ && imsServiceStatus_->supportImsSms;
225             break;
226         default:
227             break;
228     }
229     return isRegister ? ImsRegState::IMS_REGISTERED : ImsRegState::IMS_UNREGISTERED;
230 }
231 
GetNetworkStatus()232 std::unique_ptr<NetworkState> NetworkSearchState::GetNetworkStatus()
233 {
234     if (networkState_ == nullptr) {
235         TELEPHONY_LOGE("GetNetworkStatus networkState_ is null slotId:%{public}d", slotId_);
236         return nullptr;
237     }
238     std::lock_guard<std::mutex> lock(mutex_);
239     MessageParcel data;
240     networkState_->Marshalling(data);
241     std::unique_ptr<NetworkState> networkState = std::make_unique<NetworkState>();
242     if (networkState == nullptr) {
243         TELEPHONY_LOGE("failed to create new networkState slotId:%{public}d", slotId_);
244         return nullptr;
245     }
246     networkState->ReadFromParcel(data);
247     return networkState;
248 }
249 
SetInitial()250 void NetworkSearchState::SetInitial()
251 {
252     TELEPHONY_LOGI("NetworkSearchState::SetInitial slotId:%{public}d", slotId_);
253     std::lock_guard<std::mutex> lock(mutex_);
254     if (networkState_ != nullptr) {
255         networkState_->Init();
256     }
257 }
258 
GetLastCfgTech(RadioTech & tech)259 int32_t NetworkSearchState::GetLastCfgTech(RadioTech &tech)
260 {
261     std::lock_guard<std::mutex> lock(mutex_);
262     if (networkState_ == nullptr) {
263         TELEPHONY_LOGE("networkState_ is null, slotId:%{public}d", slotId_);
264         return TELEPHONY_ERR_LOCAL_PTR_NULL;
265     }
266     tech = networkState_->GetLastCfgTech();
267     return TELEPHONY_ERR_SUCCESS;
268 }
269 
GetLastPsRadioTech(RadioTech & tech)270 int32_t NetworkSearchState::GetLastPsRadioTech(RadioTech &tech)
271 {
272     std::lock_guard<std::mutex> lock(mutex_);
273     if (networkState_ == nullptr) {
274         TELEPHONY_LOGE("networkState_ is null, slotId:%{public}d", slotId_);
275         return TELEPHONY_ERR_LOCAL_PTR_NULL;
276     }
277     tech = networkState_->GetLastPsRadioTech();
278     return TELEPHONY_ERR_SUCCESS;
279 }
280 
SetCfgTech(RadioTech tech)281 void NetworkSearchState::SetCfgTech(RadioTech tech)
282 {
283     std::lock_guard<std::mutex> lock(mutex_);
284     if (networkState_ != nullptr) {
285         networkState_->SetCfgTech(tech);
286     }
287 }
288 
SetNrState(NrState state)289 void NetworkSearchState::SetNrState(NrState state)
290 {
291     std::lock_guard<std::mutex> lock(mutex_);
292     if (networkState_ != nullptr) {
293         TELEPHONY_LOGD("nrState_:%{public}d slotId:%{public}d", state, slotId_);
294         networkState_->SetNrState(state);
295     }
296 }
297 
NotifyPsRegStatusChange()298 void NetworkSearchState::NotifyPsRegStatusChange()
299 {
300     std::lock_guard<std::mutex> lock(mutex_);
301     auto networkSearchManager = networkSearchManager_.lock();
302     if (networkSearchManager == nullptr) {
303         TELEPHONY_LOGE("NotifyPsRegStatusChange NetworkSearchManager is null slotId:%{public}d", slotId_);
304         return;
305     }
306     if (networkState_ == nullptr) {
307         TELEPHONY_LOGE("NotifyPsRegStatusChange networkState_ is null slotId:%{public}d", slotId_);
308         return;
309     }
310 
311     if (networkState_->GetPsRegStatus() == RegServiceState::REG_STATE_IN_SERVICE &&
312         (processNetworkState_ || networkStateOld_->GetPsRegStatus() != RegServiceState::REG_STATE_IN_SERVICE)) {
313         networkSearchManager->NotifyPsConnectionAttachedChanged(slotId_);
314     }
315     if (networkState_->GetPsRegStatus() != RegServiceState::REG_STATE_IN_SERVICE &&
316         (processNetworkState_ || networkStateOld_->GetPsRegStatus() == RegServiceState::REG_STATE_IN_SERVICE)) {
317         networkSearchManager->NotifyPsConnectionDetachedChanged(slotId_);
318     }
319 }
320 
NotifyPsRoamingStatusChange()321 void NetworkSearchState::NotifyPsRoamingStatusChange()
322 {
323     std::lock_guard<std::mutex> lock(mutex_);
324     auto networkSearchManager = networkSearchManager_.lock();
325     if (networkSearchManager == nullptr) {
326         TELEPHONY_LOGE("NotifyPsRoamingStatusChange NetworkSearchManager is null slotId:%{public}d", slotId_);
327         return;
328     }
329     if (networkState_ == nullptr) {
330         TELEPHONY_LOGE("NotifyPsRoamingStatusChange networkState_ is null slotId:%{public}d", slotId_);
331         return;
332     }
333     if (networkState_->GetPsRoamingStatus() > RoamingType::ROAMING_STATE_UNKNOWN &&
334         networkStateOld_->GetPsRoamingStatus() == RoamingType::ROAMING_STATE_UNKNOWN) {
335         networkSearchManager->NotifyPsRoamingOpenChanged(slotId_);
336     }
337     if (networkStateOld_->GetPsRoamingStatus() > RoamingType::ROAMING_STATE_UNKNOWN &&
338         networkState_->GetPsRoamingStatus() == RoamingType::ROAMING_STATE_UNKNOWN) {
339         networkSearchManager->NotifyPsRoamingCloseChanged(slotId_);
340     }
341 }
342 
NotifyPsRadioTechChange()343 void NetworkSearchState::NotifyPsRadioTechChange()
344 {
345     std::lock_guard<std::mutex> lock(mutex_);
346     auto networkSearchManager = networkSearchManager_.lock();
347     if (networkSearchManager == nullptr) {
348         TELEPHONY_LOGE("NotifyPsRadioTechChange NetworkSearchManager is null slotId:%{public}d", slotId_);
349         return;
350     }
351     if (networkState_ == nullptr) {
352         TELEPHONY_LOGE("NotifyPsRadioTechChange networkState_ is null slotId:%{public}d", slotId_);
353         return;
354     }
355 
356     if (processNetworkState_ || networkState_->GetPsRadioTech() != networkStateOld_->GetPsRadioTech()) {
357         networkSearchManager->UpdatePhone(slotId_, networkState_->GetCsRadioTech(), networkState_->GetPsRadioTech());
358         networkSearchManager->SendUpdateCellLocationRequest(slotId_);
359         networkSearchManager->NotifyPsRatChanged(slotId_);
360     }
361 }
362 
NotifyEmergencyChange()363 void NetworkSearchState::NotifyEmergencyChange()
364 {
365     std::lock_guard<std::mutex> lock(mutex_);
366     auto networkSearchManager = networkSearchManager_.lock();
367     if (networkSearchManager == nullptr) {
368         TELEPHONY_LOGE("NotifyEmergencyChange NetworkSearchManager is null slotId:%{public}d", slotId_);
369         return;
370     }
371     if (networkState_ == nullptr) {
372         TELEPHONY_LOGE("NotifyEmergencyChange networkState_ is null slotId:%{public}d", slotId_);
373         return;
374     }
375     if (processNetworkState_ || (networkState_->IsEmergency() != networkStateOld_->IsEmergency())) {
376         if (networkState_->IsEmergency()) {
377             networkSearchManager->NotifyEmergencyOpenChanged(slotId_);
378         } else {
379             networkSearchManager->NotifyEmergencyCloseChanged(slotId_);
380         }
381     }
382 }
383 
NotifyNrStateChange()384 void NetworkSearchState::NotifyNrStateChange()
385 {
386     std::lock_guard<std::mutex> lock(mutex_);
387     auto networkSearchManager = networkSearchManager_.lock();
388     if (networkSearchManager == nullptr) {
389         TELEPHONY_LOGE("NotifyPsRadioTechChange NetworkSearchManager is null slotId:%{public}d", slotId_);
390         return;
391     }
392     if (networkState_ == nullptr) {
393         TELEPHONY_LOGE("NotifyPsRadioTechChange networkState_ is null slotId:%{public}d", slotId_);
394         return;
395     }
396 
397     if (processNetworkState_ || (networkState_->GetNrState() != networkStateOld_->GetNrState())) {
398         networkSearchManager->NotifyNrStateChanged(slotId_);
399     }
400 }
401 
NotifyImsStateChange(ImsServiceType imsSrvType,const ImsRegInfo & info)402 void NetworkSearchState::NotifyImsStateChange(ImsServiceType imsSrvType, const ImsRegInfo &info)
403 {
404     std::lock_guard<std::mutex> lock(mutex_);
405     auto networkSearchManager = networkSearchManager_.lock();
406     if (networkSearchManager == nullptr) {
407         TELEPHONY_LOGE("networkSearchManager is null slotId:%{public}d", slotId_);
408         return;
409     }
410     if (networkState_ == nullptr) {
411         TELEPHONY_LOGE("networkState_ is null slotId:%{public}d", slotId_);
412         return;
413     }
414     networkSearchManager->NotifyImsRegInfoChanged(slotId_, imsSrvType, info);
415 }
416 
NotifyStateChange()417 void NetworkSearchState::NotifyStateChange()
418 {
419     TELEPHONY_LOGI("NetworkSearchState::NotifyStateChange slotId:%{public}d", slotId_);
420     if (networkState_ == nullptr) {
421         TELEPHONY_LOGE("NotifyStateChange networkState_ is null slotId:%{public}d", slotId_);
422         return;
423     }
424 
425     if (TELEPHONY_EXT_WRAPPER.updateNetworkStateExt_ != nullptr) {
426         TELEPHONY_EXT_WRAPPER.updateNetworkStateExt_(slotId_, networkState_);
427     }
428 
429     if (processNetworkState_ || !(*networkState_ == *networkStateOld_)) {
430         TELEPHONY_LOGI(
431             "NetworkSearchState::StateCheck isNetworkStateChange notify to app... slotId:%{public}d", slotId_);
432         sptr<NetworkState> ns = new NetworkState;
433         if (ns == nullptr) {
434             TELEPHONY_LOGE("failed to create networkState slotId:%{public}d", slotId_);
435             return;
436         }
437 
438         MessageParcel data;
439         networkState_->Marshalling(data);
440         ns->ReadFromParcel(data);
441         if (TELEPHONY_EXT_WRAPPER.processStateChangeExt_ != nullptr) {
442             if (TELEPHONY_EXT_WRAPPER.processStateChangeExt_(slotId_, ns)) {
443                 networkStateOld_->Marshalling(data);
444                 networkState_->ReadFromParcel(data);
445                 processNetworkState_ = true;
446                 return;
447             }
448         }
449         // We must Update RadioTech(PhoneType) bebore notifying observers,
450         // otherwise observers may get the wrong phone type
451         CsRadioTechChange();
452 
453         NotifyPsRadioTechChange();
454         NotifyPsRegStatusChange();
455         NotifyPsRoamingStatusChange();
456         NotifyEmergencyChange();
457         NotifyNrStateChange();
458 
459         DelayedSingleton<NetworkSearchNotify>::GetInstance()->NotifyNetworkStateUpdated(slotId_, ns);
460         networkState_->Marshalling(data);
461         networkStateOld_->ReadFromParcel(data);
462     }
463     processNetworkState_ = false;
464 }
465 
CsRadioTechChange()466 void NetworkSearchState::CsRadioTechChange()
467 {
468     TELEPHONY_LOGI("NetworkSearchState::CsRadioTechChange slotId:%{public}d", slotId_);
469     std::lock_guard<std::mutex> lock(mutex_);
470     auto networkSearchManager = networkSearchManager_.lock();
471     if (networkSearchManager == nullptr) {
472         TELEPHONY_LOGE("CsRadioTechChange NetworkSearchManager is null slotId:%{public}d", slotId_);
473         return;
474     }
475     if (networkState_ == nullptr) {
476         TELEPHONY_LOGE("CsRadioTechChange networkState is null slotId:%{public}d", slotId_);
477         return;
478     }
479     if (networkStateOld_ == nullptr) {
480         TELEPHONY_LOGE("CsRadioTechChange networkStateOld_ is null slotId:%{public}d", slotId_);
481         return;
482     }
483 
484     if (processNetworkState_ || networkState_->GetCsRadioTech() != networkStateOld_->GetCsRadioTech()) {
485         networkSearchManager->UpdatePhone(slotId_, networkState_->GetCsRadioTech(), networkState_->GetPsRadioTech());
486     }
487 }
488 
SetLongOperatorName(const std::string & longName,DomainType domainType)489 void NetworkSearchState::SetLongOperatorName(const std::string &longName, DomainType domainType)
490 {
491     std::lock_guard<std::mutex> lock(mutex_);
492     if (networkState_ != nullptr) {
493         networkState_->SetLongOperatorName(longName, domainType);
494         TELEPHONY_LOGD("NetworkSearchState::SetLongOperatorName longName : %{public}s", longName.c_str());
495     }
496 }
497 
IsProcessNetworkState()498 bool NetworkSearchState::IsProcessNetworkState()
499 {
500     return processNetworkState_;
501 }
502 } // namespace Telephony
503 } // namespace OHOS
504