From: luozheng <1732036298@qq.com> Date: Fri, 12 Jul 2024 03:53:58 +0000 (+0800) Subject: 修改功能键的按下事件:只有在灭屏时候按下才亮屏 X-Git-Tag: release_V1.2.70_20241020_135402~822 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F512%2Fhead;p=mirrors%2FFD230.git 修改功能键的按下事件:只有在灭屏时候按下才亮屏 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp index e33b2937e..e2cce7a99 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-03-28 11:50:42 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-07-12 10:42:15 + * @LastEditTime: 2024-07-12 11:40:13 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootdevice/src/RebootModel.cpp */ @@ -141,7 +141,14 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "power_display_svr_get_api returned nullptr"); return; } - display_api->turn_on_screen(); + if (display_api->get_screen_state() == SCREEN_OFF) /*处于灭屏状态才亮屏*/ + { + display_api->turn_on_screen(); + } + else + { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Screen is on not to turn_on_screen"); + } return; }