From: xue <2144439972@qq.com> Date: Fri, 6 Feb 2026 03:32:34 +0000 (+0800) Subject: 修复低电量关机提醒 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=757e476b0899ac126e329006fbd0707165cad767;p=mirrors%2FFD230.git 修复低电量关机提醒 --- diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp index af70adfe2..8e9e857f9 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp @@ -679,16 +679,16 @@ void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req) WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: LowPower Alarm !"); uint8 *x= (uint8 *)(req->data); const power_display_svr_api_t *display_api = power_display_svr_get_api(); - // if(*x==3) - // { - // if (display_api->get_screen_state() != SCREEN_ON) - // { - // display_api->turn_on_screen(); - // } - // display_api->set_screen_set_keepon_timeout(1000*5); - // //倒计时结束后,直接执行关机动画 - // low_power_play(); - // } + if(*x==3) + { + if (display_api->get_screen_state() != SCREEN_ON) + { + display_api->turn_on_screen(); + } + display_api->set_screen_set_keepon_timeout(1000*5); + //倒计时结束后,直接执行关机动画 + low_power_play(); + } if(*x==0) { //提醒低电充电 diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp index 6747b5f1e..6d8128f80 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/charge_notification.cpp @@ -432,6 +432,7 @@ namespace OHOS void low_power_play() { + osTimerStop(low_power_timer); if(group) group->SetVisible(true); UIImageAnimatorView::AnimatorStopListener *stoplistener = static_cast(lowppowrAnimatorStopListener::GetInstance());