From f2b768d3e67d359983eb5d51ce3e061c982a0773 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=AD=99=E6=98=A5=E9=98=B3?= Date: Tue, 2 Dec 2025 11:37:39 +0800 Subject: [PATCH] =?utf8?q?updateNetworkStatus=E5=8F=AA=E5=9C=A8=E4=BA=AE?= =?utf8?q?=E5=B1=8F=E6=97=B6=E6=9B=B4=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/thunderbird/src/ThunderBirdModel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 0e58d992d..555cacc49 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -2132,6 +2132,16 @@ extern "C" { */ void ThunderBirdModel::UpdateNetworkStatus() { + + + // 检查屏幕状态:息屏时不更新网络状态,节省功耗 + int screenState = uapi_get_screen_state(); + if (screenState != 0) { + // 屏幕关闭(screenState != 0 表示息屏),不执行网络状态更新 + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "UpdateNetworkStatus: Screen is off (state=%d), skip network status update", screenState); + return; + } + // 保存之前的网络状态,用于变化检测 int previousNetworkStatus = m_networkStatus; bool previousHasNetwork = m_hasNetwork; -- 2.17.1