mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Reorder crash logs
to remove the starting new line at each log
This commit is contained in:
parent
29621c755a
commit
313120307b
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ class CrashLogUtil(private val context: Context) {
|
|||
fun dumpLogs() {
|
||||
try {
|
||||
val file = context.createFileInCacheDir("tachiyomi_crash_logs.txt")
|
||||
Runtime.getRuntime().exec("logcat *:E -d -f ${file.absolutePath}")
|
||||
file.appendText(getDebugInfo())
|
||||
Runtime.getRuntime().exec("logcat *:E -d -f ${file.absolutePath}")
|
||||
|
||||
showNotification(file.getUriCompat(context))
|
||||
} catch (e: IOException) {
|
||||
|
@ -33,7 +33,6 @@ class CrashLogUtil(private val context: Context) {
|
|||
}
|
||||
fun getDebugInfo(): String {
|
||||
return """
|
||||
|
||||
App version: ${BuildConfig.VERSION_NAME} (${BuildConfig.FLAVOR}, ${BuildConfig.COMMIT_SHA}, ${BuildConfig.VERSION_CODE}, ${BuildConfig.BUILD_TIME})
|
||||
Android version: ${Build.VERSION.RELEASE} (SDK ${Build.VERSION.SDK_INT})
|
||||
Android build ID: ${Build.DISPLAY}
|
||||
|
@ -42,6 +41,7 @@ class CrashLogUtil(private val context: Context) {
|
|||
Device name: ${Build.DEVICE}
|
||||
Device model: ${Build.MODEL}
|
||||
Device product name: ${Build.PRODUCT}
|
||||
|
||||
""".trimIndent()
|
||||
}
|
||||
private fun showNotification(uri: Uri) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue