From a79cc4cb37ddeb320bd16553df69e763d6c24eb2 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sun, 2 Nov 2025 16:45:47 +0800 Subject: [PATCH] =?utf8?q?deubg=20=E7=95=8C=E9=9D=A2=E6=B7=BB=E5=8A=A0pyth?= =?utf8?q?on=E7=89=88=E6=9C=AC=E5=96=9Dcat1=20model=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../debug_output_notification.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp b/code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp index 10426f1d0..8228b99db 100644 --- a/code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp +++ b/code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp @@ -13,6 +13,8 @@ #include "common/key_code.h" #include "dock/input_device.h" #include +#include "cat1_pub_api.h" +#include "cat1_runtime.h" /* 避免依赖深路径头文件:声明所需 C 接口,保持 C 链接名 */ #ifdef __cplusplus extern "C" @@ -20,6 +22,7 @@ extern "C" #endif #include "ln_api.h" #include +#include char *uapi_ln_get_device_id(void); char *uapi_ln_get_device_iccid(void); @@ -162,10 +165,9 @@ namespace OHOS char version_buf[128] = {0}; uint32_t version_len = sizeof(version_buf) - 1; // 预留1字节给字符串结束符 uapi_get_buildversion((uint8_t *)version_buf, version_len); - deviceInfo += "设备version:" + std::string(version_buf) + "\n"; - + deviceInfo += "设备version:" + std::string(version_buf) + " " + "pyver:" + std::string(cat1_api_runtime_get_cat1_pyver()) + "\n"; // deviceInfo += "设备model:" + std::string(uapi_ln_get_device_model()) + "\n"; - deviceInfo += "cat1 model:" + ConfigModel::GetInstance()->GetmoderVer() + "\n"; + deviceInfo += "cat1 model:" + std::string(cat1_api_runtime_get_cat1_modemver()) + "\n"; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "设备连接状态:%d", ln_ws_get_connection_state()); switch ((int)ln_ws_get_connection_state()) { @@ -274,6 +276,7 @@ namespace OHOS } RootView::GetInstance()->SetOnKeyActListener((OHOS::RootView::OnKeyActListener *)&DebugOutputViewEventListener::GetInstance()); DebugOutputViewEventListener::GetInstance().UpdateView(); + ScreenAlwaysOnCtr(1); /* -------------------------------------------------------------------------- */ NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeDebugOutputMainView); /* -------------------------------------------------------------------------- */ @@ -284,7 +287,8 @@ namespace OHOS /*释放调试专用主窗口视图*/ void FreeDebugOutputMainView(void) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FreeDebugOutputMainView"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FreeDebugOutputMainView"); + ScreenAlwaysOnCtr(0); if (DebugGroupView != nullptr) { DebugGroupView->RemoveAll(); -- 2.17.1