添加手机同步歌曲到手表,手表音乐列表同步刷新。
authorluozheng <1732036298@qq.com>
Mon, 19 Aug 2024 09:31:20 +0000 (17:31 +0800)
committerluozheng <1732036298@qq.com>
Mon, 19 Aug 2024 09:31:20 +0000 (17:31 +0800)
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/ble_service/blemoder/bletest.h
code/sdk/application/wearable/service/ble_service/bleservice/bleEvent.c

index 60517bc..7205a9f 100644 (file)
@@ -782,12 +782,12 @@ void PlayersModel::SetMusicSource(bool value)
 void PlayersModel::UpdateMusicPlayerList(void)
 {
     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PlayersModel::UpdateMusicPlayerList");
+    PlayersListGroup::GetInstance()->SetUpListCase();
     PlayersView *playersView = PlayersView::GetInstance();
     if (playersView == nullptr) {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OptionsButtonOnClick playersView nullptr err");
         return;
     }
-    PlayersListGroup::GetInstance()->SetUpListCase();
     if(playersView->GetMusicListList()) 
     {
         playersView->GetMusicListList()->RefreshList();
index 4169bff..bfdf9ef 100644 (file)
@@ -2042,6 +2042,13 @@ void SendDtfmStrNumberToCat1(char ch) // ble发送单个字符到CAT1 DTMF功能
     send_dtfm_number_toCat1(ch);
 }
 
+void ble_mp3_list_update(void)
+{
+#ifdef FD230
+    SendMsgToUIService(UI_UPDATE_MUSIC_PLAYER_LIST,0,nullptr,0);
+#endif
+} 
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index 76e5559..5d54a92 100644 (file)
@@ -306,7 +306,7 @@ typedef struct Tag_ID3V2_TAG
 }Tag_ID3V2_TAG_T;
 
 
-
+void ble_mp3_list_update(void);
 
 char * dir_to_json_buf_malloc_(uint8_t type);
 
index 58cd7ff..48b1c26 100644 (file)
@@ -6468,6 +6468,7 @@ void decode_file_checksum(ble_read_data *buffer_handle)
                 case 2://mp3\r
 \r
                     ble_reply_cmd(DIAL_INSTALL_REPY_CMD,1);\r
+                    ble_mp3_list_update();\r
 \r
                     break;\r
                 case 3://dial\r