From: SnickerSun Date: Sun, 29 Dec 2024 13:38:56 +0000 (+0800) Subject: U8 flash16M 版本编译 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=532d2efcccb500ff480cce0895b3973f4a10b1f8;p=mirrors%2FFD230.git U8 flash16M 版本编译 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt b/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt index 1e0d2a38c..593c771ae 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230/nativeapp/CMakeLists.txt @@ -423,11 +423,6 @@ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemShutdown.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemFactoryResetView.cpp - #系统更新 - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateModel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateView.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdatePresenter.cpp - #手表二维码 ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/watchQRcode/src/WatchQRCodePresenter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/watchQRcode/src/WatchQRCodeView.cpp @@ -829,7 +824,16 @@ set(SOURCES ) +if("SUPPORT_CAT1_SERVICE" IN_LIST DEFINES) +set(SOURCES + ${SOURCES} + #系统更新 + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateView.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdatePresenter.cpp +) +endif() if("SUPPORT_A5133_SERVICE" IN_LIST DEFINES) set(SOURCES diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp index 7876ea9ee..b3170cf46 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp @@ -214,10 +214,10 @@ #include "motionrecognition/include/MotionRecognitionPresenter.h" #include "motionrecognition/include/MotionRecognitionView.h" - +#ifdef SUPPORT_CAT1_SERVICE #include "systemupdate/include/SystemUpdatePresenter.h" #include "systemupdate/include/SystemUpdateView.h" - +#endif #include "watchQRcode/include/WatchQRCodePresenter.h" #include "watchQRcode/include/WatchQRCodeView.h" @@ -1516,6 +1516,7 @@ namespace OHOS /*系统更新*/ void NativeLauncher::InitSystemUpdateSlice(void) { + #ifdef SUPPORT_CAT1_SERVICE SliceProxy *systemupdate = new AbilitySliceProxy; if (systemupdate == nullptr) { @@ -1523,6 +1524,7 @@ namespace OHOS return; } NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_UPDATE, systemupdate); + #endif } /*手表二维码*/ diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp index 792936532..330918900 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -30,7 +30,7 @@ #include "sleep/include/SleepModel.h" #include "sleepmode/include/SleepModeModel.h" #include "safemodemanager/include/SafeModeManagerModel.h" -#include "cat1_server_hal.h" +// #include "cat1_server_hal.h" #include "custom_runtime.h" #include "uiservice/include/ui_service.h" #include "power_display_service.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantModel.cpp index 75ccc7e73..cf25bbd5f 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantModel.cpp @@ -9,12 +9,14 @@ #include "bleEvent.h" #include "broadcast_feature.h" #include "broadcast_service.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" #include "cat1_server.h" +#include "lwip/apps/http_client.h" +#endif #include "custom_runtime.h" #include "custom_utils.h" #include "graphic_service.h" -#include "lwip/apps/http_client.h" #include "samgr_lite.h" #include "tcxo.h" #include "thread_adapter.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp index b2beeb6be..a136f0bce 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/callerlog/src/CallerLogModel.cpp @@ -23,8 +23,10 @@ #include "custom_runtime.h" #include "MainCallingView.h" #include "dial_sos_c.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" #include "cat1_server.h" +#endif #include "AlarmClockModel.h" #include "PhoneAGService.h" #include "custom_save_runtime.h" @@ -166,7 +168,9 @@ void StatusReset(void) NotificationManager::GetInstance()->SetWatchCallStatus(false); CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourcePhone); DisshakeTimer(); + #ifdef SUPPORT_CAT1_SERVICE set_call_hungup_flag(0); + #endif set_TransCallToMobilePhone_falg(0); OHOS::AlarmClockModel::GetInstance()->AlarmPlayerStop(); @@ -235,7 +239,7 @@ static void CallTimerCallbackProc(int data) // } } - + #ifdef SUPPORT_CAT1_SERVICE { if(get_call_hungup_flag()>=2) { @@ -246,6 +250,7 @@ static void CallTimerCallbackProc(int data) set_call_hungup_flag(get_call_hungup_flag()+1); } } + #endif } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/displaybrightness/src/DisplayBrightnessPresent.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/displaybrightness/src/DisplayBrightnessPresent.cpp index 608b5f786..2d8b32b56 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/displaybrightness/src/DisplayBrightnessPresent.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/displaybrightness/src/DisplayBrightnessPresent.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 09:14:38 * @LastEditors: SnickerSun snickersun@163.com - * @LastEditTime: 2024-12-22 09:57:34 + * @LastEditTime: 2024-12-29 16:25:27 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/displaybrightness/src/DisplayBrightnessPresent.cpp */ #include "AppViewIDs.h" @@ -13,7 +13,7 @@ #include "graphic_math.h" #include "string.h" #include "displaybrightness/include/DisplayBrightnessPresenter.h" -#include "cat1_ctl.h" +// #include "cat1_ctl.h" #include "displaybrightness/include/DisplayBrightnessModel.h" #include "power_display_service.h" #include "common/key_code.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp index a873a9732..4a0b1a1a6 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp @@ -1,8 +1,8 @@ /* * @Author: luozheng 1732036298@qq.com * @Date: 2024-08-21 11:54:00 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-11-05 15:09:04 + * @LastEditors: SnickerSun snickersun@163.com + * @LastEditTime: 2024-12-29 20:49:56 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp */ #include "main/include/dropdown/DropDownCardPage1.h" @@ -104,8 +104,12 @@ namespace OHOS uapi_set4GCapability(false); #endif state = toggleButton[DropDownCardPage1::toggleButton_4G]->GetState(); - Updat4GState(uapi_cat1_get_power_stat()); - ConfigModel::GetInstance()->SetCat1_4Gability(uapi_cat1_get_power_stat()); + bool cat1_powerstat=false; + #ifdef SUPPORT_CAT1_SERVICE + cat1_powerstat=uapi_cat1_get_power_stat(); + #endif + Updat4GState(cat1_powerstat); + ConfigModel::GetInstance()->SetCat1_4Gability(cat1_powerstat); } } else if (viewId == DROPDOWN_ALIPAY_TOGGLEBUTTON_VIEWID) // 支付宝 @@ -201,7 +205,10 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DropDownCardPage1::InitPage"); bool state_bt = ConfigModel::GetInstance()->GetClassicBlueToothState(); // 传统蓝牙开关 - bool state_4g = uapi_cat1_get_power_stat(); + bool state_4g = false; + #ifdef SUPPORT_CAT1_SERVICE + state_4g = uapi_cat1_get_power_stat(); + #endif bool state_savepower = uapi_dev_runtime_get_saveele_status(); bool state_sleep = uapi_sleep_mode_flag_get(); bool state_dnotdisturb = DnotDisturbModel::GetInstance().GetDoNotDisturbModeEnabled(); @@ -271,7 +278,11 @@ namespace OHOS //刷新4g开关显示 void DropDownCardPage1::Refresh4GState() { - Updat4GState(uapi_cat1_get_power_stat()); + bool cat1_powerstat=false; + #ifdef SUPPORT_CAT1_SERVICE + cat1_powerstat=uapi_cat1_get_power_stat(); + #endif + Updat4GState(cat1_powerstat); } void DropDownCardPage1::UpdateDnotdisturbState(bool state) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/CallingView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/CallingView.cpp index 471bfc290..75c75b716 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/CallingView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/CallingView.cpp @@ -9,8 +9,10 @@ #include "wearable_log.h" #include "UiConfig.h" #include "PhoneService.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_server_hal.h" +#endif #include "custom_utils.h" #include "phoneaddressmodel.h" #include "bletest.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp index 3fa35b0ba..fb3680e8f 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/MainCallingPresenter.cpp @@ -16,8 +16,10 @@ #include "MainCallingView.h" #include "PhoneService.h" #include "WaitingHintsView.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_server_hal.h" +#endif #include "custom_utils.h" #include "phoneaddressmodel.h" #include "bletest.h" @@ -250,9 +252,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) } //cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); - + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup_timer(); - + #endif } else @@ -269,7 +271,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { //cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup_timer(); + #endif return true; //#endif @@ -298,8 +302,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { //cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup_timer(); - + #endif return true; //#endif @@ -319,7 +324,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MakephoneNotify 11111111 "); + #ifdef SUPPORT_CAT1_SERVICE cat1_call_answer(); + #endif //incomedcall_event_sendmsg_toUI("ok"); return true; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp index 69f214afc..1f6f6670b 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/makephone/src/WaitingHintsView.cpp @@ -14,8 +14,10 @@ #include "wearable_log.h" #include "PhoneService.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_server_hal.h" +#endif #include "phoneaddressmodel.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp index 0a73fc87a..4557e6554 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp @@ -1,8 +1,8 @@ /* * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-23 09:59:32 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-11-05 14:25:03 + * @LastEditors: SnickerSun snickersun@163.com + * @LastEditTime: 2024-12-29 16:04:27 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp */ #include "AppViewIDs.h" @@ -16,7 +16,9 @@ #include "iostream" #include "ConfigModel.h" #include "networkandcall/include/NetworkAndCallC.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#endif namespace OHOS { @@ -92,7 +94,11 @@ namespace OHOS else if (it->second == "4GCapability") { uapi_set4GCapability(true); - ConfigModel::GetInstance()->SetCat1_4Gability(uapi_cat1_get_power_stat()); + bool cat1_powerstat=false; + #ifdef SUPPORT_CAT1_SERVICE + cat1_powerstat=uapi_cat1_get_power_stat(); + #endif + ConfigModel::GetInstance()->SetCat1_4Gability(cat1_powerstat); if(p_NetworkAndCallView->GetVoLTEToggleButton()) { p_NetworkAndCallView->GetVoLTEToggleButton()->SetTouchable(true); @@ -113,7 +119,11 @@ namespace OHOS #else uapi_set4GCapability(false); #endif - ConfigModel::GetInstance()->SetCat1_4Gability(uapi_cat1_get_power_stat()); + bool cat1_powerstat=false; + #ifdef SUPPORT_CAT1_SERVICE + cat1_powerstat=uapi_cat1_get_power_stat(); + #endif + ConfigModel::GetInstance()->SetCat1_4Gability(cat1_powerstat); if(p_NetworkAndCallView->GetVoLTEToggleButton() && p_NetworkAndCallView->GetVoLTEToggleButton()->GetState()) { p_NetworkAndCallView->GetVoLTEToggleButton()->SetState(false); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallView.cpp index 66748f6ad..9a55aaf8f 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallView.cpp @@ -3,7 +3,9 @@ #include "wearable_log.h" #include "UiConfig.h" #include "ConfigModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#endif #include "ui_resource_string.h" namespace OHOS { @@ -171,7 +173,11 @@ namespace OHOS { MobileData_toggleButton->SetPosition(298, 145, 100, 50); } - MobileData_toggleButton->SetState(uapi_cat1_get_power_stat()); + bool cat1_powerstat=false; + #ifdef SUPPORT_CAT1_SERVICE + cat1_powerstat=uapi_cat1_get_power_stat(); + #endif + MobileData_toggleButton->SetState(cat1_powerstat); MobileData_toggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00); MobileData_toggleButton->SetImages(PNG_TOGGLEBUTTON_ON_IMAGE, PNG_TOGGLEBUTTON_OFF_IMAGE); MobileData_toggleButton->SetOnClickListener(presenter_); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/DialingMethodPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/DialingMethodPresenter.cpp index c446846ec..0a9a701ee 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/DialingMethodPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/DialingMethodPresenter.cpp @@ -1,8 +1,8 @@ /* * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-28 14:17:43 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-04-29 17:30:05 + * @LastEditors: SnickerSun snickersun@163.com + * @LastEditTime: 2024-12-29 17:02:52 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/language/src/DialingMethodPresenter.cpp */ #include "AppViewIDs.h" @@ -13,10 +13,12 @@ #include #include "phone/include/TelephonyInitInterface.h" #include "phone/include/phoneaddressmodel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server_hal.h" +#include "cat1_ctl.h" +#endif #include "PhoneService.h" #include "custom_runtime.h" -#include "cat1_ctl.h" namespace OHOS { @@ -64,6 +66,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DialingMethodPresenter::OnClick"); std::string curViewId = view.GetViewId(); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str()); + #ifdef SUPPORT_CAT1_SERVICE if (curViewId == USINGWATCHSIMBUTTON_VIEWID) { TelephonyInitInterface::DIALINGMETHOD = DIALINGMETHOD_USINGWATCHSIM; // 手表SIM卡拨号 @@ -76,7 +79,6 @@ namespace OHOS } else calldial_event_sendmsg_toUI(get_address_number()); - } else { @@ -93,6 +95,9 @@ namespace OHOS } else if (curViewId == USINGPHONEBUTTON_VIEWID) + #else + if (curViewId == USINGPHONEBUTTON_VIEWID) + #endif { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str()); TelephonyInitInterface::DIALINGMETHOD = DIALINGMETHOD_USINGPHONE; // 手机拨号 diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp index e9f5947e5..68013f664 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phone/src/PhoneCallPresenter.cpp @@ -5,7 +5,9 @@ #include "string" #include "phone/include/PhoneCallPresenter.h" #include +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server_hal.h" +#endif #include "PhoneService.h" #include "phone/include/PhoneCallView.h" #include "phone/include/TelephonyInitInterface.h" @@ -136,7 +138,9 @@ namespace OHOS if(TelephonyInitInterface::DIALINGMETHOD == DIALINGMETHOD_USINGWATCHSIM) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DIALINGMETHOD_USINGWATCHSIM"); + #ifdef SUPPORT_CAT1_SERVICE calldial_event_sendmsg_toUI((char *)phoneNumber.c_str()); + #endif } else if(TelephonyInitInterface::DIALINGMETHOD == DIALINGMETHOD_USINGPHONE) { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAGService.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAGService.cpp index 442f1a88b..61e63546c 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAGService.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAGService.cpp @@ -2,7 +2,6 @@ * Copyright (c) @CompanyNameMagicTag 2021. All rights reserved. * Description: This module include test function of BT HFP Service module. */ - #include "PhoneAGService.h" #include #include @@ -23,7 +22,9 @@ #include "wearable_log.h" #include "common_def.h" #include "PhoneAudio.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#endif #include "BluetoothHeadsetEvent.h" #include "PhoneServiceC.h" @@ -262,7 +263,9 @@ static void sample_hfp_ag_conn_state_changed_callback(const bd_addr_t *bd_addr, void cat1_start_SCO_audio_(void) { + #ifdef SUPPORT_CAT1_HFP_AG_SERV uapi_cat1_start_SCO_volte_voice(); + #endif } static void sample_hfp_ag_sco_conn_state_changed_callback(const bd_addr_t *bd_addr, hfp_sco_connect_state_t state) @@ -275,6 +278,7 @@ static void sample_hfp_ag_sco_conn_state_changed_callback(const bd_addr_t *bd_ad break; case HFP_SCO_STATE_CONNECTED: + #ifdef SUPPORT_CAT1_HFP_AG_SERV if(volte_voice_state()==0) { do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT_HFP_SCO_AUDIO_START, nullptr, 0); @@ -285,6 +289,7 @@ static void sample_hfp_ag_sco_conn_state_changed_callback(const bd_addr_t *bd_ad do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT_HFP_SCO_AUDIO_START, nullptr, 0); } + #endif Call_headset_state_updata(1); @@ -917,6 +922,7 @@ int cat1_ag_send_call_event( uint32_t event_topic, const char* info) //AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_VOLTE); int ret=0; + #ifdef SUPPORT_CAT1_HFP_AG_SERV hfp_phone_info_t phone_info={0}; if(info!=nullptr) { @@ -926,7 +932,6 @@ int cat1_ag_send_call_event( uint32_t event_topic, const char* info) memcpy_s(phone_info.number,HFP_AG_PHONENUM_MAX_DIGITS,info,phone_info.num_len); phone_info.alpha_str[0]=0; } - switch (event_topic) { case TOPIC_EVENT_CAT1_INCOMMING: @@ -945,6 +950,7 @@ int cat1_ag_send_call_event( uint32_t event_topic, const char* info) ret=ERRCODE_BT_FAIL; break; } + #endif return ret; } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAudio.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAudio.cpp index dd280d04e..43f253d54 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAudio.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneAudio.cpp @@ -16,7 +16,9 @@ #include "wearable_log.h" #include "audio_manager_c_wrapper.h" #include "CallerLogModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#endif #include "PhoneServiceC.h" @@ -148,10 +150,12 @@ int32_t PhoneAudioSetMicMuteCat1(bool isMute) { int32_t ret; + #ifdef SUPPORT_CAT1_SERVICE if(!volte_voice_state()) { return 0; } + #endif ret=AudioStreamOutSetMute(isMute); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioStreamOutSetMute] end! ret = %d", ret); return 0; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneService.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneService.cpp index 2949853b0..fa8fe6ef2 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneService.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/phoneservice/src/PhoneService.cpp @@ -26,7 +26,6 @@ #include "service_id_define.h" #include "samgr_lite.h" #include "ui_service.h" -#include "cat1_server_hal.h" #include "BluetoothModel.h" #include "notification_manager.h" #include "CallerLogModel.h" @@ -38,7 +37,10 @@ #include "vibrator_service.h" #include "gfx_utils/mem_api.h" #include "ConfigModelC.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#include "cat1_server_hal.h" +#endif #include "UiConfig.h" #include "PhoneAGService.h" #include "cmath" @@ -407,14 +409,18 @@ void cat1_audio_AudioSetup(void) BtA2dpSnkAudioDestroy(); sleep(1);//等待释放音频 } + #ifdef SUPPORT_CAT1_SERVICE uapi_cat1_start_volte_voice(); + #endif usleep(5000);//等待释放音频 } void cat1_audio_AudioRelease(void) { + #ifdef SUPPORT_CAT1_SERVICE uapi_cat1_stop_volte_voice(); + #endif sleep(1);//等待释放音频 } @@ -476,10 +482,12 @@ static void AudioUp(void) static void AudioSetup(void) { //如果已经建立了cat1 媒体通路,不能再建立,SCO通路 + #ifdef SUPPORT_CAT1_SERVICE if(volte_voice_state()) { return; } + #endif if (g_audioState < AUDIO_STREAM_START_DN) { AudioDn(); } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPing.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPing.cpp index f986b087c..e03795775 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPing.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPing.cpp @@ -4,9 +4,11 @@ #include "producttest/include/testPing.h" #include "AlarmClockModel.h" #include "cmsis_os2.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" #include "cat1_server_hal.h" +#endif #include "custom_runtime.h" #include "producttest/include/testView.h" @@ -149,8 +151,10 @@ namespace OHOS { char hostname[20] = {0}; char result[256] = {0}; + #ifdef SUPPORT_CAT1_SERVICE get_ping_hostname(hostname,sizeof(hostname)); get_ping_result(result,sizeof(result)); + #endif WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "result : %s ",result); OHOS::testPingView *pview = OHOS::testPingView::GetInstance(); pview->sethostname(hostname); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp index 94793113b..27e512b82 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testPresenter.cpp @@ -242,7 +242,9 @@ namespace OHOS if(strcmp(view.GetViewId(),"dial_112") == 0) { + #ifdef SUPPORT_CAT1_SERVICE testcat1View::GetInstance()->dial_112(true); + #endif } if(strcmp(view.GetViewId(),"gray_card") == 0) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp index 9ad47743f..5635c198d 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testView.cpp @@ -2,9 +2,11 @@ #include "producttest/include/testPresenter.h" #include "power_display_service.h" #include "wearable_log.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" #include "cat1_server_hal.h" +#endif #include "custom_utils.h" #include "custom_runtime.h" namespace OHOS @@ -457,6 +459,7 @@ namespace OHOS bool testView::ChangeCAT1TESTView(int16_t thisView) { + #ifdef SUPPORT_CAT1_SERVICE if (SystemScrollView[thisView] == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeCAT1TESTView"); @@ -469,6 +472,7 @@ namespace OHOS SystemScrollView[thisView] = test_cat1_view->testcat1InitIView(thisView); RootView::GetInstance()->Add(SystemScrollView[thisView]); } + #endif return true; } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testabout.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testabout.cpp index cb0e0f23d..0ef8f0709 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testabout.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testabout.cpp @@ -4,8 +4,10 @@ #include "producttest/include/testabout.h" #include "ConfigModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" +#endif #include "custom_runtime.h" #include "producttest/include/testView.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testbt.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testbt.cpp index c4652c8a2..d158e35bc 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testbt.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testbt.cpp @@ -4,9 +4,11 @@ #include "producttest/include/testbt.h" #include "AlarmClockModel.h" #include "cmsis_os2.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" #include "cat1_server_hal.h" +#endif #include "custom_runtime.h" #include "bts_br_gap.h" #include "bts_le_gap.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testcat1.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testcat1.cpp index 2fd939fcc..a0ff0cda8 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testcat1.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testcat1.cpp @@ -4,6 +4,7 @@ #include "producttest/include/testcat1.h" #include "AlarmClockModel.h" #include "cmsis_os2.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" #include "cat1_server_hal.h" @@ -360,4 +361,6 @@ namespace OHOS } return testcat1ScrollView; } -} \ No newline at end of file +} + +#endif diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testhrsenson.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testhrsenson.cpp index 0f0f5102a..ec1619677 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testhrsenson.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/src/testhrsenson.cpp @@ -4,9 +4,11 @@ #include "producttest/include/testhrsenson.h" #include "AlarmClockModel.h" #include "cmsis_os2.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" #include "cat1_server_hal.h" +#endif #include "ppg_service.h" #include "producttest/include/testView.h" #ifdef __cplusplus diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/safemodemanager/src/SafeModeManagerModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/safemodemanager/src/SafeModeManagerModel.cpp index c2410dc56..3007a6dd4 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/safemodemanager/src/SafeModeManagerModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/safemodemanager/src/SafeModeManagerModel.cpp @@ -14,13 +14,15 @@ #include "broadcast_feature.h" #include "broadcast_service.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" #include "cat1_server.h" +#include "lwip/apps/http_client.h" +#endif #include "custom_runtime.h" #include "custom_utils.h" #include "graphic_service.h" #include "iostream" -#include "lwip/apps/http_client.h" #include "string" #include "tcxo.h" #include "thread_adapter.h" @@ -56,8 +58,8 @@ SafeModeManagerModel *SafeModeManagerModel::GetInstance(void) { static SafeModeManagerModel instance; return &instance; } - extern "C" { +#ifdef SUPPORT_CAT1_SERVICE #include "custom_http_download.h" errcode_t http_single_download_stop(void); @@ -97,7 +99,6 @@ static err_t httpc_download_file_recv_ui(httpc_state_t *connection, rx_len, rx_total_len, file_total_len); return 0; } - // uir: // http://snicker.com.cn:8089/FD230/V1.1.49/user/res/font_bin/ja.bin // 服务器:snicker.com.cn:8089 @@ -199,6 +200,9 @@ static bool download_repair_file(const char *uristr) { return true; } + +#endif + } /* ---------------------------------- map修改 --------------------------------- */ @@ -378,17 +382,21 @@ void SafeModeManagerModel::uapi_cat1_wakeup_cat1(bool wakeupstate) { //开始修复 bool SafeModeManagerModel::RepairStart() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Repair"); + #ifdef SUPPORT_CAT1_SERVICE if (download_repair_file(GetRepairUrl().c_str()) == false) { RepairEnd(); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RepairEnd"); return false; } + #endif return true; } // 0.下载失败 // 1.下载成功 bool SafeModeManagerModel::RepairEnd() { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RepairEnd"); + #ifdef SUPPORT_CAT1_SERVICE + if (GetRepairCount() != GetFilenamesCount()) { //下载失败 SetState(Safe_State::REPAIR_FILE, false); @@ -400,6 +408,7 @@ bool SafeModeManagerModel::RepairEnd() { SetState(Safe_State::REPAIR_FILE, true); uapi_dev_runtime_set_repair_download_status(2); } + #endif repair_count = 0; return true; } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h index e9170c6a5..bce192346 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h @@ -1,8 +1,8 @@ /* * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-30 18:29:43 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-28 19:55:18 + * @LastEditors: SnickerSun snickersun@163.com + * @LastEditTime: 2024-12-29 13:24:13 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h */ @@ -14,8 +14,9 @@ #include "system/include/SystemModel.h" #include "components/ui_radio_button.h" #include "KeyInputListener.h" +#ifdef SUPPORT_CAT1_SERVICE #include "../../../../../../zhihui/drivers/slip/cat1Service/cat1_ctl.h" - +#endif namespace OHOS { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h index b6854155b..3209b0f88 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/Systemupgrade.h @@ -1,3 +1,4 @@ +#ifdef SUPPORT_CAT1_SERVICE #ifndef SYSTEM_UPGRADE_VIEW_H #define SYSTEM_UPGRADE_VIEW_H @@ -132,4 +133,6 @@ namespace OHOS bool initViewStatus{false}; }; } // namespace OHOS -#endif \ No newline at end of file +#endif + +#endif diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemModel.cpp index dd492488b..8d015b796 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemModel.cpp @@ -9,15 +9,17 @@ #include #include "cJSON.h" #include "ConfigModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "lwip/err.h" +#include "lwip/apps/http_client.h" +#include "cat1_server.h" +#endif #include "power_display_service.h" #include "cmsis_os2.h" #include "los_memory.h" #include "thread_init.h" - #include "lwip/apps/http_client.h" - #include "tcxo.h" - #include "cat1_server.h" - #include "linux/delay.h" +#include "tcxo.h" +#include "linux/delay.h" #define UPDATAREPORT_M UPDATAREPORT diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp index 4fd654369..2284ccf2d 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp @@ -351,10 +351,12 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: OnSetUpView has nullptr"); return; } + #ifdef SUPPORT_CAT1_SERVICE if (SystemUpdateModel::GetInstance().IsLatestVersion() == false) // 如果不是最新系统版本出现小圆点 { NeedToUpdateImageinit(); } + #endif container_->Add(SystemScrollView[SYSTEMVIEW]); Draw(); } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp index 5182cda6d..5c63722ec 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/Systemupgrade.cpp @@ -1,3 +1,4 @@ +#ifdef SUPPORT_CAT1_SERVICE #include "system/include/Systemupgrade.h" #include "system/include/SystemPresenter.h" #include "wearable_log.h" @@ -9,14 +10,14 @@ #include "cJSON.h" #include "ConfigModel.h" #include "lwip/err.h" +#include "lwip/apps/http_client.h" +#include "cat1_server.h" #include "power_display_service.h" #include "cmsis_os2.h" #include "los_memory.h" #include "thread_init.h" - #include "lwip/apps/http_client.h" - #include "tcxo.h" - #include "cat1_server.h" - #include "linux/delay.h" +#include "tcxo.h" +#include "linux/delay.h" //http://r-oss.thisiot.com/device-ota/2024_05_06/1787425705369333762.fwpkg?Expires=1714998097&OSSAccessKeyId=LTAI5tJa2arDBmqSUsSTQJ1T&Signature=eLmtuPN10YXS8pNUtJO2E2vt%2FPM%3D @@ -949,4 +950,6 @@ namespace OHOS return scrollView; } -} \ No newline at end of file +} + +#endif diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateModel.cpp index ff99bf66d..099aa55be 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateModel.cpp @@ -22,7 +22,9 @@ #include "tcxo.h" #include "cat1_server.h" #include "linux/delay.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#endif #include "AppViewIDs.h" #include "NativeAbility.h" namespace OHOS diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateView.cpp index 30b97f7d0..c9bfb1e54 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateView.cpp @@ -1,8 +1,8 @@ /* * @Author: luozheng 1732036298@qq.com * @Date: 2024-05-07 11:25:58 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-11-05 14:48:11 + * @LastEditors: SnickerSun snickersun@163.com + * @LastEditTime: 2024-12-29 13:24:54 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateView.cpp */ @@ -28,8 +28,10 @@ #include "tcxo.h" #include "cat1_server.h" #include "linux/delay.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" #include "cat1_server_hal.h" +#endif #include "bts_le_gap.h" #include "custom_http_download.h" diff --git a/code/sdk/application/wearable/fd230/service/broadcast/include/broadcast_feature.h b/code/sdk/application/wearable/fd230/service/broadcast/include/broadcast_feature.h index 3c9fcf0f3..230fd4a72 100644 --- a/code/sdk/application/wearable/fd230/service/broadcast/include/broadcast_feature.h +++ b/code/sdk/application/wearable/fd230/service/broadcast/include/broadcast_feature.h @@ -19,7 +19,9 @@ extern "C" { #endif #endif +#ifdef SUPPORT_CAT1_SERVICE #define SUPPORT_CAT1_MODEM +#endif #ifndef BROADCAST_FEATURE_NAME #define BROADCAST_FEATURE_NAME "BROADCAST" diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp index 54fdec2fc..abc6a062e 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp @@ -34,7 +34,6 @@ #include "VolumeSettingPresenter.h" #include "PhoneService.h" #include "power_display_service.h" -#include "cat1_server.h" #include "testchanging.h" #include "message_notification.h" @@ -77,7 +76,10 @@ #include "main/include/PullUpDownView.h" #include "player/include/PlayersModelC.h" #include "system/include/SystemLogModelC.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" +#include "cat1_server.h" +#endif #include "ui_service.h" #include "UiConfig.h" diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp index 414dce23f..9315e93be 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp @@ -8,8 +8,11 @@ #include "bluetooth/include/BluetoothModel.h" #include "broadcast_feature.h" #include "broadcast_service.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" #include "cat1_server.h" +#include "lwip/apps/http_client.h" +#endif #include "components/ui_image_view.h" #include "components/ui_label_button.h" #include "components/ui_label_ext.h" @@ -18,7 +21,7 @@ #include "custom_runtime.h" #include "custom_utils.h" #include "graphic_service.h" -#include "lwip/apps/http_client.h" + #include "notification_manager.h" #include "samgr_lite.h" #include "system/include/SystemLogModel.h" diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/makephone_notification.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/makephone_notification.cpp index 6227bd2cc..895b881e7 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/makephone_notification.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/makephone_notification.cpp @@ -21,10 +21,10 @@ #ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" #include "cat1_ctl.h" +#include "cat1_server_hal.h" #endif #include "custom_runtime.h" -#include "cat1_server_hal.h" #include "custom_utils.h" #include "phoneaddressmodel.h" #include "components/ui_label_button.h" @@ -69,11 +69,14 @@ void sos_falg_add(void) { if(OHOS::get_sos_number_count()<=0) { + #ifdef SUPPORT_CAT1_SERVICE calldial_event_sendmsg_toUI("SOS"); + #endif return; } printf("sos dial %d\r\n",sos_dail_falg); + #ifdef SUPPORT_CAT1_SERVICE #if SOS_TEST_FLAG if(1) #else @@ -92,6 +95,12 @@ void sos_falg_add(void) { calldial_event_sendmsg_toUI("SOS"); } + #else + if(uapi_hfp_connect_state()) + { + DialCall((unsigned char *)OHOS::get_sos_number(sos_dail_falg),osal_strlen((const char*)OHOS::get_sos_number(sos_dail_falg))); + } + #endif sos_dail_falg++; if(sos_dail_falg>=OHOS::get_sos_number_count()*3) { @@ -109,9 +118,12 @@ void start_SOS_phone_dail(void) { if(OHOS::get_sos_number_count()<=0) { + #ifdef SUPPORT_CAT1_SERVICE calldial_event_sendmsg_toUI("SOS"); + #endif return; } + #ifdef SUPPORT_CAT1_SERVICE #if SOS_TEST_FLAG if(1) #else @@ -119,7 +131,7 @@ void start_SOS_phone_dail(void) #endif { calldial_event_sendmsg_toUI(OHOS::get_sos_number(0)); - sos_dail_falg=1; + sos_dail_falg=1; } #if SOS_HFP_FALG else if(uapi_hfp_connect_state()) @@ -132,6 +144,14 @@ void start_SOS_phone_dail(void) { calldial_event_sendmsg_toUI("SOS"); } + #else + if(uapi_hfp_connect_state()) + { + DialCall((unsigned char *)OHOS::get_sos_number(0),osal_strlen((const char*)OHOS::get_sos_number(0))); + sos_dail_falg=1; + } + + #endif } @@ -668,7 +688,9 @@ static void WaitingOpreate() // CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1); NotificationManager::GetInstance()->SetWatchCallStatus(true); + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup(); + #endif CustomEventPublish(TOPIC_EVENT_HFP_HINT,NULL,0); CallerLogModel::GetInstance()->set_RejectIncomingCall_falg(1); return; @@ -840,8 +862,9 @@ void CalldialTimerCallBackProc(int data) dail_falg++; if(dail_falg>=DIAL_TIME) { + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup_timer(); - + #endif // cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); } @@ -1918,9 +1941,10 @@ bool CallViewEventListener::OnClick(UIView& view, const ClickEvent& event) WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] start"); + #ifdef SUPPORT_CAT1_SERVICE incomedcall_event_sendmsg_toUI("ok"); - cat1_call_answer(); + #endif //#endif } @@ -1943,7 +1967,9 @@ bool CallViewEventListener::OnClick(UIView& view, const ClickEvent& event) // The watch rejects the call if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup(); + #endif addcalllog(); NotificationManager::GetInstance()->StopNotify(); @@ -1966,7 +1992,9 @@ bool CallViewEventListener::OnClick(UIView& view, const ClickEvent& event) if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { + #ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup(); + #endif NotificationManager::GetInstance()->StopNotify(); } diff --git a/code/sdk/build/config/target_config/brandy/config.py b/code/sdk/build/config/target_config/brandy/config.py index 84c680deb..01e90c16b 100644 --- a/code/sdk/build/config/target_config/brandy/config.py +++ b/code/sdk/build/config/target_config/brandy/config.py @@ -366,7 +366,6 @@ target = { ], #添加自定义应用 'ram_component': [ - #'baidumapsdk', 'audio_at_service', 'media_at_service', 'bt_manager_at_service', @@ -441,7 +440,7 @@ target = { 'MAG_MMC5603', 'ENABLE_VIBRATOR', # 'ENABLE_SLIP', - # 'CUSTOM_HID_SERVICE', + 'CUSTOM_HID_SERVICE', 'ENCODER_SUPPORT', 'SUPPORT_SPO2_NOTIFICATION', 'SUPPORT_SPO2_NOTIFICATION_TEST', @@ -455,9 +454,9 @@ target = { # 'SUPPORT_TCPIP', 'SUPPORT_HID_SERVICE', 'SUPPORT_BAIDU_MAP', - 'CFG_FLASH_SIZE=8', - # 'SUPPORT_BLE_SERVICE', - # 'FD230', + 'CFG_FLASH_SIZE=16', + 'SUPPORT_BLE_SERVICE', + 'FD230', #"MEM_CHECK", #'ENABLE_WEBSOCKET', 'SINGLE_USER_PARTITION', @@ -472,7 +471,6 @@ target = { 'NANDFLASH_DS35X' ], 'ram_component': [ - #'baidumapsdk', 'audio_at_service', 'media_at_service', 'bt_manager_at_service', @@ -484,7 +482,7 @@ target = { # "slip", # "cat1_service", "audio_manager", - # "CustomUIcomponentTool", + "CustomUIcomponentTool", "custom_utils", "custom_utilscpp", "custom_config", @@ -493,11 +491,11 @@ target = { "ppg_service", # "acc_sensor", "batterry_service", - # "bleservice", - # "ppgBleService", - # "blemoder", - # "factorytest_service", - # "hid_service", + "bleservice", + "ppgBleService", + "blemoder", + "factorytest_service", + "hid_service", "gnss", "gnss_sample", "cywee", @@ -512,7 +510,7 @@ target = { 'brandy-native-js-u8-r': { 'base_target_name': 'brandy-native-js-r', 'defines': ['FT_SINGLE_UART', - 'CFG_FLASH_SIZE=8', + 'CFG_FLASH_SIZE=16', 'SINGLE_USER_PARTITION', 'BOARD_U8', 'TPTYPE_CST86XX', @@ -525,7 +523,7 @@ target = { 'defines': ['ENABLE_ECC', 'CFG_DRIVERS_NANDFLASH', 'SINGLE_USER_PARTITION', - 'CFG_FLASH_SIZE=8', + 'CFG_FLASH_SIZE=16', 'FT_SINGLE_UART', 'BOARD_U8', 'NANDFLASH_DS35X' diff --git a/code/sdk/zhihui/services/ble_service/blemoder/bletest.cpp b/code/sdk/zhihui/services/ble_service/blemoder/bletest.cpp index dde3c7d09..21315ae6d 100644 --- a/code/sdk/zhihui/services/ble_service/blemoder/bletest.cpp +++ b/code/sdk/zhihui/services/ble_service/blemoder/bletest.cpp @@ -22,7 +22,9 @@ #include "phoneaddressmodel.h" #include "LanguageInit.h" #include "ConfigModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server.h" +#endif // #include "TraingCardPresenter.h" #include "../../../../../../zhihui/drivers/vibrator/service/vibrator_service.h" #include "../../../../../../zhihui/config/include/ConfigModelC.h" @@ -2506,7 +2508,9 @@ uint32_t ble_get_message_index() } void SendDtfmStrNumberToCat1(char ch) // ble发送单个字符到CAT1 DTMF功能 { + #ifdef SUPPORT_CAT1_SERVICE send_dtfm_number_toCat1(ch); + #endif } void ble_mp3_list_update(void) diff --git a/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c b/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c index ddeb388b9..64102142c 100644 --- a/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c +++ b/code/sdk/zhihui/services/factorytest_service/factorytest_protocol.c @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-06-17 14:31:08 * @LastEditors: SnickerSun snickersun@163.com - * @LastEditTime: 2024-12-29 13:11:17 + * @LastEditTime: 2024-12-29 20:45:38 * @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c * @Description: * @@ -23,9 +23,10 @@ #include "hx3695.h" #include "ppg_service.h" #include "button_porting.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_ctl.h" #include "cat1_server.h" - +#endif #ifdef PPG_HX3695 #include "hx3695_hrs_agc.h" #include "hx3695_spo2_agc.h" @@ -1738,8 +1739,9 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint for(int i = 0; i < 11; i++) phone_number[i] = data[i] + '0'; phone_number[11] = '\0'; - - cat1_call_dial(phone_number); +#ifdef SUPPORT_CAT1_SERVICE + cat1_call_dial(phone_number); +#endif factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST, BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1, 0x07, @@ -1751,8 +1753,9 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint //接听电话 uint8_t send_data = 0x00; +#ifdef SUPPORT_CAT1_SERVICE cat1_call_answer(); - +#endif factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST, BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1, 0x08, @@ -1762,8 +1765,9 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint { //挂断电话 uint8_t send_data = 0x00; +#ifdef SUPPORT_CAT1_SERVICE cat1_call_hungup(); - +#endif factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST, BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1, 0x09, @@ -1773,9 +1777,11 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint { //获取校准信息 uint8_t send_data = 0; +#ifdef SUPPORT_CAT1_SERVICE cat1_at_cmd("at*mrd_cdf=Q,LteCalData.nvm"); LOS_Msleep(500); ble_get_cat1_at_msg((char *)&send_data,1); +#endif if(send_data == '1') send_data = 1; else @@ -1789,9 +1795,11 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint { //设置强收模式 uint8_t send_data = 0; +#ifdef SUPPORT_CAT1_SERVICE cat1_at_cmd("at+QRFTESTMODE=1"); LOS_Msleep(500); ble_get_cat1_at_msg((char *)&send_data,1); +#endif if(atol(send_data) == 0) send_data = 1; else @@ -1806,9 +1814,11 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint //查询信号值 char buf[20] = {0}; uint8_t send_data[2] = {0}; +#ifdef SUPPORT_CAT1_SERVICE cat1_at_cmd("AT+QRXFTM=\"LTE BAND1\",300,\"on\",75"); LOS_Msleep(500); ble_get_cat1_at_msg(buf,20); +#endif sscanf(buf, "+QRXFTM: -%d,-%d", (int *)&send_data[0], (int *)&send_data[1]); factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST, BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1, @@ -1819,9 +1829,11 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint { //关闭强接受 uint8_t send_data = 0; +#ifdef SUPPORT_CAT1_SERVICE cat1_at_cmd("AT+QRXFTM=\"LTE BAND1\",300,\"off\",75"); LOS_Msleep(500); ble_get_cat1_at_msg((char *)&send_data,1); +#endif if(atol(send_data) == 0) send_data = 1; else diff --git a/code/sdk/zhihui/utils/custom_http_download.h b/code/sdk/zhihui/utils/custom_http_download.h index 76d72b605..8d4829bd6 100644 --- a/code/sdk/zhihui/utils/custom_http_download.h +++ b/code/sdk/zhihui/utils/custom_http_download.h @@ -5,8 +5,8 @@ extern "C" { #endif /* __cplusplus */ #include "errcode.h" +#ifdef SUPPORT_CAT1_SERVICE #include "lwip/apps/http_client.h" - /** * uint8_t *server, * uint16_t port, @@ -21,6 +21,7 @@ errcode_t http_single_download_start( uint8_t *server, uint16_t port,uint8_t *ur * stop函数要在result里面执行,表示下载结束 */ errcode_t http_single_download_stop(void); +#endif #ifdef __cplusplus