From: xue <2144439972@qq.com> Date: Wed, 7 Jan 2026 11:55:43 +0000 (+0800) Subject: 增加退出蓝牙视频判断,如果不存在则重置为眨眼 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=fd0ae32786cef784329f323add1e7a944eac3b7c;p=mirrors%2FFD230.git 增加退出蓝牙视频判断,如果不存在则重置为眨眼 --- 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 f57360165..8b1e9714d 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 @@ -1167,6 +1167,36 @@ namespace OHOS do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); } } + // 检查从蓝牙界面跳转到发呆中界面时,如果已经在发呆中界面,则切换到眨眼表情来重置表情 + if(hideView == THUNDERBIRD_BLUEVIEW && + showView == THUNDERBIRD_DIALOGUEVIEW && + subView == ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW) + { + // 如果当前已经在发呆中界面,且VideoPlayThread已退出(黑脸),切换到眨眼表情来重置表情 + if(currentView_ == THUNDERBIRD_DIALOGUEVIEW && + currentSubView_ == ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_STATUS_SHOW) + { + // 检查是否黑脸:VideoPlayThread是否退出 + bool isBlackFace = false; + if (videoPlay_ != nullptr) { + // 检查VideoPlayThread是否已退出或播放已停止 + isBlackFace = videoPlay_->isExited_; + } else { + // videoPlay_为nullptr也认为是黑脸 + isBlackFace = true; + } + + if (isBlackFace) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdMainView::ChangeView: 从蓝牙界面跳转到发呆中界面,已在发呆中界面,检测到黑脸(VideoPlayThread已退出),切换到眨眼表情重置表情"); + ThunderBirdModel* model = ThunderBirdModel::GetInstance(); + if (model != nullptr) { + model->SwitchToWinkingExpression(); + } + } else { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "ThunderBirdMainView::ChangeView: 从蓝牙界面跳转到发呆中界面,已在发呆中界面,但VideoPlayThread未退出,不重置表情"); + } + } + } if (hideView != MAXVIEW) { if (group[hideView] == nullptr)