From 3bc24ac58727640fb89afac5ce7d90f3619328a7 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Wed, 19 Nov 2025 11:39:28 +0800 Subject: [PATCH] =?utf8?q?=E6=B3=A8=E9=87=8A=E4=BC=91=E7=9C=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../thunderbird/src/ThunderBirdMainView.cpp | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp index ef621abf1..9cb7cbc03 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdMainView.cpp @@ -53,10 +53,10 @@ namespace OHOS static void ScreenStatusNotify(ScreenStatus status) { - // if (g_videoPlay == nullptr) - // { - // return; - // } + if (g_videoPlay == nullptr) + { + return; + } bool temp = g_videoPlay->isPlayed_; if (status == SCREEN_STATUS_OFF) @@ -69,28 +69,28 @@ namespace OHOS } // 检测是否在联网成功到获取时间线完成这个阶段 - ThunderBirdModel *model = ThunderBirdModel::GetInstance(); - bool hasNetwork = (model != nullptr) ? model->HasNetwork() : false; - bool isBound = (model != nullptr) ? model->getbind_status() : false; + // ThunderBirdModel *model = ThunderBirdModel::GetInstance(); + // bool hasNetwork = (model != nullptr) ? model->HasNetwork() : false; + // bool isBound = (model != nullptr) ? model->getbind_status() : false; // 无论是否绑定,都需要联网才能休眠 - if (!hasNetwork) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScreenStatusNotify: 未联网,不休眠"); - return; - } + // if (!hasNetwork) { + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScreenStatusNotify: 未联网,不休眠"); + // return; + // } // 如果已绑定:需要等待时间线获取完成才能休眠 // 如果未绑定:联网成功就可以休眠,不需要等待时间线 - if (isBound && !g_timelineReceived) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScreenStatusNotify: 已绑定且联网成功但时间线未获取,不休眠"); - return; - } + // if (isBound && !g_timelineReceived) { + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScreenStatusNotify: 已绑定且联网成功但时间线未获取,不休眠"); + // return; + // } // 未绑定且联网成功,或已绑定且时间线已获取,允许休眠 - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScreenStatusNotify: 执行休眠 (isBound=%d, hasNetwork=%d, timelineReceived=%d)", - isBound, hasNetwork, g_timelineReceived); + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScreenStatusNotify: 执行休眠 (isBound=%d, hasNetwork=%d, timelineReceived=%d)", + // isBound, hasNetwork, g_timelineReceived); // 立即执行休眠操作 - ln_ws_enter_sleep(); + // ln_ws_enter_sleep(); } else if (status == SCREEN_STATUS_ON) { @@ -98,7 +98,7 @@ namespace OHOS { g_videoPlay->ResumeVideoPlay(); } - ln_ws_exit_sleep(); + // ln_ws_exit_sleep(); } g_lastPlayed = temp; } -- 2.17.1