From: xue <2144439972@qq.com> Date: Fri, 21 Nov 2025 03:31:06 +0000 (+0800) Subject: 优化联网提醒 X-Git-Tag: V1.0.9_20251128_194606_LN~30 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=658a69000c3b20213d1adc30167df3abd4f88a34;p=mirrors%2FFD230.git 优化联网提醒 --- diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp index 813323b06..75d6b9f69 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp @@ -378,8 +378,8 @@ namespace OHOS // FUNC键松开时,如果没有进入对话模式则关闭音频初始化 if (keyState == InputDevice::STATE_RELEASE && screenState == 0 && !isDialogueing && currentView != THUNDERBIRD_LULLABYVIEW) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FUNC键松开,未进入对话模式,关闭音频初始化"); - do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FUNC键松开,未进入对话模式,关闭音频初始化"); + // do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); } return true; @@ -835,7 +835,8 @@ namespace OHOS int wsState = ln_ws_get_connection_state(); bool wsConnected = (wsState == 2); // WS_STATE_CONNECTED = 2 - if (!wsConnected) { + //只要开机的时候检查 + if (!wsConnected && ThunderBirdModel::GetInstance()->init_falg == false) { // WebSocket未连接,显示网络断开提醒界面,不设置定时器 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "进入对话模式时WebSocket未连接,显示网络断开提醒 (wsState=%d)", wsState); // 设置标志,表示用户想要进入对话模式但因为WebSocket未连接而显示提醒 @@ -849,8 +850,8 @@ namespace OHOS } // 检查音频是否已初始化,如果未初始化则设置标志位等待定时器检查 - if(ln_ws_is_audio_initialized()) - { + // if(ln_ws_is_audio_initialized()) + // { // 音频已初始化,直接跳转界面 ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_LISTENING); if(currentView == THUNDERBIRD_GUIDEVIEW) @@ -861,13 +862,13 @@ namespace OHOS { ThunderBirdDialogueView::GetInstance()->Isband(true); } - } - else - { - // 音频未初始化,设置标志位,等待定时器检查 - pendingDialogueJump = true; - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "音频未初始化,设置pendingDialogueJump=true,等待定时器检查"); - } + // } + // else + // { + // // 音频未初始化,设置标志位,等待定时器检查 + // pendingDialogueJump = true; + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "音频未初始化,设置pendingDialogueJump=true,等待定时器检查"); + // } isDialogueing = true; ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); // 打开屏幕常亮