From: Caisking <3449750381@qq.com> Date: Wed, 6 Nov 2024 09:47:32 +0000 (+0800) Subject: 系统:优化nextday X-Git-Tag: fd230_release_V1.3.102~115^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=3b75338247d703533128b6ea85e7f6ca5bb5b81b;p=mirrors%2FFD230.git 系统:优化nextday --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp index 5eb74d044..a8ef9398d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/activity/src/ActivityModel.cpp @@ -228,8 +228,8 @@ static void Notify(void *args, const Topic topic, Request* request) if (request->msgId == TOPIC_EVENT_NEXTDAY_UPDATE) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "STEP:TOPIC_EVENT_NEXTDAY_UPDATE"); - uint32_t refreshValue = OHOS::ActivityModel::GetInstance()->ZeroHourStepHandle(); - RefreshStepControls(refreshValue, TOPIC_EVENT_NEXTDAY_UPDATE); + // uint32_t refreshValue = OHOS::ActivityModel::GetInstance()->ZeroHourStepHandle(); + // RefreshStepControls(refreshValue, TOPIC_EVENT_NEXTDAY_UPDATE); } } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp index 64ee7801b..97a51976f 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -327,10 +327,12 @@ extern "C" WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Current time - Hour: %d, Minute: %d", localTime->tm_hour, localTime->tm_min); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Posting next day update event"); - // GraphicService::GetInstance()->PostGraphicEvent( - // std::bind(AlarmTimerEventPublish, TOPIC_EVENT_NEXTDAY_UPDATE, unuse)); #endif - AlarmTimerEventPublish(TOPIC_EVENT_NEXTDAY_UPDATE, unuse); + + GraphicService::GetInstance()->PostGraphicEvent(std::bind( + AlarmTimerEventPublish, TOPIC_EVENT_NEXTDAY_UPDATE, unuse)); + + // AlarmTimerEventPublish(TOPIC_EVENT_NEXTDAY_UPDATE, unuse); SetZeroAlarm(); // 重置nextday闹钟 } diff --git a/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp index 586273d67..35c14694a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp @@ -276,7 +276,7 @@ namespace OHOS // 更新血氧数据 void BloodOxygenModel::CleanAllData(void) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Nextday!"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Nextday!"); if (MainViewSample::GetInstance() != nullptr && BloodCardView::GetInstance() != nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "更新主界面血氧卡片"); diff --git a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp index 62e88de74..629ae1d2a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp @@ -180,7 +180,7 @@ BloodOxygenData *HealthService::ReadBloodOxygenData() { // 读取文件 std::ifstream inFile(BLOOD_JSON_PATH); if (!inFile.is_open()) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Failed to open JSON file"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Failed to open JSON file"); return nullptr; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp index 4c6ba590c..7a54b1594 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/heartrate/src/HeartModel.cpp @@ -116,25 +116,9 @@ static void Notify(void *args, const Topic topic, Request *request) { uapi_dev_runtime_get_respiratory_training_status() || request == NULL) { return; } - - switch (request->msgId) { - case TOPIC_EVENT_HEARTRATE_UPDATA: - // 主界面刷新 - GraphicService::GetInstance()->PostGraphicEvent(std::bind( - &HeartModel::RefreshHeartRateScreen, HeartModel::GetInstance())); - // ProcessHeartRateUpdate(request); - break; - - case TOPIC_EVENT_NEXTDAY_UPDATE: - case TOPIC_EVENT_UTCTIME_UPDATE: - RefreshHeartData(); - break; - - case TOPIC_EVENT_WEARSTATE_UPDATE: - break; - - default: - break; + if (request->msgId == TOPIC_EVENT_HEARTRATE_UPDATA) { + GraphicService::GetInstance()->PostGraphicEvent(std::bind( + &HeartModel::RefreshHeartRateScreen, HeartModel::GetInstance())); } }