Skip to content

Commit

Permalink
add clear crash buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Oct 15, 2023
1 parent 9222893 commit 6c65163
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/src/main/java/com/geode/launcher/utils/GeodeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ object GeodeUtils {
}
}

@JvmStatic
fun clearLogcatCrashBuffer(path: String): Boolean {
try {
val logcatProcess = Runtime.getRuntime().exec("logcat -c -b crash")

return true
}
catch (e: Exception) {
Log.e("Geode", "Failed to clear logcat crash buffer", e)
return false
}
}

@JvmStatic
fun writeLogcatCrashBuffer(path: String): Boolean {
try {
Expand Down

0 comments on commit 6c65163

Please sign in to comment.