fix: clear logcat buffer when starting recording
This commit is contained in:
@@ -399,7 +399,6 @@ private fun PlayerPageContent(
|
||||
player = media3Player,
|
||||
aspectRatio = uiState.aspectRatio,
|
||||
mirrorFlip = uiState.mirrorFlip,
|
||||
isBackgroundRetained = true,
|
||||
onSurfaceReady = {
|
||||
if (pendingAutoPlay && !media3Player.isPlaying) {
|
||||
pendingAutoPlay = false
|
||||
|
||||
@@ -82,6 +82,7 @@ class LogcatViewModel : ViewModel() {
|
||||
fun startRecording(context: Context) {
|
||||
recordStartTime = System.currentTimeMillis()
|
||||
isRecording = true
|
||||
Runtime.getRuntime().exec("logcat -c")
|
||||
getPrefs(context).edit {
|
||||
putBoolean("is_recording", true)
|
||||
putLong("start_time", recordStartTime)
|
||||
@@ -256,7 +257,6 @@ fun LogcatPage(onNavigateBack: () -> Unit) {
|
||||
val content = file.readText()
|
||||
withContext(Dispatchers.Main) {
|
||||
exportContent = content
|
||||
exportFileName = record.fileName
|
||||
exportLauncher.launch(record.fileName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user