添加xts编译下的宏控制 2025/1
authorluozheng <1732036298@qq.com>
Thu, 31 Jul 2025 07:41:03 +0000 (15:41 +0800)
committerluozheng <1732036298@qq.com>
Thu, 31 Jul 2025 07:41:03 +0000 (15:41 +0800)
49 files changed:
code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a
code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodOxygenModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/clock/src/MainClockView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/health/CheckAbnormalPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/include/HeartResultPresenter.h
code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartResultPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainPresenterSample.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialBoxProgressModel.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPower.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerMapper.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStandby.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStr.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatPresenter.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp
code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp
code/sdk/application/wearable/fd230/service/alipay_msg/CMakeLists.txt
code/sdk/application/wearable/fd230/service/alipay_msg/alipay_app.cpp
code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a
code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/fd230/service/msg_center/src/notify/charge_notification.cpp
code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp
code/sdk/application/wearable/fd230/service/msg_center/src/notify/findwatch_notification.cpp
code/sdk/application/wearable/fd230/service/msg_center/src/notify/goal_notification.cpp
code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a
code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a
code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a
code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a
code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a
code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a
code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h
code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a
code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a
code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a
code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a [new file with mode: 0644]
code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a
code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a
code/sdk/zhihui/services/ble_service/transspecard/transspecard.h
code/sdk/zhihui/utils/custom_utils.c

index b1ab9d2..e3ce469 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a differ
index ba3a83e..82ac589 100644 (file)
@@ -48,7 +48,9 @@
 #include "takephotos/include/TakephotosModel.h"
 #include "message/include/MessageModel.h"
 #include "assistant/include/AssistantModel.h"
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 #include "main/include/dial/DialModelCharge.h"
 #include "schedule/include/ScheduleModel.h"
 #include "sleep/include/SleepModel.h"
@@ -134,12 +136,14 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode)
         RebootAndShutdownModel::GetInstance().RegisterAllKeyEvents();
 
         // 开机检测充电状态
+        #ifdef SUPPORT_BATTERY_SERVICE
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "get_charge_stat is %d", get_charge_stat());
         if (get_charge_stat())
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Power is Charging!");
             DialModelCharge::GetInstance()->UpdatechargeStatus(1);
         }
+        #endif
 
         /*开机读取天气历史数据*/
         C_ScheduleDataReadFromFile();
index 8071cb6..38e4924 100644 (file)
@@ -14,7 +14,9 @@
 #include "NativeRegisterManager.h"
 
 #include "health/health_service/health_service.h"
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 #include "ConfigModelC.h"
 #include "ConfigModel.h"
 #include <custom_utils.h>
@@ -145,7 +147,10 @@ REGIST_SLICE(VIEW_APPLIST, ApplistView, ApplistPresenter);
         if (viewId < VIEW_MAX_INTER_APP)
         {
             /*心率Slice需要增加特殊配置*/
-            bool isCharging = get_charge_stat(); // 获取充电状态
+            bool isCharging = false;
+            #ifdef SUPPORT_BATTERY_SERVICE
+            isCharging = get_charge_stat(); // 获取充电状态
+            #endif
             if (isCharging && viewId == VIEW_HEART_CHART)
             {
                 HealthState highHealthState;
index 2e117ce..c0c0f81 100644 (file)
@@ -18,7 +18,9 @@
 #include "ConfigModel.h"
 #include "main/include/MainViewSample.h"
 #include "NativeAbility.h"
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 #include "health/BloodCardView.h"
 
 #include <custom_save_runtime.h>
@@ -63,8 +65,8 @@ void BloodOxygenModel::ClearDisplayData() {
 void BloodOxygenModel::Blood_Control(BloodState state) {
   if (state == BloodState::End && startspo2 == true) {
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "startspo2 End");
-    uint16_t md = PPG_SERVICE_CMD_TYPE_STOP_SPO2_TEST;
 #ifdef SUPPORT_PPG_SERVICE
+    uint16_t md = PPG_SERVICE_CMD_TYPE_STOP_SPO2_TEST;
     send_ppg_cmd_msg(md);
 #endif
     startspo2 = false;
@@ -74,14 +76,17 @@ void BloodOxygenModel::Blood_Control(BloodState state) {
     blood_stop_data_timer();
   } else if (state == BloodState::Start && startspo2 == false) {
     /*充电状态下不进行检测*/
-    bool isCharging = get_charge_stat(); // 获取充电状态
+    bool isCharging =false;
+    #ifdef SUPPORT_BATTERY_SERVICE
+    isCharging = get_charge_stat(); // 获取充电状态
+    #endif
     if (isCharging) {
       WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "充电不能检测");
       return;
     }
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "startspo2 Start");
-    uint16_t md = PPG_SERVICE_CMD_TYPE_DO_SPO2_TEST;
 #ifdef SUPPORT_PPG_SERVICE
+    uint16_t md = PPG_SERVICE_CMD_TYPE_DO_SPO2_TEST;
     send_ppg_cmd_msg(md);
 #endif
     startspo2 = true;
index 7407406..d27e9ca 100644 (file)
@@ -44,7 +44,9 @@
 #include "cywee_service.h"
 #endif
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 
 #include "health/health_service/health_service.h"
 
@@ -140,7 +142,11 @@ namespace OHOS
         if (strcmp(view.GetViewId(), CLICK_BLOOD) == 0)
         {
             // 如果正在充电进入提醒界面
-            if (get_charge_stat())
+            bool isCharging = false;
+            #ifdef SUPPORT_BATTERY_SERVICE
+            isCharging = get_charge_stat();
+            #endif
+            if (isCharging)
             {
                 HealthState highHealthState;
                 highHealthState.checkType = CHARGE;
index f361413..0f8b47a 100644 (file)
@@ -15,7 +15,6 @@
 #include "main/include/MainModel.h"
 #include "main/include/MainPresenterSample.h"
 #include "set_dial/include/SetDialModel.h"
-#include "battery_hal.h"
 #include "common/image_cache_manager.h"
 #include "components/ui_label.h"
 #include "custom_runtime.h"
  #include <sys/stat.h>
  #include <time.h>
  #include <unistd.h>
- 
- #include "battery_hal.h"
- extern uint8_t battery_get_voltage(float *voltage);
+#ifdef SUPPORT_BATTERY_SERVICE
+#include "battery_hal.h"
+extern uint8_t battery_get_voltage(float *voltage);
+#endif
  
  #define TIMEVIEW_UP 0
  #define TIMEVIEW_DOWN 1
  
          UpdateBatteryColor();  
  
-         float voltage = 0.0F;  
-         int power = battery_get_voltage(&voltage);  
+         float voltage = 0.0F;
+         int power = 0;  
+         #ifdef SUPPORT_BATTERY_SERVICE
+         power = battery_get_voltage(&voltage);
+         #endif
          if (power == power_)  
              return;  
  
  
      void MainClockView::UpdateBatteryColor(void)
      {
-         bool isCharging = get_charge_stat(); // 获取充电状态
- 
+        bool isCharging = false;
+        #ifdef SUPPORT_BATTERY_SERVICE 
+        isCharging = get_charge_stat(); // 获取充电状态
+        #endif
+
          if (isCharging)
          {
              if (!isBatteryIconVisible)
index 41359c6..2b9441c 100644 (file)
@@ -53,7 +53,9 @@
 #include "main/include/MainModel.h"
 #include "health/health_service/health_service.h"
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 
 #include "NativeRegisterManager.h"
 
@@ -100,7 +102,10 @@ namespace OHOS
         if (strcmp(view.GetViewId(), CLICK_BLOOD_RE) == 0)
         {
             // 检测过程中充电 失败可以弹窗
-            bool isCharging = get_charge_stat(); // 获取充电状态
+            bool isCharging = false;
+            #ifdef SUPPORT_BATTERY_SERVICE
+            isCharging = get_charge_stat(); // 获取充电状态
+            #endif
 
             if (isCharging)
             {
index d2e4c1d..6f322e0 100644 (file)
@@ -51,7 +51,9 @@
 #include <sys/stat.h>\r
 #include <unistd.h>\r
 \r
+#ifdef SUPPORT_BATTERY_SERVICE\r
 #include "battery_hal.h"\r
+#endif\r
 \r
 #include "languagecode/LanguageInit.h"\r
 #include "uiservice/include/ui_service.h"\r
@@ -457,7 +459,10 @@ void HeartModel::Heart_Control(HeartState state, HeartCheck check) {
     heart_stop_data_timer(); //关闭数据获取\r
   } else if (state == HeartState::Start && heartstate == false) {\r
     /*充电状态下不进行检测*/\r
-    bool isCharging = get_charge_stat(); // 获取充电状态\r
+    bool isCharging = false;\r
+    #ifdef SUPPORT_BATTERY_SERVICE\r
+    isCharging = get_charge_stat(); // 获取充电状态\r
+    #endif\r
     if (isCharging) {\r
       WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "充电不能检测");\r
       return;\r
index 355a453..839e0e4 100644 (file)
@@ -43,7 +43,9 @@
 #include "cywee_service.h"
 #endif
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 
 #include "health/health_service/health_service.h"
 #include "NativeRegisterManager.h"
@@ -142,7 +144,10 @@ namespace OHOS
         if (strcmp(view.GetViewId(), CLICK_HEART) == 0)
         {
             // 如果正在充电进入提醒界面
-            bool isCharging = get_charge_stat();
+            bool isCharging = false;
+            #ifdef SUPPORT_BATTERY_SERVICE
+            isCharging = get_charge_stat();
+            #endif
             // bool isCharging = false;
             if (isCharging)
             {
index 3346ff2..41f21ee 100644 (file)
@@ -208,7 +208,11 @@ if (ConfigModel::GetInstance()->GetisFirstTimeStart() == true) {
             MainModel::GetInstance().SetFromSetCardView(true);
             MainModel::GetInstance().SetFromCardId(BLOODOXGEN);
             // 如果正在充电进入提醒界面
-            if (get_charge_stat())
+            bool isCharging = false;
+            #ifdef SUPPORT_BATTERY_SERVICE
+            isCharging = get_charge_stat();
+            #endif
+            if (isCharging)
             {
                 HealthState highHealthState;
                 highHealthState.checkType = CHARGE;
index 5cb89f8..40ad29d 100644 (file)
@@ -2,7 +2,9 @@
 #include "main/include/dial/DialBoxProgressView.h"
 #include "wearable_log.h"
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 extern uint8_t battery_get_voltage(float *voltage);
 
 // 定义电量宏
@@ -52,7 +54,10 @@ uint32_t DialBoxProgressModel::ExtractValue(uint32_t rawData) {
 
 
 void DialBoxProgressModel::UpdateBatteryColor( float value_) {
-  bool isCharging = get_charge_stat(); // 获取充电状态
+  bool isCharging = false;
+  #ifdef SUPPORT_BATTERY_SERVICE
+  isCharging = get_charge_stat(); // 获取充电状态
+  #endif
 
   if (isCharging) {
     SetViewColor(Color::Green().full); // 充电状态为绿色
index 6db064d..cb32145 100644 (file)
@@ -25,7 +25,9 @@
 #include <string>
 #include "wearable_log.h"
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 extern uint8_t battery_get_voltage(float *voltage);
 
 REGIST_DIAL_MODULE(OHOS::DialDataType::BATTERY, OHOS::DialModelPower::GetInstance());
@@ -37,7 +39,10 @@ namespace OHOS
         (void)type;
 
         float voltage = 0.0F;
+        power_ = 0;
+        #ifdef SUPPORT_BATTERY_SERVICE
         power_ = battery_get_voltage(&voltage);
+        #endif
         out = static_cast<float>(power_);
         return true;
     }
index 278ec65..80044c3 100644 (file)
@@ -6,7 +6,9 @@
 #include "wearable_log.h"
 #include <string>
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 extern uint8_t battery_get_voltage(float *voltage);
 
 REGIST_DIAL_MODULE(OHOS::DialDataType::BATTERY_LEVEL,
@@ -16,7 +18,10 @@ namespace OHOS {
 bool DialModelPowerMapper::GetDialFloatData(DialDataType &type, float &out) {
   (void)type;
   float voltage = 0.0F;
+  powermapper_ = 0;
+  #ifdef SUPPORT_BATTERY_SERVICE
   powermapper_ = battery_get_voltage(&voltage);
+  #endif
   //电量0~100
   //映射0~1
   powermapper_ = static_cast<float>(powermapper_) / 100.0f;
index 7a61675..9046431 100644 (file)
@@ -8,7 +8,10 @@
 #include "wearable_log.h"
 #include <string>
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
+
 extern uint8_t battery_get_voltage(float *voltage);
 
 REGIST_DIAL_MODULE(OHOS::DialDataType::POWER_STANDBY,
@@ -20,7 +23,10 @@ bool DialModelPowerStanby::GetDialFloatData(DialDataType &type, float &out) {
 #if 1
   (void)type;
   float voltage = 0.0F;
+  PowerStanby_ = 0;
+  #ifdef SUPPORT_BATTERY_SERVICE
   PowerStanby_ = battery_get_voltage(&voltage);
+  #endif
 
   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Battery voltage obtained: %.2f",
                 voltage);
index 93a336f..0f858b7 100644 (file)
@@ -1,7 +1,9 @@
 #include "main/include/dial/DialModelPowerStr.h"
 #include "main/include/dial/RegisterDialModel.h"
 #include "wearable_log.h"
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
+#endif
 extern uint8_t battery_get_voltage(float *voltage);
 
 namespace OHOS
@@ -12,7 +14,10 @@ namespace OHOS
     {
         (void)type;
         float voltage = 0.0F;
-        uint8_t power_ = battery_get_voltage(&voltage);
+        uint8_t power_ = 0;
+        #ifdef SUPPORT_BATTERY_SERVICE
+        power_ = battery_get_voltage(&voltage);
+        #endif
         dialPowerStr_ = std::to_string(power_) + "%";
         out = &dialPowerStr_;
         strNum = 1;
index b679c0d..de77a1e 100644 (file)
@@ -5,7 +5,9 @@
 #include "NativeAbility.h"\r
 #include "common/key_code.h"\r
 #include "cmsis_os.h"\r
+#ifdef SUPPORT_BATTERY_SERVICE\r
 #include "battery_hal.h"\r
+#endif\r
 #include "custom_utils.h"\r
 #include "saveele/include/SaveBatPresenter.h"\r
 #include "saveele/include/SaveBatView.h"\r
index 63f34ba..2253a12 100644 (file)
@@ -10,7 +10,9 @@
 #include <iostream>\r
 #include <chrono>\r
 #include <thread>\r
+#ifdef SUPPORT_BATTERY_SERVICE\r
 #include "battery_hal.h"\r
+#endif\r
 #include "string"\r
 #include "custom_utils.h"\r
 #include "UiConfig.h"\r
@@ -464,7 +466,10 @@ namespace OHOS
 \r
         // 获取电量值\r
         float voltage = 0.0F;\r
-        uint8_t value = battery_get_voltage(&voltage);\r
+        uint8_t value = 0;\r
+        #ifdef SUPPORT_BATTERY_SERVICE\r
+        value = battery_get_voltage(&voltage);\r
+        #endif\r
 \r
         // 更新界面组件\r
         timelabel->SetText(stringtime.c_str());\r
index 5c275ad..8eb7cf3 100644 (file)
@@ -7,7 +7,9 @@
 #include "bleService.h"\r
 #endif\r
 \r
+#ifdef SUPPORT_BATTERY_SERVICE\r
 #include "battery_hal.h"\r
+#endif\r
 \r
 #include "UiConfig.h"\r
 #include "common/screen.h"\r
index 48eaa0a..b26a145 100644 (file)
@@ -1708,6 +1708,7 @@ std::string TraingModel::GetPaceTablePath(uint32_t timestamp) {
 }
 /*发送实时数据*/
 void TraingModel::SendLiveData() {
+  #ifdef SUPPORT_BLE_SERVICE
   msg_get_train_data_info_t data;
   memset(&data, 0, sizeof(msg_get_train_data_info_t));
   WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "sportdata->starttime %d \r\n",
@@ -1722,6 +1723,7 @@ void TraingModel::SendLiveData() {
   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SendLiveData Begin!");
   sendtraningdata(&data); // 发送数据函数
   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SendLiveData Stop!");
+  #endif
 }
 /* -------------------------------- 运动识别发起处理
  * -------------------------------- */
index 2961891..01b067d 100644 (file)
@@ -10,6 +10,7 @@ set(PRIVATE_HEADER
     ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils
     ${ROOT_DIR}/include/middleware/services/bts/br
     ${ROOT_DIR}/include/middleware/services/bts/common
+    ${ROOT_DIR}/zhihui/services/ble_service/transspecard/
 )
 
 set(SOURCES
index 38b82aa..dcd1e1e 100644 (file)
@@ -21,7 +21,6 @@
 #ifdef __cplusplus\r
 extern "C" {\r
 #endif\r
-#include "transspecard.h"\r
 \r
 #define HOSTENT_TIMEOUT 2000\r
 #define TCP_CONNECT_TIMEOUT 2000\r
@@ -37,7 +36,10 @@ uint16_t g_tcp_data_readed = 0;
 uint32_t g_tcp_fd = 0;\r
 uint8_t g_netstatus = 0;\r
 \r
+#ifdef SUPPORT_BLE_SERVICE\r
 #define ALIPAY_TRANSSPECARD_SUPPORT_BLE 1\r
+#include "transspecard.h"\r
+#endif\r
 void msg_center_alipay_reply_ack(uint8_t cmd_id, uint8_t type)\r
 {\r
     uint8_t ack = 1; /* 与手机APK侧约定 */\r
index 0e24be7..b1e105a 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a differ
index e5f3874..8a8df79 100644 (file)
@@ -441,6 +441,7 @@ void MsgCenterNotifybleTransmit(const Topic topic, Request* req)
 
 void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req)
 {
+    #ifdef SUPPORT_BATTERY_SERVICE
     unused(req);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger Plug !");
 #ifdef SYSTEM_LOG_SERVICE
@@ -481,11 +482,13 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req)
             NotificationManager::GetInstance()->ShowNotify(ShowChargeingNotify, (uint16_t)topic, true);
         }
     }
+    #endif
 }
 
 /*充电器已拔掉*/
 void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req)
 {
+    #ifdef SUPPORT_BATTERY_SERVICE
     unused(req);
     unused(topic);
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger UnPlug !");
@@ -515,6 +518,7 @@ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req)
             NotificationManager::GetInstance()->StopNotify();
         }
     }
+    #endif
 }
 
 /*低电量提醒*/
index f808c4f..45155ee 100644 (file)
@@ -6,13 +6,15 @@
 #include "components/ui_label.h"
 #include "components/ui_label_ext.h"
 #include "components/ui_label_button_ext.h"  
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_service.h"
+#include "battery_hal.h"
+#endif
 #include "NativeAbility.h"
 #include "custom_utils.h"
 #include "cmsis_os2.h"
 #include "linux/delay.h"
 #include "components/ui_circle_progress.h"
-#include "battery_hal.h"
 #include "uicomponents/UIComponents.h"
 #include "charge_notification.h"
 
@@ -64,7 +66,10 @@ namespace OHOS
       }
 
       float voltage = 0.0F;
-      uint8_t power = battery_get_voltage(&voltage);
+      uint8_t power = 0;
+      #ifdef SUPPORT_BATTERY_SERVICE
+      power = battery_get_voltage(&voltage);
+      #endif
 
       // 使用 std::to_string 生成电池电量字符串
       std::string powerstr = std::to_string(power) + "%";
@@ -185,7 +190,9 @@ namespace OHOS
         
         float voltage = 0.0F;
         uint8_t power = 0;
+        #ifdef SUPPORT_BATTERY_SERVICE
         power = battery_get_voltage(&voltage);
+        #endif
       
         char buf[16]={0};
         sprintf(buf,"%d%c",power,'%');
@@ -441,7 +448,9 @@ namespace OHOS
             if(timer_falg_low_power==0)
             {
                 alarm_UILabel->SetVisible(false);
+                #ifdef SUPPORT_BATTERY_SERVICE
                 low_power_play_toUI(3);
+                #endif
             }
            
         }
@@ -462,7 +471,9 @@ namespace OHOS
             return ;
         }
         ShutDownImageAnimatorView->Start();
+        #ifdef SUPPORT_BATTERY_SERVICE
         set_lowpower_show(1,0);
+        #endif
 
 
         
@@ -470,7 +481,7 @@ namespace OHOS
 
     UIViewGroup *lowPowerShow()
     {
-    
+
         if (UIViewGroup_lowpower == nullptr) {
             UIViewGroup_lowpower = new UIViewGroup();
             UIViewGroup_lowpower->SetPosition(0, 0, 466, 466);
@@ -514,7 +525,9 @@ namespace OHOS
             alarm_UILabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
             alarm_UILabel->SetRollSpeed(0);
             alarm_UILabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            #ifdef SUPPORT_BATTERY_SERVICE
             set_lowpower_show(0,0);
+            #endif
         }
         // Set additional property
         if(battery_falg==1)
index 6734006..55cb694 100644 (file)
 #include "bleInstruct.h"
 #endif
 
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_hal.h"
 #include "battery_service.h"
+#endif
 
 #ifdef SUPPORT_CAT1_SERVICE
 #include "cat1_tcpServer.h"
@@ -235,6 +237,7 @@ namespace OHOS
 
     static std::string getCurrentWatchadvdata()
     {
+        #ifdef SUPPORT_BLE_SERVICE
         uint32_t len = 64;
         char *buf_advdata = (char *)malloc(len);
 
@@ -248,10 +251,13 @@ namespace OHOS
 
         free(buf_advdata);
         return (str);
+        #endif
+        return "bt service not support";
     }
 
     std::string DebugOutputViewEventListener::get_bt_runtime_status_t(void)
     {
+        #ifdef SUPPORT_BLE_SERVICE
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DebugOutputViewEventListener::get_bt_runtime_status_t");
         std::string result = "bt_powerOn:" + std::to_string(uapi_dev_runtime_get_bt_powerstat()) + " ";
         result += "bt_ble_connectstat:" + std::to_string(get_ble_connect()) + " ";
@@ -265,6 +271,8 @@ namespace OHOS
         // 蓝牙ble广播开关,基础信息如,地址,广播状态
 
         return result;
+        #endif
+        return "bt service not support";
     }
 
     std::string DebugOutputViewEventListener::get_cat1_runtime_status_t(void)
@@ -384,6 +392,7 @@ namespace OHOS
     // 获取电池相关信息
     std::string DebugOutputViewEventListener::get_battery_info()
     {
+        #ifdef SUPPORT_BATTERY_SERVICE
         // 获取电池温度
         float bat_temp = 0.0f;
         batteryservice_get_battery_temp(&bat_temp);
@@ -411,6 +420,8 @@ namespace OHOS
             << "Charge: " << (isCharging ? "Yes" : "No");
 
         return oss.str();
+        #endif
+        return "battery service not support";
     }
 
     // 获取死机列表
@@ -511,6 +522,7 @@ namespace OHOS
     // 获取电池状态
     std::string DebugOutputViewEventListener::get_battery_percent(void)
     {
+        #ifdef SUPPORT_BATTERY_SERVICE
         std::string result;
         std::string charge_stat;
         int index = 0;
@@ -632,6 +644,8 @@ namespace OHOS
         }
         free(data);
         return result; // 返回结果字符串
+        #endif
+        return "battery service not support";
     }
 
     // 获取系统free内存
@@ -850,8 +864,9 @@ namespace OHOS
         {
             // if (BluetoothModel::GetInstance()->GetAdvStartState() == false) // 如果广播是关的就去开启广播
             //     BleAdvStart();
-
+            #ifdef SUPPORT_BLE_SERVICE
             svr_ble_adv_start();
+            #endif
             return true;
         }
         else if (viewId == DEBUGOUTPUTLABELBUTTON) // 点击的是刷新按钮
@@ -867,7 +882,9 @@ namespace OHOS
                 {
                     // toggleButton->SetState(false);
                     SystemLogModel::GetInstance()->set_uart_status(false);
+                    #ifdef SUPPORT_CAT1_SERVICE
                     remove_debug_vote(); // 关闭uart的同时也取消 debug的投票,保证关闭开关后可以正常休眠
+                    #endif
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uart_at_set false");
                 }
                 else
@@ -912,13 +929,17 @@ namespace OHOS
             {
                 if (toggleButtonOffline->GetState() == false)
                 {
+                    #ifdef SUPPORT_PPG_SERVICE
                     send_ppg_cmd_msg(PPG_SERVICE_CMD_TYPE_CLOSE_HRS_BLE);
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hrs_ble_switch false");
+                    #endif
                 }
                 else
                 {
+                    #ifdef SUPPORT_PPG_SERVICE
                     send_ppg_cmd_msg(PPG_SERVICE_CMD_TYPE_OPEN_HRS_BLE);
                     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hrs_ble_switch true");
+                    #endif
                 }
             }
             else
@@ -952,7 +973,9 @@ namespace OHOS
         }
         else if (viewId == "CAT1_UPDATA")
         {
+            #ifdef SUPPORT_CAT1_SERVICE
             Cat1_OTA(CAT1_TCP_START_OTA);
+            #endif
         }
         else if (viewId == NEXTORPREPAGELABELBUTTON)
         {
index 7dfe823..3377932 100644 (file)
@@ -4,7 +4,6 @@
 #include <iostream>
 #include "uiservice/include/ui_service.h"
 #include <graphic_service.h>
-#include "bleEvent.h"
 #include <UiConfig.h>
 #include <power_display_service.h>
 #include "ConfigModel.h"
@@ -17,6 +16,9 @@
 #include <custom_save_runtime.h>
 #include "findwatch_notification.h"
 
+#ifdef SUPPORT_BLE_SERVICE
+#include "bleEvent.h"
+#endif
 namespace OHOS
 {
     UIViewGroup *FindWatchGroupView{nullptr};
index f56113b..00b66fb 100644 (file)
@@ -20,7 +20,9 @@
 
 #include "ConfigModel.h"
 #include "uicomponents/UIComponents.h"
+#ifdef SUPPORT_BATTERY_SERVICE
 #include "battery_service.h"
+#endif
 #include "upg.h"
 #include "custom_runtime.h"
 #include "vibrator/service/vibrator_service.h"
index 55d7365..e3ce469 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a differ
index 0e24be7..b1e105a 100644 (file)
Binary files a/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a differ
index c029576..ce395f7 100644 (file)
Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a differ
index 73a22fc..a731301 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a differ
index 73a22fc..7337ef0 100644 (file)
Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a differ
index 5b7a503..8864f8e 100644 (file)
Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a differ
index aa77c68..9d278be 100644 (file)
Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a differ
index 42c1220..ef1e3bc 100644 (file)
@@ -150,12 +150,14 @@ public:
 
     virtual uint16_t GetScreenWidth()
     {
-        return width_;
+        // return width_;
+        return HORIZONTAL_RESOLUTION;
     }
 
     virtual uint16_t GetScreenHeight()
     {
-        return height_;
+        // return height_;
+        return VERTICAL_RESOLUTION;
     }
 
     virtual void SetScreenShape(ScreenShape screenShape)
index 319a378..ef8c37d 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a differ
index 319a378..1c08fcb 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a differ
index b9ee512..00beb36 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a differ
index b9ee512..50e244a 100644 (file)
Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a differ
index 8279bdf..b294a76 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a differ
index f829a58..e807091 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a
new file mode 100644 (file)
index 0000000..cdfdb31
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a
new file mode 100644 (file)
index 0000000..b9c1bb0
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a differ
diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a
new file mode 100644 (file)
index 0000000..93b5e6f
Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a differ
index ac4194c..f262ad8 100644 (file)
Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a differ
index 00de31c..bafd4fc 100644 (file)
Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a differ
index e5fd09b..5c90c86 100644 (file)
@@ -11,7 +11,9 @@ extern "C"
 #include "stdbool.h"
 #include "bts_def.h"
 #include "errcode.h"
-#include <bleEvent.h>
+#ifdef SUPPORT_BLE_SERVICE
+#include "bleEvent.h"
+#endif
 
 #define ALIPAY_TRANSSPECARD 0x09
 
index 0829d14..d1e863d 100644 (file)
@@ -1559,7 +1559,9 @@ void uapi_set4GCapability(bool isopen)
         }
 
         // uapi_save_runtime_log(RUNTIME_LOG_CAT1_4G_OPEN);
+        #ifdef SUPPORT_CAT1_SERVICE
         power_on_cat1();
+        #endif
         // if(!uapi_dev_runtime_get_saveele_status())
         {
             uapi_dev_runtime_set_cat1_powerstat(1);
@@ -1593,7 +1595,9 @@ void uapi_set4GCapability(bool isopen)
             return;
         }
         // uapi_save_runtime_log(RUNTIME_LOG_CAT1_4G_CLOSE);
+        #ifdef SUPPORT_CAT1_SERVICE
         power_off_cat1();
+        #endif
         // if(!uapi_dev_runtime_get_saveele_status())
         {
             uapi_dev_runtime_set_cat1_powerstat(0);
@@ -2760,17 +2764,23 @@ void uapi_enter_power_saving_mode(void)
     //关闭cat1
     if(uapi_dev_runtime_get_cat1_powerstat())
     {
+        #ifdef SUPPORT_CAT1_SERVICE
         uapi_set4GCapability(false);
+        #endif
     }
         
     //停止心率周期检测
     
     //进入normal模式
+    #ifdef SUPPORT_CYWEE_SERVICE
     do_cywee_service_check_msg(CYWEE_SERVICE_CMD_NORMAL_MODE,NULL);
 
     //关闭运动识别
     if(uapi_dev_runtime_get_motion_recognition_status())
+    {
         do_cywee_service_check_msg(CYWEE_SERVICE_CMD_CLOSE_AR_ALERT,NULL);
+    }
+    #endif
 
     //关闭音乐
     mmi_stop_music_play();
@@ -2810,9 +2820,13 @@ void uapi_exit_power_saving_mode(void)
 
     //开启心率周期检测(runtime)
     
+    #ifdef SUPPORT_CYWEE_SERVICE
     //开启运动识别
     if(uapi_dev_runtime_get_motion_recognition_status())
+    {
         do_cywee_service_check_msg(CYWEE_SERVICE_CMD_OPEN_AR_ALERT,NULL);
+    }
+    #endif
 
     //配置runtime
     uapi_dev_runtime_set_saveele_status(0);