#include "uiservice/include/ui_service.h"
#include "custom_runtime.h"
#include "vibrator_service.h"
+#include <string.h>
namespace OHOS
{
std::string RecordingModel::recordTempDuration = 0;
std::string recordingFileName = GetRecordFileName(); // 录音文件名
std::string yyymmhhh_date = Getyyyymmhhh_date(); // 保存录音年月日时间
std::string TotalRecordDuration = RecordingModel::recordTempDuration; // 录音的总时长
- recordingInfo = {0};
+ // recordingInfo = {0};
+ memset(&recordingInfo, 0, sizeof(RecordingInfo));
strncpy_s(recordingInfo.recordingFileName, 32, recordingFileName.c_str(), recordingFileName.length());
strncpy_s(recordingInfo.recordingDuration, 16, TotalRecordDuration.c_str(), TotalRecordDuration.length());
strncpy_s(recordingInfo.recordingTime, 16, yyymmhhh_date.c_str(), yyymmhhh_date.length());