From 74ec1c40a0661a72b35fa426d7fdc37a5ad4566e Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Fri, 12 Jul 2024 11:53:58 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD=E9=94=AE?= =?utf8?q?=E7=9A=84=E6=8C=89=E4=B8=8B=E4=BA=8B=E4=BB=B6=EF=BC=9A=E5=8F=AA?= =?utf8?q?=E6=9C=89=E5=9C=A8=E7=81=AD=E5=B1=8F=E6=97=B6=E5=80=99=E6=8C=89?= =?utf8?q?=E4=B8=8B=E6=89=8D=E4=BA=AE=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/rebootdevice/src/RebootModel.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; } -- 2.17.1