Merge #1373 into sdk602patch0911 from refs/changes/1373/head
author胡传军 <1224667075@qq.com>
Fri, 8 Nov 2024 07:37:40 +0000 (07:37 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Fri, 8 Nov 2024 07:37:40 +0000 (07:37 +0000)
Code review from 胡传军

* refs/changes/1373/head: (5 commits squashed)

  - 取消 activity多余的订阅消息

  - 取消订阅

  - Merge branch &#39;sdk602patch0911&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911

  - 修改4G电话处理流程,改为postgraphicevent

  - Merge branch &#39;sdk602patch0911&#39; of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0911

Signed-off-by: aliyun8003852482 <1224667075@qq.com>
Reviewed-by: Caisking <3449750381@qq.com>
Reviewed-by: 罗正 <1732036298@qq.com>
Reviewed-by: aliyun8003852482 <1224667075@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Reviewed-by: aliyun6865282430 <1624952103@qq.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1373
code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp

index 3fc9c86..aebaa74 100644 (file)
@@ -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);
index 5364d14..19d9af3 100644 (file)
@@ -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)
index 98b255a..f6edaf9 100755 (executable)
@@ -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;