Merge #1241 into sdk602patch0911 from refs/changes/1241/head
author胡传军 <1224667075@qq.com>
Thu, 24 Oct 2024 00:17:33 +0000 (00:17 +0000)
committersnickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Thu, 24 Oct 2024 00:17:33 +0000 (00:17 +0000)
Code review from 胡传军

* refs/changes/1241/head: (21 commits squashed)

  - 先关闭4G电话对麦克风管理,可能导致音频系统锁死

  - 修复电话界面动画问题

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

  - 增加最大数量表盘限制,待测试 ,修改BLE打印日志

  - 修改获取全部表盘id接口防止越界

  - 电话修改

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

  - 优化电话中再呼叫SOS

  - 合并

  - 增加蓝牙更改广播参数接口

  - 产测蓝牙广播频率修改

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

  - 增加4G对麦克风管理,多次测试未复现,需再验证

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

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

  - 优化电话对音频的处理

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

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

  - 增加步数单位

  - OTA fopen 修复

  - 闹钟传输修复

Signed-off-by: aliyun8003852482 <1224667075@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1241
15 files changed:
code/sdk/application/wearable/auto_ota/auto_ota_service.c
code/sdk/application/wearable/fd230app/nativeui/alarm/src/AlarmClockModel.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/include/BluetoothModelC.h
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp
code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp
code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneService.h
code/sdk/application/wearable/fd230app/nativeui/phoneservice/include/PhoneServiceC.h
code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp
code/sdk/application/wearable/fd230app/nativeui/player/include/PlayersModelC.h
code/sdk/application/wearable/fd230app/nativeui/player/src/PlayersModel.cpp
code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/service/msg_center/src/notify/goal_notification.cpp
code/sdk/drivers/peripheral/utils/custom_cmd_service.c
code/sdk/drivers/peripheral/utils/custom_utils.h

index aeeeda3..460aaba 100644 (file)
@@ -157,6 +157,17 @@ static bool auto_ota_dev_check_dev_name(unsigned char *dev_name)
     }
 }
 
+static bool auto_ota_dev_check_dev_name_is_true(unsigned char *dev_name)
+{
+    if (strncmp((const char *)dev_name, AUTO_OTA_DEV_NAME_PREFIX, AUTO_OTA_DEV_NAME_PREFIX_LEN) == 0) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+
+
 /* 重置发现设备链表 */
 void auto_ota_reset_found_dev_list(void)
 {
@@ -335,7 +346,7 @@ static void auto_ota_discovery_result_callback(const bd_addr_t *bd_addr)
     if (auto_ota_dev_found(bd_addr->addr) != true && auto_ota_dev_check_dev_name(device_name) == true) {
         auto_ota_add_node_to_found_dev_list(bd_addr, device_name, cod, 0);
     }
-
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "auto_ota_discovery_result_callback end\n");
     return;
 }
 
@@ -357,6 +368,7 @@ static bool auto_ota_upg_check(void)
     char *dst_ver = (char *)malloc(sizeof(char) * (file_len + 1));
     if (dst_ver == NULL) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "malloc fail, file_len = %d.\r\n", file_len);
+        fclose(fp);
         return false;
     }
 
@@ -365,6 +377,7 @@ static bool auto_ota_upg_check(void)
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_MSG_CENTER, "fread fail, file_len = %d.\r\n", file_len);
         free(dst_ver);
         dst_ver = NULL;
+        fclose(fp);
         return false;
     }
     fclose(fp);
@@ -464,6 +477,8 @@ static void auto_ota_acl_state_changed_callback(const bd_addr_t *bd_addr, gap_ac
             return;
         }
         bool res = auto_ota_spp_connect(uuid, bd_addr);
+
+        WEARABLE_LOGI(WEARABLE_LOG_MODULE_MSG_CENTER, "auto_ota_spp_connect %d", res);
         if (res != true) {
             (void)osSemaphoreRelease(g_auto_ota_transmit_done_sem);
             return;
index 5cc06d6..09f26ef 100644 (file)
@@ -858,7 +858,6 @@ int AlarmClockModel::AlarmPlayerStat()
     int32_t ret;
     if(NotificationManager::GetInstance()->GetWatchCallStatus())
     {
-
         return 0;
     }
 
@@ -900,8 +899,17 @@ int AlarmClockModel::AlarmPlayerStat()
     }
     playerCtr->SetAudioSessionId(sessionId);
     playerCtr->SetVolume(amIntance.GetMaxVolume(AUDIO_STREAM_MUSIC),amIntance.GetMaxVolume(AUDIO_STREAM_MUSIC));
+    playerCtr->EnableSingleLooping(true);
     // 播放
-    playerCtr->Play();
+   // playerCtr->Play();
+
+     ret = playerCtr->Play();
+    if (ret != 0) {
+        playerCtr->Stop(); // 暂停
+        playerCtr->Reset(); // 初始化
+
+        AudioManager::GetInstance().DeactivateAudioInterrupt(interrupt);
+    }
     return OHOS_SUCCESS;
 }
 
index e214442..ab02f9f 100644 (file)
@@ -27,6 +27,8 @@ int uapi_close_br_scan(void);
 int uapi_open_br_scan(void);
 //int uapi_disconnect_remote_device_(void);
 
+int32_t BtA2dpSnkAudioDestroy(void);
+
 int uapi_reconnect_(void);
 
 
index 50cdc70..963a4de 100644 (file)
@@ -1437,7 +1437,7 @@ static int32_t BtA2dpSnkAudioCreate()
     return 0;\r
 }\r
 \r
-static int32_t BtA2dpSnkAudioDestroy()\r
+int32_t BtA2dpSnkAudioDestroy(void)\r
 {\r
 #if MEDIA_A2DP_SNK_INTERFACE\r
     int32_t ret = AudioManagerA2dpSinkDestroy();\r
index 29286fb..74af04e 100644 (file)
@@ -44,7 +44,7 @@ osTimerId_t g_startCounting = nullptr; // 定时器
 //
 osTimerId_t g_shake = nullptr; // 循环震动定时器
 
-static constexpr uint64_t MS_ONE_SECONDS = 1000;
+static constexpr uint64_t MS_ONE_SECONDS = 2000;
 static PhoneCallInfo callList[MULTI_CALL_MAX_NUME]{};
 // 电话优先级标志位
 static int g_firstPriority = NO_NUMBER_STATUS;
@@ -134,7 +134,7 @@ void StatusReset(void)
     DisableCallingTimer();
 
     if(CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourceCat1)
-    uapi_cat1_stop_volte_voice();
+    do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_STOP, nullptr, 0);
 
     CallerLogModel::GetInstance()->Setphonebname("0",0);
     CallerLogModel::GetInstance()->SetCallDial(CallerLogModel::HFP_PHONE_DIAL);
@@ -190,7 +190,7 @@ static void CallTimerCallbackProc(int data)
         if(!MainCallingView::GetInstance()->GetDisplayGroup()->IsVisible())
         {
              if(!volte_voice_state())
-            uapi_cat1_start_volte_voice();
+             do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0);
         }
        
         {
index 6d58cc7..742fc10 100644 (file)
@@ -286,6 +286,13 @@ int SaveCallLog(CallLogInfo **info,int num);
 
 int32_t SetMicMutecat1(bool isMute);
 
+void AudioActInterrupt(AudioStreamType type);
+
+
+
+
+
+
 #ifdef __cplusplus
 }
 #endif
index be1825b..0cf660c 100644 (file)
@@ -22,6 +22,11 @@ int uapi_open_voice_recognition(void );
 
 int uapi_close_voice_recognition(void );
 
+void cat1_audio_AudioSetup(void);
+
+void cat1_audio_AudioRelease(void);
+
+
 #ifdef __cplusplus
 }
 #endif
index aa2dec3..05a7d7b 100644 (file)
@@ -151,20 +151,23 @@ static void AudioDeactInterrupt(AudioStreamType type)
                   type, g_audioState);
 
     if ((type == AUDIO_STREAM_VOICE_CALL_BT_SCO && g_audioState >= AUDIO_ACT_INTERRUPT_BT_SCO) ||
-        (type == AUDIO_STREAM_RING && g_audioState == AUDIO_ACT_INTERRUPT_WATCH_RING)) {
+        (type == AUDIO_STREAM_RING && g_audioState == AUDIO_ACT_INTERRUPT_WATCH_RING)
+        || type ==AUDIO_STREAM_VOICE_CALL_VOLTE &&  g_audioState >= AUDIO_STREAM_VOICE_CALL_VOLTE ) {
         (void)PhoneAudioManagerDeactInterrupt();
     }
 }
 
+
+
 // 申请音频焦点
-static void AudioActInterrupt(AudioStreamType type)
+void AudioActInterrupt(AudioStreamType type)
 {
     int ret = OHOS_SUCCESS;
 
-    WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] start type:0x%x, audioState:0x%x",
+    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] start type:0x%x, audioState:0x%x",
                   type, g_audioState);
 
-    if (type != AUDIO_STREAM_VOICE_CALL_BT_SCO && type != AUDIO_STREAM_RING) {
+if (type != AUDIO_STREAM_VOICE_CALL_BT_SCO && type != AUDIO_STREAM_RING && type != AUDIO_STREAM_VOICE_CALL_VOLTE) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type:0x%x, audioState:0x%x",
                       type, g_audioState);
         return;
@@ -181,12 +184,26 @@ static void AudioActInterrupt(AudioStreamType type)
         if (ret == OHOS_SUCCESS) {
             g_audioState = AUDIO_ACT_INTERRUPT_BT_SCO;
         }
-    } else if (type == AUDIO_STREAM_RING && g_audioState < AUDIO_ACT_INTERRUPT_WATCH_RING) {
+    } 
+    else if (type == AUDIO_STREAM_RING && g_audioState < AUDIO_ACT_INTERRUPT_WATCH_RING) 
+    {
         ret = PhoneAudioManagerActInterrupt(type);
         if (ret == OHOS_SUCCESS) {
-            g_audioState = AUDIO_ACT_INTERRUPT_WATCH_RING;
+        g_audioState = AUDIO_ACT_INTERRUPT_WATCH_RING;
         }
     }
+    else if (type == AUDIO_STREAM_VOICE_CALL_VOLTE && g_audioState < AUDIO_STREAM_VOICE_CALL_VOLTE)
+    {
+        if (g_audioState == AUDIO_ACT_INTERRUPT_WATCH_RING) {
+            AudioDeactInterrupt(AUDIO_STREAM_RING);
+        }
+
+        ret = PhoneAudioManagerActInterrupt(type);
+        if (ret == OHOS_SUCCESS) {
+            g_audioState = AUDIO_STREAM_VOICE_CALL_VOLTE;
+        }
+    }
+    
 
     if (ret != OHOS_SUCCESS) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioActInterrupt] failed! type:0x%x, audioState:0x%x",
@@ -262,7 +279,7 @@ static void AudioUpStart(void)
 
     if (g_scoFlag != HFP_SCO_STATE_CONNECTED || g_audioState < AUDIO_STREAM_INIT) {
         return;
-    }
+}
 
     MUTEX_Lock(g_audioMutex);
     if (g_audioState < AUDIO_STREAM_START_UP) {
@@ -370,6 +387,27 @@ static void AudioDnStart(void)
     return;
 }
 
+#include "PlayersModelC.h"
+#include "BluetoothModelC.h"
+
+void cat1_audio_AudioSetup(void)
+{
+    //AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_VOLTE);
+    if(stopPhonePlayingMusic())
+    {
+        BtA2dpSnkAudioDestroy();
+        sleep(1);//等待释放音频
+    }
+    uapi_cat1_start_volte_voice();
+}
+
+void cat1_audio_AudioRelease(void)
+{
+    uapi_cat1_stop_volte_voice();
+}
+
+
+
 // 同步音量
 static void SyncVolume(void)
 {
@@ -422,6 +460,7 @@ static void AudioUp(void)
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioUp] audioState:%d", g_audioState);
 }
 
+
 static void AudioSetup(void)
 {
     //如果已经建立了cat1 媒体通路,不能再建立,SCO通路
@@ -438,6 +477,9 @@ static void AudioSetup(void)
     }
 }
 
+
+
+
 static void AudioUpRelease(void)
 {
     int ret;
@@ -527,7 +569,7 @@ void AudioRelease(void)
     /* 释放音频焦点 */
     AudioDeactInterrupt(AUDIO_STREAM_VOICE_CALL_BT_SCO);
     AudioDeactInterrupt(AUDIO_STREAM_RING); // 适配某些机型不触发SCO
-    g_audioState = AUDIO_UNKNOW;
+        g_audioState = AUDIO_UNKNOW;
 
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "[AudioRelease] audioState:%d,", g_audioState);
     MUTEX_Unlock(g_audioMutex);
index 955de68..a0dd42e 100644 (file)
@@ -19,6 +19,7 @@ extern "C"
     void stopPlayingMusic(void);
     void custom_setUpListCase(void);
     bool  canSyncMusic(uint32_t songSize);
+    bool stopPhonePlayingMusic(void);
    
 #ifdef __cplusplus
 #if __cplusplus
index 64f2806..508f998 100644 (file)
@@ -1179,6 +1179,19 @@ extern "C"
         return OHOS::SystemLogModel::GetInstance()->canSyncFile(APP_MUSIC_PATH,TOTAL_MUSIC_SPACE,songSize);
     }
 
+
+    bool stopPhonePlayingMusic(void)
+    {
+        if( OHOS::PlayersModel::GetInstance()->get_a2dp_sink_playing_state())
+        {
+            OHOS::PlayersModel::GetInstance()->set_phone_music_play_state(AVRCP_KEY_PAUSE); // 控制手机音乐暂停
+            return true;
+
+        }
+        return false;
+    }
+
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index d72f6c3..653ca3b 100644 (file)
@@ -1462,8 +1462,9 @@ void ble_delet_all_AlarmInfo(void)
     if( 0==AlmmgrGetManagement(&data))
     {
      
-        for(int i=0;i<data.eventAlarmCnt;i++)
+        for(int i=0;i<EVENT_ALARM_CLOCK_MAX;i++)
         {
+            if(data.eventAlarmInfo[i].alarmClockId==i && data.eventAlarmInfo[i].alarmType==TYPE_EVENT_ALARM_CLOCK)
             AlmmgrDeleteAlarmClock(&data.eventAlarmInfo[i]);
         }
     }
@@ -1520,60 +1521,65 @@ char * struct_to_json_buf_malloc_Alarm(void)
     if( 0==AlmmgrGetManagement(&data))
     {
      
-        for(int i=0;i<data.eventAlarmCnt;i++)
+
+        for(int i=0;i<EVENT_ALARM_CLOCK_MAX;i++)
         {
-            cJSON* itemJSON = cJSON_CreateObject();
-              WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.eventAlarmInfo[i].alarmClockId);
-            cJSON_AddNumberToObject(itemJSON,"id",data.eventAlarmInfo[i].alarmClockId);
+            if(data.eventAlarmInfo[i].alarmClockId==i && data.eventAlarmInfo[i].alarmType==TYPE_EVENT_ALARM_CLOCK)
+            {
+                cJSON* itemJSON = cJSON_CreateObject();
+                WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.eventAlarmInfo[i].alarmClockId);
+                cJSON_AddNumberToObject(itemJSON,"id",data.eventAlarmInfo[i].alarmClockId);
 
-              WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟使能:%d\r\n",data.eventAlarmInfo[i].alarmClockEnable);
-            cJSON_AddNumberToObject(itemJSON,"enable",data.eventAlarmInfo[i].alarmClockEnable);
+                WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟使能:%d\r\n",data.eventAlarmInfo[i].alarmClockEnable);
+                cJSON_AddNumberToObject(itemJSON,"enable",data.eventAlarmInfo[i].alarmClockEnable);
 
-              WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟重复:%d\r\n",data.eventAlarmInfo[i].repeatPeriod);
-            int anNum[7] = {0};
-            int repeatPeriod_num=0;
-            for(int j=0 ; j<7;j++)
-            {
-                if(data.eventAlarmInfo[i].repeatPeriod & 0b00000001<<j)
+                WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟重复:%d\r\n",data.eventAlarmInfo[i].repeatPeriod);
+                int anNum[7] = {0};
+                int repeatPeriod_num=0;
+                for(int j=0 ; j<7;j++)
                 {
-                    if(j==0)
-                    {
-                        anNum[repeatPeriod_num]=7;
-                    }
-                    else
+                    if(data.eventAlarmInfo[i].repeatPeriod & 0b00000001<<j)
                     {
-                        anNum[repeatPeriod_num]=j;
-                    }
-                  
+                        if(j==0)
+                        {
+                            anNum[repeatPeriod_num]=7;
+                        }
+                        else
+                        {
+                            anNum[repeatPeriod_num]=j;
+                        }
                     
-                    repeatPeriod_num++;
+                        
+                        repeatPeriod_num++;
+                    }
                 }
-            }
-            if(repeatPeriod_num==0)
-            {
-                repeatPeriod_num=1;
-            }
-            cJSON* repeatPeriod= cJSON_CreateIntArray(anNum,repeatPeriod_num);
-            
-            cJSON_AddItemToObject(itemJSON,"repeat",repeatPeriod);
+                if(repeatPeriod_num==0)
+                {
+                    repeatPeriod_num=1;
+                }
+                cJSON* repeatPeriod= cJSON_CreateIntArray(anNum,repeatPeriod_num);
+                
+                cJSON_AddItemToObject(itemJSON,"repeat",repeatPeriod);
 
 
-            uint8_t refreshHour = data.eventAlarmInfo[i].alarmTime >> 16; // 闹钟存储小时位需要右移16位
-            
-            uint8_t refreshMin = data.eventAlarmInfo[i].alarmTime & 0x00FF; // 得出闹钟时间的分钟位需要将左置位16位清零
+                uint8_t refreshHour = data.eventAlarmInfo[i].alarmTime >> 16; // 闹钟存储小时位需要右移16位
+                
+                uint8_t refreshMin = data.eventAlarmInfo[i].alarmTime & 0x00FF; // 得出闹钟时间的分钟位需要将左置位16位清零
 
-            cJSON_AddNumberToObject(itemJSON,"hour",refreshHour);
+                cJSON_AddNumberToObject(itemJSON,"hour",refreshHour);
 
-            cJSON_AddNumberToObject(itemJSON,"minute",refreshMin);
+                cJSON_AddNumberToObject(itemJSON,"minute",refreshMin);
 
-            cJSON_AddItemReferenceToArray(data_arryJSON,itemJSON);
+                cJSON_AddItemReferenceToArray(data_arryJSON,itemJSON);
 
+            }
+           
              //cJSON_AddNumberToObject(itemJSON,"src",data->src);
         }
        
-        //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.alarmTime);
-        //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.repeatPeriod);
-        //   WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.alarmClockEnable);
+          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.alarmTime);
+          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.repeatPeriod);
+          WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"闹钟数据:%d\r\n",data.alarmClockEnable);
        // i++;
     }
      else
index e0e16f1..f18af43 100644 (file)
@@ -926,6 +926,7 @@ void MsgCenterNotifyCatIncomingCallProc(const Topic topic, Request* req)
         }
     
         stopPlayingMusic();
+        PlayersModel::GetInstance()->HandPausePhoneMusic(); // 暂停手机音乐
 
         const power_display_svr_api_t *display_api = power_display_svr_get_api();
         if (display_api->get_screen_state() != SCREEN_ON)
@@ -965,7 +966,7 @@ void MsgCenterNotifyCat1CallConnectedProc(const Topic topic, Request* req)
     }
     AlarmClockModel::GetInstance()->AlarmPlayerStop();
      //AlarmViewEventListener::GetInstance()->CancelAlarmRing();
-    uapi_cat1_start_volte_voice();
+     do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0);
 
     CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
 
@@ -980,6 +981,7 @@ void MsgCenterNotifyCat1CallConnectedProc(const Topic topic, Request* req)
 }
 #include "BluetoothModelC.h"
 #include "audio_manager_c_wrapper.h"
+#include "PhoneService.h"
 //拨号处理函数
 void MsgCenterNotifyCat1dialProc(const Topic topic, Request* req)
 {
@@ -996,11 +998,8 @@ void MsgCenterNotifyCat1dialProc(const Topic topic, Request* req)
     // int ret = PlayersModel::GetInstance()->PlayerStop();
     stopPlayingMusic();
     
-    // PlayersModel::GetInstance()->HandPausePhoneMusci(); // 暂停手机音乐
-    // AudioManagerDeactivateInterrupt();
-    //BtA2dpSnkAudioDestroy();
+   
 
-    //uapi_hfp_disconnect();
     if(strcmp(call_data,"SOS")==0)
     {
         free(call_data);
@@ -1008,15 +1007,20 @@ void MsgCenterNotifyCat1dialProc(const Topic topic, Request* req)
         return;
     }
     
-    cat1_call_dial(call_data);
+        cat1_call_dial(call_data);
+  
+        CallerLogModel::GetInstance()->SetoperateNumber(call_data,req->len);
 
-    uapi_cat1_start_volte_voice();
+        CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
+        NotificationManager::GetInstance()->SetWatchCallStatus(true);
 
-    CallerLogModel::GetInstance()->SetoperateNumber(call_data,req->len);
-    CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
 
-    cat1_phone_state_change_cb(OPERATE_DIALING);
-    NotificationManager::GetInstance()->SetWatchCallStatus(true);
+        cat1_phone_state_change_cb(OPERATE_DIALING);
+   
+        do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT1_AUDIO_START, nullptr, 0);
+        
+     
+   
     }
     free(call_data);
 }
index eca7931..8e1960a 100644 (file)
@@ -213,7 +213,7 @@ namespace OHOS
             break;
         case GOAL_STEP:
             tag = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEPCOUNT);;
-            tagString=std::to_string(tag);
+            tagString=std::to_string(tag)+"steps";
             break;
     default:
         break;
@@ -304,7 +304,7 @@ namespace OHOS
                     break;
                 case GOAL_STEP:
                     tag = ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_SPORTS_GOAL_STEPCOUNT);;
-                    tagString=std::to_string(tag);
+                    tagString=std::to_string(tag)+"steps";
                     break;
             default:
                 break;
index 4811b31..50ae4ae 100644 (file)
@@ -309,6 +309,13 @@ static void custom_cmd_service_check_task(void const *arg)
         case CUSTOM_CMD_MSG_CHECK_DIAL_SPACE:
             check_dial_space();
             break;
+        case CUSTOM_CMD_MSG_CAT1_AUDIO_START:
+            cat1_audio_AudioSetup();
+            break;
+        case CUSTOM_CMD_MSG_CAT1_AUDIO_STOP:
+            cat1_audio_AudioRelease();
+            break;
+            
         default:
             PRINT("Unknown CUSTOM_CMD_MSG cmd 0x%02X \r\n", mail.cmd);
             break;
index 2f8ccb1..aa299e6 100644 (file)
@@ -226,6 +226,9 @@ uint32_t uapi_calendar_store_date(void);
 
 #define CUSTOM_CMD_MSG_CHECK_DIAL_SPACE 0x12
 
+#define CUSTOM_CMD_MSG_CAT1_AUDIO_START 0x13
+
+#define CUSTOM_CMD_MSG_CAT1_AUDIO_STOP 0x14
 typedef enum {
     BR_HFP_CONNECT=1,
     BR_HFP_DISCONNECT,