Merge #3235 into fd272 from refs/changes/3235/head 3240/target/1
author袁清梦 <3449750381@qq.com>
Wed, 4 Mar 2026 08:40:21 +0000 (08:40 +0000)
committer袁清梦 <3449750381@qq.com>
Wed, 4 Mar 2026 08:40:21 +0000 (08:40 +0000)
release V1.3.145

* refs/changes/3235/head: (5 commits squashed)

  - release V1.3.145

  - 优化运动过程中可以弹出每日目标

  - release V1.3.146

  - 设置运动结束界面不能弹窗目标达成

  - release V1.3.147

Signed-off-by: Caisking <3449750381@qq.com>
Merged-by: Caisking <3449750381@qq.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/3235
autobuild.sh
code/sdk/application/wearable/fd272/nativeapp/nativeui/traing/src/TraingEnddataView.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/traing/training_card/src/TraingCardPresenter.cpp
code/sdk/application/wearable/fd272/nativeapp/nativeui/traingrecord/src/TraingRecordPresenter.cpp
code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp
code/sdk/zhihui/utils/custom_runtime.c
code/sdk/zhihui/utils/custom_runtime.h
code/sdk/zhihui/utilscpp/custom_utilscpp.cpp

index 8857cc8..fa079dc 100644 (file)
@@ -49,7 +49,7 @@ DEFAULT_SSB_NAME=$DEFAULT_APPLICATION_NAME-ssb
 declare -A PROJECT_VERSIONS=(
     # 基础项目版本
     ["fd230"]="1.3.107"
-    ["fd272"]="1.3.135"
+    ["fd272"]="1.3.147"
     ["user"]="1.3.107"
     ["fd230_user"]="1.3.107"
     
index e93f7c7..dd5ed66 100644 (file)
@@ -2,6 +2,7 @@
 #include "traing/include/TraingEnddataView.h"
 
 #include "UiConfig.h"
+#include "custom_runtime.h"
 #include "common/image_cache_manager.h"
 #include "components/ui_button.h"
 #include "components/ui_canvas.h"
@@ -47,11 +48,16 @@ ColorType textColor = Color::GetColorFromRGBA(0xff, 0xff, 0xff, 0x7f);
 
 static TraingEnddataView *g_pTraingEnddataView{nullptr};
 
-TraingEnddataView::TraingEnddataView() { g_pTraingEnddataView = this; }
+TraingEnddataView::TraingEnddataView() { 
+  //设置一个结束界面flag 如果是runtime是结束界面就不能弹窗
+  uapi_dev_runtime_set_train_status_is_end_flag(1);
+  g_pTraingEnddataView = this; 
+}
 
 TraingEnddataView::~TraingEnddataView() {
   DeInit();
   g_pTraingEnddataView = nullptr;
+  uapi_dev_runtime_set_train_status_is_end_flag(0);
 }
 
 TraingEnddataView *TraingEnddataView::GetInstance() {
index 730a946..e3f1aa6 100644 (file)
@@ -34,6 +34,7 @@
  #include <sstream>\r
  #include <thread>\r
  #include <unordered_map>\r
+ #include "custom_runtime.h"\r
  \r
  extern "C" void do_cywee_service_check_msg(int cmd, int data[]);\r
  \r
@@ -618,6 +619,7 @@ bool TraingCardPresenter::OnDragEnd(UIView &view, const DragEvent &event) {
      // 进入训练详情\r
      NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGENDDATA);\r
      NativeAbility::GetInstance().ClearSliceIdStack(); // 清空所有SLiceId栈元素\r
+     uapi_dev_runtime_set_train_status_is_end_flag(1);\r
    } else {\r
      // 进入训练记录\r
      // NativeAbility::GetInstance().ChangeSlice(VIEW_TRAINING_RECORD);\r
index 9e18454..017eacd 100644 (file)
@@ -25,6 +25,8 @@
 
 #include "NativeRegisterManager.h"
 #include "uicomponents/UIComponents.h"
+
+#include "custom_runtime.h"
 namespace OHOS
 {
     REGIST_MENU_PRO(VIEW_TRAINING_RECORD, TraingRecordView, TraingRecordPresenter,
@@ -150,6 +152,7 @@ namespace OHOS
                 // 这样OnStart()中调用IsNeedGPS()时能正确判断
                 TraingModel::GetInstance()->SetSportdata(&sportData);
                 NativeAbility::GetInstance().EnterSlice(VIEW_TRAININGENDDATA);
+                uapi_dev_runtime_set_train_status_is_end_flag(1);
                 return true;
             }
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "the sportDataVector is error");
index cd5c49a..e5885e9 100644 (file)
@@ -1065,10 +1065,12 @@ void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req)
                  std::bind(&OHOS::GoalotherView::GoalViewrefresh,  OHOS::GoalotherView::GetInstance() ));
              }
  
-             /* 运动过程中不弹目标达成,避免打扰用户;使用 runtime 训练状态(0 未训练/结束,1 训练中) */
-             if (uapi_dev_runtime_get_train_status() != 0) {
+            //  /* 运动过程中不弹目标达成,避免打扰用户;使用 runtime 训练状态(0 未训练/结束,1 训练中) */
+             if (uapi_dev_runtime_get_train_status_is_end_flag() != 0) {
                  return;
              }
+
+
  
              /* 同时只弹一个:本轮只发布第一个达成的目标,顺序:步数 -> 距离 -> 燃脂 -> 站立 -> 卡路里 */
              bool published = false;
index 0966eca..8df62c2 100644 (file)
@@ -79,6 +79,7 @@ typedef struct
     uint8_t sedentary_status;
     uint8_t drinkremind_status;
     uint8_t train_status;//训练状态
+    uint8_t train_status_is_end_flag;//训练结束界面标志,1 处于结束界面 0 非结束界面
     uint8_t saveele_status;//省电模式状态
     uint8_t lock_status;//密码锁状态
     uint8_t motion_recognition_status;//运动识别开关状态
@@ -452,6 +453,15 @@ uint8_t uapi_dev_runtime_get_train_status(void)
 {
     return g_runtime.train_status;
 }
+/*设置训练结束界面标志*/
+void uapi_dev_runtime_set_train_status_is_end_flag(uint8_t flag)
+{
+    g_runtime.train_status_is_end_flag = flag;
+}
+uint8_t uapi_dev_runtime_get_train_status_is_end_flag(void)
+{
+    return g_runtime.train_status_is_end_flag;
+}
 /*设置省电模式状态*/
 void uapi_dev_runtime_set_saveele_status(uint8_t status)
 {
index 9f781fb..5d1175c 100644 (file)
@@ -96,6 +96,14 @@ uint8_t uapi_dev_runtime_get_drinkremind_status(void);
 void uapi_dev_runtime_set_train_status(uint8_t status);
 uint8_t uapi_dev_runtime_get_train_status(void);
 
+/*
+    设置训练结束界面标志
+    0 非结束界面
+    1 处于结束界面(不弹窗等)
+*/
+void uapi_dev_runtime_set_train_status_is_end_flag(uint8_t flag);
+uint8_t uapi_dev_runtime_get_train_status_is_end_flag(void);
+
 /*
     设置训练状态
     0 未开启省电
index 04f6912..b58317f 100644 (file)
@@ -529,7 +529,7 @@ void CustomEventPublish(uint16_t topic, uint8_t *data, uint32_t size) {
 
     BroadcastApi *broadcastApi = nullptr;  
     IUnknown *api = nullptr;  
-    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "CustomEventPublish topic=%u!!", topic);  
+    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CustomEventPublish topic=%u!!", topic);  
 
     void *publishData = nullptr;  
     if (size > 0) {