添加宏控制使得XTS可以编译通过 1770/1 1770/head
authorluozheng <1732036298@qq.com>
Tue, 20 May 2025 09:01:40 +0000 (17:01 +0800)
committerluozheng <1732036298@qq.com>
Tue, 20 May 2025 09:01:40 +0000 (17:01 +0800)
code/sdk/application/wearable/alipay/service/alipay_feature.c
code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/alipay/src/AlipayModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp
code/sdk/application/wearable/fd230/service/msg_center/include/notify/transmitting.h
code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/fd230/service/msg_center/src/notify/transmitting.cpp
code/sdk/zhihui/utils/custom_utils.c

index 8bf6585..ff219ef 100644 (file)
@@ -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__)
index df491d9..eeaf223 100644 (file)
@@ -24,7 +24,9 @@
 #include "sleep/include/SleepModel.h"\r
 #include "sleepmode/include/SleepModeModel.h"\r
 // #include "safemodemanager/include/SafeModeManagerModel.h"\r
+#ifdef SUPPORT_CAT1_SERVICE\r
 #include "cat1_server_hal.h"\r
+#endif\r
 #include "custom_runtime.h"\r
 #include "uiservice/include/ui_service.h"\r
 #include "power_display_service.h"\r
index 5142312..e583eed 100644 (file)
@@ -13,7 +13,9 @@
 \r
 #include "power_display_service.h"\r
 #include "custom_utils.h"\r
+#ifdef SUPPORT_BLE_SERVICE\r
 #include "bleService.h"\r
+#endif\r
 #include "ConfigModel.h"\r
 namespace OHOS {\r
 AlipayModel::AlipayModel() : alipayApi(alipay_svr_get_api())\r
@@ -78,6 +80,7 @@ void AlipayBindCallBackProc(void *argument)
         AlipayMainView::GetInstance()->ChangeView(currentView, ALIPAY_BIND_RES_VIEW);\r
     }\r
     else if (ALIPAY_INTER_STATUS_START_BINDING == status && reFlag == 1) {\r
+    #ifdef SUPPORT_BLE_SERVICE\r
         if(get_Alipay_ble_connect()==false)\r
         {\r
             disconnectfalg++;\r
@@ -95,6 +98,7 @@ void AlipayBindCallBackProc(void *argument)
 \r
               //AlipayModel::GetInstance()->ble_disconnect_AlipayStartBind();\r
         }\r
+    #endif\r
        \r
     }\r
 }\r
@@ -113,15 +117,16 @@ void AlipayBindCallBackProcdisconnect(void *argument)
     uint32_t reFlag = AlipayModel::GetInstance()->AlipayGetRefreshFlag();\r
 \r
     if (ALIPAY_INTER_STATUS_START_BINDING == status && reFlag == 1 ) {\r
+    #ifdef SUPPORT_BLE_SERVICE\r
     if(get_Alipay_ble_connect()==false)\r
     {\r
-\r
         AlipayModel::GetInstance()->AlipayStopBindTimer();\r
         AlipayModel::GetInstance()->AlipaySetBindFlag(false);\r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindCallBackProc ALIPAY_INTER_STATUS_BINDING_FAIL");\r
         AlipayModel::GetInstance()->AlipaySetRefreshFlag(0);\r
         AlipayMainView::GetInstance()->ChangeView(currentView, ALIPAY_BIND_RES_VIEW);\r
     }\r
+    #endif\r
        \r
     }\r
 }   \r
index 352a901..0e77b29 100644 (file)
@@ -44,7 +44,7 @@
 #include <sys/stat.h>\r
 #include <unistd.h>\r
 \r
-#include "battery_hal.h"\r
+// #include "battery_hal.h"\r
 \r
 #include "languagecode/LanguageInit.h"\r
 #include "ui_service.h"\r
index 3c16f7c..716e75b 100644 (file)
@@ -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
index b0ceb31..1ea0589 100644 (file)
 #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[] = {
index af543cf..d9be48f 100644 (file)
@@ -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<UIView::OnClickListener *>(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);
     }
index 5ee0b8c..f4cee04 100644 (file)
@@ -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;
 }