From: penglei <1624952103@qq.com> Date: Fri, 9 Aug 2024 11:40:21 +0000 (+0800) Subject: 优化睡眠结束判定 X-Git-Tag: release_V1.2.70_20241020_135402~669^2^2~20 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F669%2F1;p=mirrors%2FFD230.git 优化睡眠结束判定 --- 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 e01a5c5c8..a939a1feb 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -375,11 +375,11 @@ extern "C" } } // 退出睡眠模式 - if (WAKE_TIME_RANGE && (uapi_dev_runtime_get_nap_status() == 0)) + if (WAKE_TIME_RANGE && (uapi_dev_runtime_get_nap_status() == 0) && (uapi_dev_runtime_get_sleep_status() == 0)) { - uapi_dev_runtime_set_sleep_status(0); + //uapi_dev_runtime_set_sleep_status(0); uapi_dev_runtime_set_nap_status(1); - do_cywee_service_check_msg(CYWEE_SERVICE_CMD_GET_SLEEP_DATA, NULL); + // do_cywee_service_check_msg(CYWEE_SERVICE_CMD_GET_SLEEP_DATA, NULL); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "起床啦!"); // 设置状态为小睡 OHOS::SleepModel::GetInstance().set_sleep_state(OHOS::SLEEPSTATE::WAKE); diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index c57b2be5d..1967f25d3 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -1258,6 +1258,7 @@ void MsgCenterNotifyInactivityAccumulateTimeProc(const Topic topic, Request* req #endif free(cywee_Inactivity_Accumulate_Time_Info); cywee_Inactivity_Accumulate_Time_Info = NULL; + uapi_dev_runtime_set_sleep_status(0); } //APP运动相关