1 /* 2 * Copyright (C) 2025 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 "reminder_callback_stub_helper.h" 17 #include "telephony_log_wrapper.h" 18 #include "call_manager_errors.h" 19 #include "spam_call_adapter.h" 20 #include "call_number_utils.h" 21 #include "call_manager_hisysevent.h" 22 23 namespace OHOS { 24 namespace Telephony { ReminderCallbackStubHelper(std::shared_ptr<SpamCallAdapter> spamCallAdapter)25ReminderCallbackStubHelper::ReminderCallbackStubHelper(std::shared_ptr<SpamCallAdapter> spamCallAdapter) 26 { 27 spamCallAdapter_ = spamCallAdapter; 28 }; ~ReminderCallbackStubHelper()29ReminderCallbackStubHelper::~ReminderCallbackStubHelper() 30 { 31 TELEPHONY_LOGW("~ReminderCallbackStubHelper"); 32 }; 33 OnResult(int32_t & errCode,std::string & result)34int32_t ReminderCallbackStubHelper::OnResult(int32_t &errCode, std::string &result) 35 { 36 TELEPHONY_LOGI("OnResult errCode: %{public}d", errCode); 37 if (errCode == 0) { 38 spamCallAdapter_->ParseNeedNotifyResult(result); 39 } 40 return TELEPHONY_SUCCESS; 41 } 42 } // namespace Telephony 43 } // namespace OHOS