From 56e6d0be7ddb3f0fa08d334538a51ea862b57eac Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Tue, 13 Jan 2026 12:09:53 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E5=8E=8B=E6=B5=8B=E6=A8=A1?= =?utf8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../thunderbird/src/ThunderBirdModel.cpp | 16 +++++----------- .../thunderbird/src/ThunderBirdReminderView.cpp | 2 ++ 2 files changed, 7 insertions(+), 11 deletions(-) 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 8dac21cf6..85a58ae9f 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 @@ -2980,23 +2980,17 @@ extern "C" { AI_ForceInterrupt(); do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_DEINIT, NULL, 0); - // 2. 设置常亮屏 - ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); - - // 3. 跳转到对话说话界面 + // 2. 跳转到对话说话界面 if (ThunderBirdMainView::GetInstance()) { int currentView = ThunderBirdMainView::GetInstance()->GetCurrentView(); ThunderBirdMainView::GetInstance()->ChangeView(currentView, THUNDERBIRD_DIALOGUEVIEW, ThunderBirdDialogueView::THUNDERBIRD_DIALOGUEVIEW_SPEAKING); } - int32_t uiVolume = get_ui_volume(); - if (uiVolume <= 0 || uiVolume > 100) { - uiVolume = 50; // 默认音量50% - } - AudioServiceSetVolume(AUDIO_STREAM_ALARM_CLOCK, uiVolume); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleJumpDialogueSpeaking: Set ALARM_CLOCK volume to %d%%", uiVolume); + // 3. 设置常亮屏 + ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON); - // 5. 循环播放 FactoryMode.mp3(使用 ln_audio_simple_play_loop,支持循环播放,无需线程) + // 4. 循环播放 FactoryMode.mp3(使用 ln_audio_simple_play_loop,支持循环播放,无需线程) + // 音量由按键直接控制(AUDIO_STREAM_VOICE_ASSISTANT),无需手动设置 const char *factory_mode_file = "/user/res/music/FactoryMode.mp3"; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ThunderBirdModel::HandleJumpDialogueSpeaking: Playing file: %s (will loop)", factory_mode_file); diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp index 805faeda0..a4c60a4ba 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdReminderView.cpp @@ -450,12 +450,14 @@ namespace OHOS // 异步执行,避免阻塞按键处理 AudioManager::GetInstance().SetVolume(AUDIO_STREAM_VOICE_ASSISTANT, volumeToApply); + AudioManager::GetInstance().SetVolume(AUDIO_STREAM_ALARM_CLOCK, volumeToApply); ln_bt_earphone_set_volume(volumeToApply); // 更新Model中的音量值 ThunderBirdModel::GetInstance()->m_volume = volumeToApply; } else { // 同步执行 AudioManager::GetInstance().SetVolume(AUDIO_STREAM_VOICE_ASSISTANT, volumeToApply); + AudioManager::GetInstance().SetVolume(AUDIO_STREAM_ALARM_CLOCK, volumeToApply); ln_bt_earphone_set_volume(volumeToApply); // 更新Model中的音量值 ThunderBirdModel::GetInstance()->m_volume = volumeToApply; -- 2.17.1