From 93556dee2e2ecbafa6c07eefe412a6a2e2424b4d Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Tue, 20 May 2025 17:01:40 +0800 Subject: [PATCH] =?utf8?q?=E6=B7=BB=E5=8A=A0=E5=AE=8F=E6=8E=A7=E5=88=B6?= =?utf8?q?=E4=BD=BF=E5=BE=97XTS=E5=8F=AF=E4=BB=A5=E7=BC=96=E8=AF=91?= =?utf8?q?=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../wearable/alipay/service/alipay_feature.c | 2 ++ .../src/AlarmClockTimerConfig.cpp | 2 ++ .../nativeui/alipay/src/AlipayModel.cpp | 7 ++++++- .../nativeui/heartrate/src/HeartModel.cpp | 2 +- .../msg_center/include/notify/transmitting.h | 2 ++ .../msg_center/src/msg_center_customer.cpp | 9 +++++++-- .../msg_center/src/notify/transmitting.cpp | 19 ++++++++++++++++--- code/sdk/zhihui/utils/custom_utils.c | 4 ++++ 8 files changed, 40 insertions(+), 7 deletions(-) diff --git a/code/sdk/application/wearable/alipay/service/alipay_feature.c b/code/sdk/application/wearable/alipay/service/alipay_feature.c index 8bf65855d..ff219ef30 100644 --- a/code/sdk/application/wearable/alipay/service/alipay_feature.c +++ b/code/sdk/application/wearable/alipay/service/alipay_feature.c @@ -24,7 +24,9 @@ #include "osal_msgqueue.h" #include "thread_init.h" #include "alipay_transit.h" +#ifdef SUPPORT_BLE_SERVICE #include "bleService.h" +#endif #include "alipay_bluetooth.h" #include "vendor_file.h" #if defined(__FREERTOS__) 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 df491d944..eeaf2237a 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 @@ -24,7 +24,9 @@ #include "sleep/include/SleepModel.h" #include "sleepmode/include/SleepModeModel.h" // #include "safemodemanager/include/SafeModeManagerModel.h" +#ifdef SUPPORT_CAT1_SERVICE #include "cat1_server_hal.h" +#endif #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/alipay/src/AlipayModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alipay/src/AlipayModel.cpp index 5142312e5..e583eeddb 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alipay/src/AlipayModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alipay/src/AlipayModel.cpp @@ -13,7 +13,9 @@ #include "power_display_service.h" #include "custom_utils.h" +#ifdef SUPPORT_BLE_SERVICE #include "bleService.h" +#endif #include "ConfigModel.h" namespace OHOS { AlipayModel::AlipayModel() : alipayApi(alipay_svr_get_api()) @@ -78,6 +80,7 @@ void AlipayBindCallBackProc(void *argument) AlipayMainView::GetInstance()->ChangeView(currentView, ALIPAY_BIND_RES_VIEW); } else if (ALIPAY_INTER_STATUS_START_BINDING == status && reFlag == 1) { + #ifdef SUPPORT_BLE_SERVICE if(get_Alipay_ble_connect()==false) { disconnectfalg++; @@ -95,6 +98,7 @@ void AlipayBindCallBackProc(void *argument) //AlipayModel::GetInstance()->ble_disconnect_AlipayStartBind(); } + #endif } } @@ -113,15 +117,16 @@ void AlipayBindCallBackProcdisconnect(void *argument) uint32_t reFlag = AlipayModel::GetInstance()->AlipayGetRefreshFlag(); if (ALIPAY_INTER_STATUS_START_BINDING == status && reFlag == 1 ) { + #ifdef SUPPORT_BLE_SERVICE if(get_Alipay_ble_connect()==false) { - AlipayModel::GetInstance()->AlipayStopBindTimer(); AlipayModel::GetInstance()->AlipaySetBindFlag(false); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindCallBackProc ALIPAY_INTER_STATUS_BINDING_FAIL"); AlipayModel::GetInstance()->AlipaySetRefreshFlag(0); AlipayMainView::GetInstance()->ChangeView(currentView, ALIPAY_BIND_RES_VIEW); } + #endif } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp index 352a90147..0e77b2952 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp @@ -44,7 +44,7 @@ #include #include -#include "battery_hal.h" +// #include "battery_hal.h" #include "languagecode/LanguageInit.h" #include "ui_service.h" diff --git a/code/sdk/application/wearable/fd230/service/msg_center/include/notify/transmitting.h b/code/sdk/application/wearable/fd230/service/msg_center/include/notify/transmitting.h index 3c16f7cd3..716e75bba 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/include/notify/transmitting.h +++ b/code/sdk/application/wearable/fd230/service/msg_center/include/notify/transmitting.h @@ -1,7 +1,9 @@ #ifndef TRANSMITTING_H #define TRANSMITTING_H #include "components/ui_image_animator.h" +#ifdef SUPPORT_BLE_SERVICE #include "bleInstruct.h" +#endif #include "components/ui_view_group.h" namespace OHOS 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 b0ceb311d..1ea0589d7 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,10 @@ #include "VolumeSettingPresenter.h" #include "VolumeSettingView.h" #include "pairing_notification.h" +#ifdef SUPPORT_BLE_SERVICE #include "bleInstruct.h" +#endif + #include "transmitting.h" namespace OHOS { @@ -215,6 +218,7 @@ void MsgCenterNotifyHfpWatchProc(const Topic topic, Request* req) void MsgCenterNotifyDeviceBindProc(const Topic topic, Request* req) { + #ifdef SUPPORT_BLE_SERVICE //unused(req); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyBindProc Bind!"); // const power_display_svr_api_t *display_api = power_display_svr_get_api(); @@ -287,10 +291,11 @@ void MsgCenterNotifyDeviceBindProc(const Topic topic, Request* req) } } - + #endif } void MsgCenterNotifybleTransmit(const Topic topic, Request* req) { + #ifdef SUPPORT_BLE_SERVICE unused(topic); uint8_t* data=(uint8_t*)req->data; @@ -320,7 +325,7 @@ void MsgCenterNotifybleTransmit(const Topic topic, Request* req) NotificationManager::GetInstance()->ShowNotify(showtransmitNotify, (uint16_t)topic, true); } // unused(req); - + #endif } /* 订阅事件通知逻辑可定制 */ static MsgCenterNotifyTable g_msgCenterNotifyTable[] = { diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/transmitting.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/transmitting.cpp index af543cfeb..d9be48f58 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/transmitting.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/transmitting.cpp @@ -6,12 +6,15 @@ #include "components/ui_label.h" #include "components/ui_label_ext.h" #include "components/ui_label_button_ext.h" -#include "battery_service.h" +#ifdef SUPPORT_BLE_SERVICE +// #include "battery_service.h" +#include "bleEvent.h" +#include "bleInstruct.h" +#endif #include "NativeAbility.h" #include "custom_utils.h" #include "components/ui_slider.h" // #include "UiConfig.h" -#include "bleEvent.h" #include "power_display_service.h" #include "uicomponents/UIComponents.h" #include "upg.h" @@ -19,7 +22,6 @@ #include "PhoneService.h" #include "ConfigModelC.h" #include "ConfigModel.h" -#include "bleInstruct.h" #include "transmitting.h" // #include "languagecode/LanguageInit.h" namespace OHOS @@ -172,6 +174,7 @@ namespace OHOS static void OTATimerCallBackProc(int data) { + #ifdef SUPPORT_BLE_SERVICE #if 0 if(updatasider) updatasider->SetValue(test_flag++); @@ -181,6 +184,7 @@ namespace OHOS #endif if(updatasider) updatasider->Invalidate(); + #endif } void OTATimerCallBack(int data) @@ -277,7 +281,9 @@ namespace OHOS uint32_t tick; osStatus_t retTimer; + #ifdef SUPPORT_BLE_SERVICE Set_OTA_recv_value(); + #endif if(transmitting_timer!=NULL) { osTimerStop(transmitting_timer); @@ -303,6 +309,7 @@ namespace OHOS void get_updatafail_data(void) { + #ifdef SUPPORT_BLE_SERVICE errcode_t ret; ret = uapi_upg_get_result(&upg_result, &last_image_index); if (ret != ERRCODE_SUCC) { @@ -322,6 +329,7 @@ namespace OHOS } } + #endif } void Creat_OTA_Updata_FAIL() @@ -1268,6 +1276,8 @@ namespace OHOS UIViewGroup_transmitting->RemoveAll(); } uapi_dev_runtime_set_transmitting_status(1); + + #ifdef SUPPORT_BLE_SERVICE switch (Transmitting_falg) { case TRANS_DIAL_TRANSMITTING: @@ -1338,6 +1348,7 @@ namespace OHOS // } } + #endif UIView::OnClickListener *button1Click = static_cast(transmittingViewEventListener::GetInstance()); UIViewGroup_transmitting->SetOnClickListener(button1Click); @@ -1375,6 +1386,7 @@ namespace OHOS bool transmittingViewEventListener::OnClick(UIView& view, const ClickEvent& event) { + #ifdef SUPPORT_BLE_SERVICE WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnClick"); if(Transmitting_falg!=TRANS_DIAL_TRANSMITTING && Transmitting_falg!=TRANS_OTA_TRANSMITTING @@ -1384,6 +1396,7 @@ namespace OHOS { NotificationManager::GetInstance()->StopNotify(); } + #endif return true; UNUSED(event); } diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index 5ee0b8ccc..f4cee04a4 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -498,13 +498,17 @@ bool stop_custom_ble_service(void) bool start_alipay_ble_service(void) { /* 支付宝运行时,需要保证在广播状态,方便支付宝链接*/ + #ifdef SUPPORT_BLE_SERVICE ble_avd_mode_change(1); + #endif return true; } bool stop_alipay_ble_service(void) { /* 支付宝退出后,需要恢复原来的广播状态 */ + #ifdef SUPPORT_BLE_SERVICE ble_avd_mode_change(0); + #endif return true; } -- 2.17.1