From 56ad2abaa75d3a4c0ed1ce38740b0ab18ecfee99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E4=BC=A0=E5=86=9B?= <1224667075@qq.com> Date: Wed, 31 Jul 2024 08:15:17 +0000 Subject: [PATCH] Merge #620 into sdk602patch0626 from refs/changes/620/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 胡传军 * refs/changes/620/head: (2 commits squashed) - 先屏蔽MP3获取作者和时长保证APP可以正常显示 - Merge branch 'sdk602patch0626' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0626 Signed-off-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/620 --- .../service/ble_service/blemoder/bletest.cpp | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp index 37721a2d2..414bf0c68 100644 --- a/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp +++ b/code/sdk/application/wearable/service/ble_service/blemoder/bletest.cpp @@ -39,6 +39,7 @@ //#include "AlarmClockModel.h" #include "AiVoiceModel.h" #include "SleepModel.h" +#include "BluetoothModel.h" //#include "AlarmClockModel.h" #ifdef __cplusplus #if __cplusplus @@ -74,6 +75,7 @@ extern "C" { #include #include + void ble_connect_ok(void) { SendMsgToUIService(PHONE_CONNECTED_TO_UI, 0, nullptr, 0); @@ -286,21 +288,21 @@ char * dir_to_json_buf_malloc_(uint8_t type) file_size = ftell(fp); // 获取当前文件指针位置,即文件大小 fseek(fp, 0, SEEK_SET); // 将文件指针移回文件开头 } - Tag_ID3V2_t tag={0}; - fread(tag.Header,3,1,fp); - fread(&tag.Ver,1,1,fp); - - memset_s(&Mp3Trailer,sizeof(Mp3Trailer),0,sizeof(Mp3Trailer)); - if(tag.Ver==3) - { - printf("%s\r\n",ent->d_name); - fseek(fp, 0, SEEK_SET); // 将文件指针移回文件开头 - Tag_read_ID3V2(fp); - } - else - { - printf("tag.Header %s %d\r\n",tag.Header,tag.Ver); - } + //Tag_ID3V2_t tag={0}; + // fread(tag.Header,3,1,fp); + // fread(&tag.Ver,1,1,fp); + + // memset_s(&Mp3Trailer,sizeof(Mp3Trailer),0,sizeof(Mp3Trailer)); + // if(tag.Ver==3) + // { + // printf("%s\r\n",ent->d_name); + // fseek(fp, 0, SEEK_SET); // 将文件指针移回文件开头 + // Tag_read_ID3V2(fp); + // } + // else + // { + // printf("tag.Header %s %d\r\n",tag.Header,tag.Ver); + // } fclose(fp); @@ -308,8 +310,8 @@ char * dir_to_json_buf_malloc_(uint8_t type) cJSON_AddNumberToObject(itemJSON,"uid",file_index); cJSON_AddStringToObject(itemJSON,"name",fileName.c_str()); cJSON_AddNumberToObject(itemJSON,"size",file_size); - cJSON_AddStringToObject(itemJSON,"artist",Mp3Trailer.Artist); - cJSON_AddStringToObject(itemJSON,"dur", "未知"); + // cJSON_AddStringToObject(itemJSON,"artist",Mp3Trailer.Artist); + // cJSON_AddStringToObject(itemJSON,"dur", "未知"); cJSON_AddItemReferenceToArray(data_arryJSON,itemJSON); file_index++; @@ -907,6 +909,8 @@ void ble_delet_all_AlarmInfo(void) void ble_SetAlarmInfo(uint32_t time_hour, uint32_t time_min, uint8_t week,uint8_t id,uint8_t enable) { + // OHOS::uapi_connect_pbap_pce(); + AlarmClockInfo eventAlarmInfo; WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AlarmClockModel::SetAlarmInfo!"); -- 2.17.1