From: luozheng <1732036298@qq.com> Date: Wed, 25 Sep 2024 01:55:20 +0000 (+0800) Subject: #774,解决录音列表,点击进入就是播放状态,需要点击进去是暂停状态不能自动播放bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=8da3c673066d667abf4962307a5f3116f7a19ce5;p=mirrors%2FFD230.git #774,解决录音列表,点击进入就是播放状态,需要点击进去是暂停状态不能自动播放bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp index 6815da00e..9aa2e6ea2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/record/src/RecordingModel.cpp @@ -165,6 +165,8 @@ namespace OHOS // 点击录音列表中录音播放 int RecordingModel::RecordingListOnClickPlay(void) { + SetRecordingPlayerUri(directory + GetCurrentPlayRecordingName() + ".mp3"); +#if 0 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RecordingModel::RecordingListOnClickPlay"); int ret; int32_t playerState; @@ -180,6 +182,7 @@ namespace OHOS state = p_RecordingPlayerView->GetPlayerButtonState(); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "state %d,line = %d", state, __LINE__); + if (state == UICheckBox::UICheckBoxState::UNSELECTED) { p_RecordingPlayerView->SetPlayerButtonState(UICheckBox::UICheckBoxState::SELECTED); @@ -207,6 +210,7 @@ namespace OHOS } RecordingPlayerStat(); } +#endif return OHOS_SUCCESS; } @@ -216,7 +220,7 @@ namespace OHOS /* ------------------------------ 每次新的播放进度都设为0 ------------------------------ */ SetCircleProgress(0); // 0:进度100% RecordingPlayerView *p_RecordingPlayerView = RecordingPlayerView::GetInstance(); - if(p_RecordingPlayerView !=nullptr) + if (p_RecordingPlayerView != nullptr) { p_RecordingPlayerView->SetPlayerProgressBarValue(CircleProgress); }