From 57815dd129ccef419344056bc3ea13cd5666e60a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=A2=81=E6=B8=85=E6=A2=A6?= <3449750381@qq.com> Date: Sat, 23 Nov 2024 11:52:37 +0000 Subject: [PATCH] Merge #1455 into sdk602patch0911 from refs/changes/1455/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 袁清梦 * refs/changes/1455/head: (23 commits squashed) - 省电模式:优化提醒界面 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 系统:增加恢复出厂删除离线日志 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 训练:优化训练配速表心率表数据存储 - 心率:修复心率控制的错误修改 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - release V1.3.92 - autobulid.sh:屏蔽制作data.base - 运动:优化运动时长计算与显示 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 系统:优化部分UI适配 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - Merge branch 'sdk602patch0911' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0911 - 系统:优化关机流程 - 运动:修改运动错误的状态 Signed-off-by: Caisking <3449750381@qq.com> Reviewed-by: Caisking <3449750381@qq.com> Reviewed-by: 罗正 <1732036298@qq.com> Reviewed-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Reviewed-by: aliyun6865282430 <1624952103@qq.com> Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1455 --- .../fd230app/nativeui/traing/src/TraingModel.cpp | 9 +++------ .../msg_center/src/notify/charge_notification.cpp | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp index 389d593cf..52851c7a9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingModel.cpp @@ -1709,7 +1709,6 @@ void LogError(const char *msg, osStatus_t ret) { /* 定时器回调函数 */ void TraingTimerCallback(void) { // 只在活动状态下进行更新 - if (!isPaused) { if (pauseStartTimestamp == 0) { //开始时将该值设置为运动开始值 @@ -1742,7 +1741,7 @@ void TraingTimerCallback(void) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "触发了振动。振动计数: %d", shock_count); } - } + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TraingTimerCallback 被执行。"); } @@ -1788,12 +1787,11 @@ void StopAndResetTimer(void) { /* 暂停定时器 */ void PauseTimer(void) { - if (g_startCounting != NULL && !isPaused) { + if (g_startCounting != NULL) { osTimerStop(g_startCounting); totalPausedDuration = sportdata->duration; //记录暂停前的时间;后续加上 - isPaused = true; // 设置为暂停状态 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "定时器已暂停。暂停开始时间戳: %u", pauseStartTimestamp); } @@ -1801,7 +1799,7 @@ void PauseTimer(void) { /* 恢复定时器 */ void ResumeTimer(void) { - if (g_startCounting != NULL && isPaused) { + if (g_startCounting != NULL) { uint32_t currentTimestamp = OHOS::TraingModel::GetInstance()->get_current_time(); // 获取当前时间戳 @@ -1811,7 +1809,6 @@ void ResumeTimer(void) { if (osTimerStart(g_startCounting, tick) != osOK) { LogError("恢复定时器时启动失败", osError); } - isPaused = false; // 设置为活动状态 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "定时器已恢复。当前运动时间: %u %d", g_motionTimes, pauseStartTimestamp); diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/charge_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/charge_notification.cpp index 5b6e7c8d9..7e20b0528 100644 --- a/code/sdk/application/wearable/service/msg_center/src/notify/charge_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/charge_notification.cpp @@ -630,7 +630,7 @@ namespace OHOS void lowppowrAnimatorStopListener::OnAnimatorStop(UIView &view) { //UNUSED(view); - NotificationManager::GetInstance()->StopNotify(); + // NotificationManager::GetInstance()->StopNotify();//hcj改动 msleep(500); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "xxxxxxxxxxxxxxxxxxxxOnAnimatorStop"); -- 2.17.1