From 7aa72915385cdf48bbcd280601d11ae8fc9b2872 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 8 Nov 2024 14:35:12 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E6=94=B94G=E7=94=B5=E8=AF=9D=E5=A4=84?= =?utf8?q?=E7=90=86=E6=B5=81=E7=A8=8B=EF=BC=8C=E6=94=B9=E4=B8=BApostgraphi?= =?utf8?q?cevent?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/phoneservice/src/PhoneService.cpp | 4 ++-- .../service/msg_center/src/msg_center_customer.cpp | 9 +++++++-- .../msg_center/src/notify/makephone_notification.cpp | 10 ++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp index 3fc9c86df..aebaa748b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp @@ -1498,7 +1498,7 @@ static void PlayWatchRing(void) { OHOS::AlarmClockModel::GetInstance()->testPlayerStart(RING_MUSIC); - //g_audioState = AUDIO_ACT_INTERRUPT_WATCH_RING; + //g_audioState = AUDIO_ACT_INTERRUPT_WATCH_RING; } } @@ -1513,7 +1513,7 @@ static void CallAudioHandle(const hfp_hf_calls_info_t *call) if (state == HFP_HF_CALL_STATE_INCOMING || state == HFP_HF_CALL_STATE_DIALING || state == HFP_HF_CALL_STATE_ALERTING) { // 电话呼入,支持播放手机铃声 - if (call->in_band_ring) { + if (call->in_band_ring && state != HFP_HF_CALL_STATE_INCOMING) { { // 播放手机端铃声 PostGraphicEvent(AudioDn); diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 5364d14cb..19d9af34a 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -439,11 +439,16 @@ void MsgCenterNotifystepProc(const Topic topic, Request* req) if(OHOS::GoalView::GetInstance()) { - OHOS::GoalView::GetInstance()->GoalViewrefresh(); + GraphicService::GetInstance()->PostGraphicEvent( + std::bind(&OHOS::GoalView::GoalViewrefresh, OHOS::GoalView::GetInstance() )); + + // OHOS::GoalView::GetInstance()->GoalViewrefresh(); } if(OHOS::GoalotherView::GetInstance()) { - OHOS::GoalotherView::GetInstance()->GoalViewrefresh(); + //OHOS::GoalotherView::GetInstance()->GoalViewrefresh(); + GraphicService::GetInstance()->PostGraphicEvent( + std::bind(&OHOS::GoalotherView::GoalViewrefresh, OHOS::GoalotherView::GetInstance() )); } if(OHOS::GoalModel::GetInstance().getstepvalue()>=100) diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp index 98b255a73..f6edaf9ac 100755 --- a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp @@ -598,9 +598,9 @@ static void WatchFinishHandle(void) DisableCallTimer(CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY); } -void cat1_phone_state_change_cb(uint8_t state) +void using_cat1_phone_state_change_cb(uint8_t state) { - g_callOperate = state; + g_callOperate = state; switch (g_callOperate) { case OPERATE_DIALING: @@ -660,6 +660,12 @@ void cat1_phone_state_change_cb(uint8_t state) CAT1_ChangeStatusScreendisplay(g_callOperate); } +void cat1_phone_state_change_cb(uint8_t state) +{ + GraphicService::GetInstance()->PostGraphicEvent( + std::bind(using_cat1_phone_state_change_cb,state)); +} + // PhoneCallInfo tmp; -- 2.17.1