• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 "call_records_manager.h"
17 
18 #include "call_manager_inner_type.h"
19 #include "call_number_utils.h"
20 #include "common_event_manager.h"
21 #include "common_event_support.h"
22 #include "os_account_manager_wrapper.h"
23 #include "parameter.h"
24 #include "securec.h"
25 #include "call_earthquake_alarm_subscriber.h"
26 #include <regex>
27 #include "telephony_cust_wrapper.h"
28 #include "settings_datashare_helper.h"
29 #include "call_manager_utils.h"
30 #ifdef SUPPORT_MUTE_BY_DATABASE
31 #include "interoperable_settings_handler.h"
32 #endif
33 #include "call_control_manager.h"
34 
35 namespace OHOS {
36 namespace Telephony {
37 constexpr const char *PROP_NETWORK_COUNTRY_ISO = "telephony.operator.iso-country";
38 constexpr const char *DEFAULT_NETWORK_COUNTRY = "CN";
39 constexpr int16_t DEFAULT_COUNTRY_CODE = 0;
40 constexpr int16_t DEFAULT_TIME = 0;
41 const int32_t ACTIVE_USER_ID = 100;
42 const uint32_t FEATURES_VIDEO = 1 << 0;
43 const int32_t PROP_SYSPARA_SIZE = 128;
44 const char *FORMAT_PATTERN = ",|;";
45 const char *MARK_SOURCE_OF_ANTIFRAUT_CENTER = "5";
46 const char *MARK_SOURCE_OF_OTHERS = "3";
47 const std::string SETTINGS_ANTIFRAUD_CENTER_SWITCH = "";
48 const std::string SETTINGS_ANTIFRAUD_BESTMIND_SWITCH = "";
49 const std::string ANTIFRAUD_CENTER_BUNDLE_NAME = "";
50 const std::string BEST_MIND_BUNDLE_NAME = "";
51 const std::string TELEPHONY_IDENTITY_SWITCH = "";
CallRecordsManager()52 CallRecordsManager::CallRecordsManager() : callRecordsHandlerServerPtr_(nullptr) {}
53 
~CallRecordsManager()54 CallRecordsManager::~CallRecordsManager()
55 {
56     if (statusChangeListener_ != nullptr) {
57         auto samgrProxy = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
58         if (samgrProxy != nullptr) {
59             samgrProxy->UnSubscribeSystemAbility(OHOS::SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN, statusChangeListener_);
60             statusChangeListener_ = nullptr;
61         }
62     }
63     if (dataShareReadySubscriber_ != nullptr) {
64         bool subRet = CommonEventManager::UnSubscribeCommonEvent(dataShareReadySubscriber_);
65         if (!subRet) {
66             TELEPHONY_LOGE("UnSubscribe data share ready event failed!");
67         }
68         dataShareReadySubscriber_ = nullptr;
69     }
70 }
71 
Init()72 void CallRecordsManager::Init()
73 {
74     callRecordsHandlerServerPtr_ = DelayedSingleton<CallRecordsHandlerService>::GetInstance();
75     if (callRecordsHandlerServerPtr_ == nullptr) {
76         TELEPHONY_LOGE("call record manager init failure.");
77         return;
78     }
79     callRecordsHandlerServerPtr_->Start();
80     statusChangeListener_ = new (std::nothrow) AccountSystemAbilityListener();
81     if (statusChangeListener_ == nullptr) {
82         TELEPHONY_LOGE("failed to create statusChangeListener");
83         return;
84     }
85     RegisterDataShareReadySubscriber();
86     auto managerPtr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
87     if (managerPtr == nullptr) {
88         TELEPHONY_LOGE("get system ability manager error");
89         return;
90     }
91     int32_t ret = managerPtr->SubscribeSystemAbility(OHOS::SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN, statusChangeListener_);
92     if (ret != TELEPHONY_SUCCESS) {
93         TELEPHONY_LOGE("failed to subscribe account manager service SA!");
94         return;
95     }
96 }
97 
RegisterDataShareReadySubscriber()98 void CallRecordsManager::RegisterDataShareReadySubscriber()
99 {
100     MatchingSkills matchingSkills;
101     matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_DATA_SHARE_READY);
102     CommonEventSubscribeInfo subscriberInfo(matchingSkills);
103     subscriberInfo.SetThreadMode(EventFwk::CommonEventSubscribeInfo::COMMON);
104     dataShareReadySubscriber_ = std::make_shared<DataShareReadyEventSubscriber>(subscriberInfo);
105     bool subRet = CommonEventManager::SubscribeCommonEvent(dataShareReadySubscriber_);
106     if (!subRet) {
107         TELEPHONY_LOGE("Subscribe data share ready event failed!");
108     }
109 }
110 
CallStateUpdated(sptr<CallBase> & callObjectPtr,TelCallState priorState,TelCallState nextState)111 void CallRecordsManager::CallStateUpdated(
112     sptr<CallBase> &callObjectPtr, TelCallState priorState, TelCallState nextState)
113 {
114     if (callObjectPtr != nullptr && callObjectPtr->GetCallType() == CallType::TYPE_VOIP) {
115         TELEPHONY_LOGI("Voip call should not save cellular call records");
116         return;
117     }
118     CallAttributeInfo info;
119     if (nextState != TelCallState::CALL_STATUS_DISCONNECTED) {
120         return;
121     }
122     if (callObjectPtr == nullptr) {
123         TELEPHONY_LOGE("call object is nullptr");
124         return;
125     }
126     (void)memset_s(&info, sizeof(CallAttributeInfo), 0, sizeof(CallAttributeInfo));
127     callObjectPtr->GetCallAttributeBaseInfo(info);
128     ContactInfo contactInfo = callObjectPtr->GetCallerInfo();
129     if (contactInfo.name.empty() && !info.name.empty()) {
130         info.namePresentation = 1;
131     } else {
132         info.namePresentation = 0;
133     }
134     if (info.numberMarkInfo.markType == MarkType::MARK_TYPE_DEFAULT) {
135         TELEPHONY_LOGI("markType is default.");
136         info.numberMarkInfo.markType = MarkType::MARK_TYPE_NONE;
137     }
138 
139     if (nextState == TelCallState::CALL_STATUS_DISCONNECTED &&
140         callObjectPtr->GetCallDirection() == CallDirection::CALL_DIRECTION_IN &&
141         callObjectPtr->IsAiAutoAnswer()) {
142         info.answerType = CallAnswerType::CALL_ANSWER_MISSED;
143     }
144     if (callObjectPtr->GetNewCallUseBox()) {
145         info.newCallUseBox = 1;
146     } else {
147         info.newCallUseBox = 0;
148     }
149     AddOneCallRecord(info);
150 }
151 
AddOneCallRecord(sptr<CallBase> call,CallAnswerType answerType)152 void CallRecordsManager::AddOneCallRecord(sptr<CallBase> call, CallAnswerType answerType)
153 {
154     CallAttributeInfo info;
155     (void)memset_s(&info, sizeof(CallAttributeInfo), 0, sizeof(CallAttributeInfo));
156     call->GetCallAttributeBaseInfo(info);
157     if (info.numberMarkInfo.markType == MarkType::MARK_TYPE_DEFAULT) {
158         TELEPHONY_LOGI("markType is default.");
159         info.numberMarkInfo.markType = MarkType::MARK_TYPE_NONE;
160     }
161     AddOneCallRecord(info);
162 }
163 
AddOneCallRecord(CallAttributeInfo & info)164 void CallRecordsManager::AddOneCallRecord(CallAttributeInfo &info)
165 {
166     CallRecordInfo data;
167     (void)memset_s(&data, sizeof(CallRecordInfo), 0, sizeof(CallRecordInfo));
168     if (callRecordsHandlerServerPtr_ == nullptr) {
169         TELEPHONY_LOGE("callRecordsHandlerServerPtr_ is nullptr");
170         return;
171     }
172     if (strlen(info.accountNumber) > static_cast<size_t>(kMaxNumberLen)) {
173         TELEPHONY_LOGE("Number out of limit!");
174         return;
175     }
176     if (TELEPHONY_CUST_WRAPPER.isHideViolenceOrEmcNumbersInCallLog_ != nullptr
177         && TELEPHONY_CUST_WRAPPER.isHideViolenceOrEmcNumbersInCallLog_(info)) {
178         TELEPHONY_LOGE("hide violence or emergency nums in call log!");
179         return;
180     }
181     errno_t result = memcpy_s(data.phoneNumber, kMaxNumberLen, info.accountNumber, strlen(info.accountNumber));
182     if (result != EOK) {
183         TELEPHONY_LOGE("memcpy_s failed!");
184         return;
185     }
186     if (strlen(info.numberLocation) > static_cast<size_t>(kMaxNumberLen)) {
187         TELEPHONY_LOGE("Location out of limit!");
188         return;
189     }
190     result = memcpy_s(data.numberLocation, kMaxNumberLen, info.numberLocation, strlen(info.numberLocation));
191     if (result != EOK) {
192         TELEPHONY_LOGE("memcpy_s failed!");
193         return;
194     }
195     if (memcpy_s(data.detectDetails, sizeof(data.detectDetails), info.detectDetails, strlen(info.detectDetails))
196         != EOK) {
197         TELEPHONY_LOGE("memcpy_s detectDetails failed!");
198         return;
199     }
200     CopyCallInfoToRecord(info, data);
201     std::string countryIso = GetCountryIso();
202     int32_t formatRet = CopyFormatNumberToRecord(countryIso, data);
203     if (formatRet != TELEPHONY_SUCCESS) {
204         TELEPHONY_LOGE("CopyFormatNumberToRecord failed!");
205         return;
206     }
207     int32_t formatToE164Ret = CopyFormatNumberToE164ToRecord(countryIso, data);
208     if (formatToE164Ret != TELEPHONY_SUCCESS) {
209         TELEPHONY_LOGE("CopyFormatNumberToE164ToRecord failed!");
210         return;
211     }
212     callRecordsHandlerServerPtr_->StoreCallRecord(data);
213 }
214 
GetCountryIso()215 std::string CallRecordsManager::GetCountryIso()
216 {
217     char valueStr[PROP_SYSPARA_SIZE] = {0};
218     GetParameter(PROP_NETWORK_COUNTRY_ISO, "", valueStr, PROP_SYSPARA_SIZE);
219     std::string countryIso = valueStr;
220     if (countryIso == "") {
221         TELEPHONY_LOGI("GetParameter is null, default network countryIso cn");
222         countryIso = DEFAULT_NETWORK_COUNTRY;
223     } else {
224         TELEPHONY_LOGI("GetParameter network countryIso is %{public}s", countryIso.c_str());
225     }
226     return countryIso;
227 }
228 
CopyFormatNumberToRecord(std::string & countryIso,CallRecordInfo & data)229 int32_t CallRecordsManager::CopyFormatNumberToRecord(std::string &countryIso, CallRecordInfo &data)
230 {
231     std::string tmpStr("");
232     if (std::regex_search(std::string(data.phoneNumber), std::regex(FORMAT_PATTERN))) {
233         (void)DelayedSingleton<CallNumberUtils>::GetInstance()->FormatPhoneNumberAsYouType(
234             std::string(data.phoneNumber), countryIso, tmpStr);
235     } else {
236         (void)DelayedSingleton<CallNumberUtils>::GetInstance()->FormatPhoneNumber(
237             std::string(data.phoneNumber), countryIso, tmpStr);
238     }
239 
240     if (tmpStr.length() > static_cast<size_t>(kMaxNumberLen)) {
241         TELEPHONY_LOGE("Number out of limit!");
242         return TELEPHONY_ERR_ARGUMENT_INVALID;
243     }
244     errno_t result = memcpy_s(data.formattedNumber, kMaxNumberLen, tmpStr.c_str(), tmpStr.length());
245     if (result != EOK) {
246         TELEPHONY_LOGE("memcpy_s failed!");
247         return result;
248     }
249     return TELEPHONY_SUCCESS;
250 }
251 
CopyFormatNumberToE164ToRecord(std::string & countryIso,CallRecordInfo & data)252 int32_t CallRecordsManager::CopyFormatNumberToE164ToRecord(std::string &countryIso, CallRecordInfo &data)
253 {
254     std::string tmpStr("");
255     (void)DelayedSingleton<CallNumberUtils>::GetInstance()->FormatPhoneNumberToE164(
256         std::string(data.phoneNumber), countryIso, tmpStr);
257     if (tmpStr.length() > static_cast<size_t>(kMaxNumberLen)) {
258         TELEPHONY_LOGE("Number out of limit!");
259         return TELEPHONY_ERR_ARGUMENT_INVALID;
260     }
261     errno_t result = memcpy_s(data.formattedNumberToE164, kMaxNumberLen, tmpStr.c_str(), tmpStr.length());
262     if (result != EOK) {
263         TELEPHONY_LOGE("memcpy_s failed!");
264         return result;
265     }
266     return TELEPHONY_SUCCESS;
267 }
268 
CopyCallInfoToRecord(CallAttributeInfo & info,CallRecordInfo & data)269 void CallRecordsManager::CopyCallInfoToRecord(CallAttributeInfo &info, CallRecordInfo &data)
270 {
271     if ((info.callBeginTime == DEFAULT_TIME) || (info.callEndTime == DEFAULT_TIME)) {
272         data.callDuration = DEFAULT_TIME;
273     } else {
274         data.callDuration = difftime(info.callEndTime, info.callBeginTime);
275     }
276     if ((info.ringBeginTime == DEFAULT_TIME) || (info.ringEndTime == DEFAULT_TIME)) {
277         data.ringDuration = DEFAULT_TIME;
278     } else {
279         data.ringDuration = difftime(info.ringEndTime, info.ringBeginTime);
280     }
281     data.callId = info.callId;
282     data.callBeginTime = info.callBeginTime;
283     data.callCreateTime = info.callCreateTime;
284     data.callEndTime = info.callEndTime;
285     data.directionType = info.callDirection;
286     data.answerType = info.answerType;
287     data.countryCode = DEFAULT_COUNTRY_CODE;
288     data.slotId = info.accountId;
289     data.callType = info.callType;
290     // use original call type for video call record
291     int32_t callFeatures = GetCallFeatures(info.originalCallType);
292     data.features = callFeatures;
293     data.numberMarkInfo = info.numberMarkInfo;
294     if (strcmp(data.numberMarkInfo.markSource, MARK_SOURCE_OF_ANTIFRAUT_CENTER) == 0) {
295         int32_t userId = 0;
296         AccountSA::OsAccountManager::GetForegroundOsAccountLocalId(userId);
297         GetNumberMarkSource(userId, data.numberMarkInfo.markSource, kMaxNumberLen + 1);
298     }
299     data.blockReason = info.blockReason;
300     data.celiaCallType = info.celiaCallType;
301     data.name = info.name;
302     data.namePresentation = info.namePresentation;
303     data.newCallUseBox = info.newCallUseBox;
304 }
305 
GetNumberMarkSource(int32_t userId,char * source,unsigned int size)306 void CallRecordsManager::GetNumberMarkSource(int32_t userId, char *source, unsigned int size)
307 {
308     std::string isAntifraudSwitchOn = "0";
309     std::string isTelephonyIdentityOn = "0";
310     std::string isAntiFraudBestMindSwitchOn = "0";
311     auto settingHelper = SettingsDataShareHelper::GetInstance();
312     if (settingHelper == nullptr) {
313         return;
314     }
315     if (size <= strlen(MARK_SOURCE_OF_ANTIFRAUT_CENTER) && size <= strlen(MARK_SOURCE_OF_OTHERS)) {
316         return;
317     }
318     OHOS::Uri settingUri(SettingsDataShareHelper::SETTINGS_DATASHARE_URI);
319     settingHelper->Query(settingUri, SETTINGS_ANTIFRAUD_CENTER_SWITCH, isAntifraudSwitchOn);
320     settingHelper->Query(settingUri, SETTINGS_ANTIFRAUD_BESTMIND_SWITCH, isAntiFraudBestMindSwitchOn);
321     if (isAntifraudSwitchOn == "0" && isAntiFraudBestMindSwitchOn == "0") {
322         strcpy_s(source, size, MARK_SOURCE_OF_OTHERS);
323         return;
324     }
325     settingHelper->Query(settingUri, TELEPHONY_IDENTITY_SWITCH, isTelephonyIdentityOn);
326     if (isTelephonyIdentityOn == "0") {
327         strcpy_s(source, size, MARK_SOURCE_OF_OTHERS);
328         return;
329     }
330     if (!CallManagerUtils::IsBundleInstalled(ANTIFRAUD_CENTER_BUNDLE_NAME, userId) &&
331         !CallManagerUtils::IsBundleInstalled(BEST_MIND_BUNDLE_NAME, userId)) {
332         strcpy_s(source, size, MARK_SOURCE_OF_OTHERS);
333         return;
334     }
335 }
336 
RemoveMissedIncomingCallNotification()337 int32_t CallRecordsManager::RemoveMissedIncomingCallNotification()
338 {
339     if (callRecordsHandlerServerPtr_ == nullptr) {
340         TELEPHONY_LOGE("callRecordsHandlerServerPtr_ is nullptr");
341         return TELEPHONY_ERR_LOCAL_PTR_NULL;
342     }
343     int32_t ret = callRecordsHandlerServerPtr_->RemoveMissedIncomingCallNotification();
344     if (ret != TELEPHONY_SUCCESS) {
345         TELEPHONY_LOGE("RemoveMissedIncomingCallNotification failed!");
346         return ret;
347     }
348     return TELEPHONY_SUCCESS;
349 }
350 
GetCallFeatures(int32_t videoState)351 int32_t CallRecordsManager::GetCallFeatures(int32_t videoState)
352 {
353     uint32_t features = 0;
354     if (IsVideoCall(videoState)) {
355         features |= FEATURES_VIDEO;
356     }
357     return static_cast<int32_t>(features);
358 }
359 
IsVideoCall(int32_t videoState)360 bool CallRecordsManager::IsVideoCall(int32_t videoState)
361 {
362     if (static_cast<VideoStateType>(videoState) == VideoStateType::TYPE_SEND_ONLY ||
363         static_cast<VideoStateType>(videoState) == VideoStateType::TYPE_VIDEO) {
364         return true;
365     }
366     return false;
367 }
368 
SetDataShareReady(bool isDataShareReady)369 void CallRecordsManager::SetDataShareReady(bool isDataShareReady)
370 {
371     isDataShareReady_ = isDataShareReady;
372 }
373 
SetSystemAbilityAdd(bool isSystemAbilityAdd)374 void CallRecordsManager::SetSystemAbilityAdd(bool isSystemAbilityAdd)
375 {
376     isSystemAbilityAdd_ = isSystemAbilityAdd;
377 }
378 
QueryUnReadMissedCallLog(int32_t userId)379 void CallRecordsManager::QueryUnReadMissedCallLog(int32_t userId)
380 {
381     if (!isDataShareReady_ || !isSystemAbilityAdd_ || isUnReadMissedCallLogQuery_) {
382         return;
383     }
384     TELEPHONY_LOGI("the user id is :%{public}d", userId);
385     if (userId == ACTIVE_USER_ID) {
386         int32_t ret = DelayedSingleton<CallRecordsHandlerService>::GetInstance()->QueryUnReadMissedCallLog();
387         if (ret != TELEPHONY_SUCCESS) {
388             TELEPHONY_LOGE("Query unread missed call log failed!");
389             isUnReadMissedCallLogQuery_ = false;
390         } else {
391             isUnReadMissedCallLogQuery_ = true;
392         }
393     }
394 }
395 
OnAddSystemAbility(int32_t systemAbilityId,const std::string & deviceId)396 void AccountSystemAbilityListener::OnAddSystemAbility(int32_t systemAbilityId, const std::string &deviceId)
397 {
398     TELEPHONY_LOGI("SA:%{public}d is added!", systemAbilityId);
399     if (!CheckInputSysAbilityId(systemAbilityId)) {
400         TELEPHONY_LOGE("added SA is invalid!");
401         return;
402     }
403     if (systemAbilityId != OHOS::SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN) {
404         TELEPHONY_LOGE("added SA is not accoubt manager service, ignored.");
405         return;
406     }
407     DelayedSingleton<CallRecordsManager>::GetInstance()->SetSystemAbilityAdd(true);
408     std::vector<int32_t> activeList = { 0 };
409     DelayedSingleton<AppExecFwk::OsAccountManagerWrapper>::GetInstance()->QueryActiveOsAccountIds(activeList);
410     TELEPHONY_LOGI("current active user id is :%{public}d", activeList[0]);
411     if (activeList[0] == ACTIVE_USER_ID) {
412         DelayedSingleton<CallRecordsManager>::GetInstance()->QueryUnReadMissedCallLog(activeList[0]);
413     } else {
414         MatchingSkills matchingSkills;
415         matchingSkills.AddEvent(CommonEventSupport::COMMON_EVENT_USER_SWITCHED);
416         CommonEventSubscribeInfo subscriberInfo(matchingSkills);
417         subscriberInfo.SetThreadMode(EventFwk::CommonEventSubscribeInfo::COMMON);
418         userSwitchSubscriber_ = std::make_shared<UserSwitchEventSubscriber>(subscriberInfo);
419         bool subRet = CommonEventManager::SubscribeCommonEvent(userSwitchSubscriber_);
420         if (!subRet) {
421             TELEPHONY_LOGE("Subscribe user switched event failed!");
422         }
423     }
424 }
425 
OnRemoveSystemAbility(int32_t systemAbilityId,const std::string & deviceId)426 void AccountSystemAbilityListener::OnRemoveSystemAbility(int32_t systemAbilityId, const std::string &deviceId)
427 {
428     TELEPHONY_LOGI("SA:%{public}d is removed!", systemAbilityId);
429     if (!CheckInputSysAbilityId(systemAbilityId)) {
430         TELEPHONY_LOGE("removed SA is invalid!");
431         return;
432     }
433     if (systemAbilityId != OHOS::SUBSYS_ACCOUNT_SYS_ABILITY_ID_BEGIN) {
434         TELEPHONY_LOGE("removed SA is not account manager service,, ignored.");
435         return;
436     }
437     if (userSwitchSubscriber_ != nullptr) {
438         bool subRet = CommonEventManager::UnSubscribeCommonEvent(userSwitchSubscriber_);
439         if (!subRet) {
440             TELEPHONY_LOGE("UnSubscribe user switched event failed!");
441         }
442         userSwitchSubscriber_ = nullptr;
443     }
444 }
445 
OnReceiveEvent(const CommonEventData & data)446 void UserSwitchEventSubscriber::OnReceiveEvent(const CommonEventData &data)
447 {
448     OHOS::EventFwk::Want want = data.GetWant();
449     std::string action = data.GetWant().GetAction();
450     TELEPHONY_LOGI("action = %{public}s", action.c_str());
451     if (action == CommonEventSupport::COMMON_EVENT_USER_SWITCHED) {
452         int32_t userId = data.GetCode();
453         DelayedSingleton<CallRecordsManager>::GetInstance()->QueryUnReadMissedCallLog(userId);
454     }
455 }
456 
OnReceiveEvent(const CommonEventData & data)457 void DataShareReadyEventSubscriber::OnReceiveEvent(const CommonEventData &data)
458 {
459     OHOS::EventFwk::Want want = data.GetWant();
460     std::string action = data.GetWant().GetAction();
461     TELEPHONY_LOGI("action = %{public}s", action.c_str());
462     if (action == CommonEventSupport::COMMON_EVENT_DATA_SHARE_READY) {
463         DelayedSingleton<CallRecordsManager>::GetInstance()->SetDataShareReady(true);
464         std::vector<int32_t> activeList = { 0 };
465         DelayedSingleton<AppExecFwk::OsAccountManagerWrapper>::GetInstance()->QueryActiveOsAccountIds(activeList);
466         DelayedSingleton<CallRecordsManager>::GetInstance()->QueryUnReadMissedCallLog(activeList[0]);
467         LocationSystemAbilityListener::SystemAbilitySubscriber();
468         DelayedSingleton<CallControlManager>::GetInstance()->RegisterObserver();
469 #ifdef SUPPORT_MUTE_BY_DATABASE
470         InteroperableSettingsHandler::RegisterObserver();
471 #endif
472         CallStatusManager::RegisterObserver();
473     }
474 }
475 } // namespace Telephony
476 } // namespace OHOS