refact: rename logcat file

Rename logcat file to prevent override
This commit is contained in:
int3debug 2024-04-28 13:09:31 +02:00
parent 138e1a1f0e
commit 74dd37abbe
1 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,9 @@ import okhttp3.internal.closeQuietly
import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.OutputStream
import java.lang.System.currentTimeMillis
import java.text.SimpleDateFormat
import java.util.*
class SettingsUpdates : PreferenceFragmentCompat() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@ -125,12 +128,12 @@ class SettingsUpdates : PreferenceFragmentCompat() {
}
binding.saveBtt.setOnClickListener {
val date = SimpleDateFormat("yyyy_MM_dd_HH_mm").format(Date(currentTimeMillis()))
var fileStream: OutputStream? = null
try {
fileStream =
VideoDownloadManager.setupStream(
fileStream = VideoDownloadManager.setupStream(
it.context,
"logcat",
"logcat_${date}",
null,
"txt",
false