This commit is contained in:
2025-12-04 09:22:44 +08:00
parent a9a702d381
commit d0c7c163af
2 changed files with 2 additions and 18 deletions

View File

@@ -62,8 +62,6 @@ class MainActivity : ComponentActivity() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R &&
!Environment.isExternalStorageManager()) {
showAllFilesAccessDialog()
} else {
}
// 初始化 PreferenceManager

View File

@@ -44,7 +44,6 @@ class UploadRepository(val context: Context) {
println("✅ UploadRepository: 文件上传成功, URL: $fileUrl")
fileUrl
} else {
// val errorMsg = response.body()?.message ?: "上传失败"
println("❌ UploadRepository: 文件上传失败: $1")
null
}
@@ -121,21 +120,8 @@ class UploadRepository(val context: Context) {
// 上传通话记录和关联的音频文件
suspend fun uploadCallRecordOnly(callRecord: CallRecord): Boolean {
return try {
var audioFileUrl: String? = null
// // 如果有音频文件,先上传音频文件
// callRecord.audioFileUri?.let { audioUri ->
// callRecord.audioFileName?.let { fileName ->
// println("🎵 UploadRepository: 开始上传关联的音频文件")
// audioFileUrl = uploadAudioFile(Uri.parse(audioUri), fileName)
// if (audioFileUrl == null) {
// println("⚠️ UploadRepository: 音频文件上传失败,但仍继续上传通话记录")
// }
// }
// }
// 然后上传通话记录
uploadCallRecord(callRecord, audioFileUrl)
// 上传通话记录
uploadCallRecord(callRecord)
} catch (e: Exception) {
println("❌ UploadRepository: 完整上传过程异常: ${e.message}")