deubg 界面添加python版本喝cat1 model版本 2662/1 2662/head 2663/target/1
authorluozheng <1732036298@qq.com>
Sun, 2 Nov 2025 08:45:47 +0000 (16:45 +0800)
committerluozheng <1732036298@qq.com>
Sun, 2 Nov 2025 08:45:47 +0000 (16:45 +0800)
code/sdk/application/wearable/ln/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp

index 10426f1..8228b99 100644 (file)
@@ -13,6 +13,8 @@
 #include "common/key_code.h"
 #include "dock/input_device.h"
 #include <ConfigModel.h>
+#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 <ConfigModelC.h>
+#include <cat1_runtime.h>
 
     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();