From 89b73addb98c6dd6ea5400f34c38f22c573ba5cd Mon Sep 17 00:00:00 2001 From: Caisking Date: Sat, 20 Sep 2025 21:44:08 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E7=BB=91=E5=AE=9A=E7=9A=84?= =?utf8?q?=E4=BA=A4=E4=BA=92=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../thunderbird/include/ThunderBirdModel.h | 2 +- .../thunderbird/src/ThunderBirdModel.cpp | 46 +++++++------------ .../thunderbird/src/ThunderBirdPresenter.cpp | 2 +- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h index dbf78d5fe..b7bd65f52 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h @@ -135,7 +135,7 @@ namespace OHOS // IMEI状态管理函数 bool IsIMEIValid() const; void CheckIMEIStatus(); - void SetIMEIValid(bool valid); + // 对话状态相关函数 int GetConversationStatus(); diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index ca5d7614e..1b87c871b 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -231,30 +231,7 @@ } - // ==================== 开机操作函数 ==================== - int ThunderBirdModel::StartBootOperation() - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation"); - //绑定设备提示 > 配置更新成功>OTA升级>其他(按触发时间先后提示) - /*************************用户是否绑定*************************/ - do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, nullptr, 0);//获取用户是否绑定 - if(uapi_ln_is_device_bound() == 0 || uapi_ln_is_device_bound() == -1)//未绑定 - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation: 未绑定"); - //ThunderBirdMainView::GetInstance()->ChangeView(MAXVIEW, THUNDERBIRD_GUIDEVIEW, ThunderBirdGuideView::THUNDERBIRD_GUIDEVIEW_1); - return 0; - } - else if(uapi_ln_is_device_bound() == 1)//已绑定 - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation: 已绑定"); - //ThunderBirdMainView::GetInstance()->ChangeView(MAXVIEW, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING); - return 1; - } - - /*************************更新角色配置*************************/ - //do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_CHARACTER, nullptr, 0);//获取角色配置 - return -1; - } + /*************************OTA升级*************************/ int ThunderBirdModel::ota_update_boot() @@ -304,6 +281,21 @@ } // ==================== 新手引导相关函数 ==================== + + // ==================== 开机操作函数 ==================== + int ThunderBirdModel::StartBootOperation() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation"); + //绑定设备提示 > 配置更新成功>OTA升级>其他(按触发时间先后提示) + /*************************用户是否绑定*************************/ + do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, nullptr, 0);//获取用户是否绑定 + if(CheckBindingStatus() != BindingStatus::BOUND)//未绑定 + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::StartBootOperation: 未绑定"); + return 0; + } + return 1; + } //判断是否绑定 ThunderBirdModel::BindingStatus ThunderBirdModel::CheckBindingStatus() { @@ -1181,12 +1173,6 @@ WEARABLE_LOGD("IMEI status checked: valid=%d", m_imeiValid); } - void ThunderBirdModel::SetIMEIValid(bool valid) - { - m_imeiValid = valid; - m_imeiChecked = true; - WEARABLE_LOGD("IMEI status set: valid=%d", m_imeiValid); - } } \ No newline at end of file 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 c3c413079..1f427da93 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 @@ -604,7 +604,7 @@ namespace OHOS ThunderBirdModel::GetInstance()->CheckIMEIStatus(); // 检查IMEI是否有效 - if (!ThunderBirdModel::GetInstance()->IsIMEIValid()) { + if (ThunderBirdModel::GetInstance()->IsIMEIValid()) { return; } -- 2.17.1