refact: rename logcat file (#1061)

Rename logcat file to prevent override
This commit is contained in:
int3debug 2024-05-02 23:59:05 +02:00 committed by GitHub
parent c07e6d3222
commit d3828eeafe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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