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() {
|
fun dumpLogs() {
|
||||||
try {
|
try {
|
||||||
val file = context.createFileInCacheDir("tachiyomi_crash_logs.txt")
|
val file = context.createFileInCacheDir("tachiyomi_crash_logs.txt")
|
||||||
Runtime.getRuntime().exec("logcat *:E -d -f ${file.absolutePath}")
|
|
||||||
file.appendText(getDebugInfo())
|
file.appendText(getDebugInfo())
|
||||||
|
Runtime.getRuntime().exec("logcat *:E -d -f ${file.absolutePath}")
|
||||||
|
|
||||||
showNotification(file.getUriCompat(context))
|
showNotification(file.getUriCompat(context))
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
|
@ -33,7 +33,6 @@ class CrashLogUtil(private val context: Context) {
|
||||||
}
|
}
|
||||||
fun getDebugInfo(): String {
|
fun getDebugInfo(): String {
|
||||||
return """
|
return """
|
||||||
|
|
||||||
App version: ${BuildConfig.VERSION_NAME} (${BuildConfig.FLAVOR}, ${BuildConfig.COMMIT_SHA}, ${BuildConfig.VERSION_CODE}, ${BuildConfig.BUILD_TIME})
|
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 version: ${Build.VERSION.RELEASE} (SDK ${Build.VERSION.SDK_INT})
|
||||||
Android build ID: ${Build.DISPLAY}
|
Android build ID: ${Build.DISPLAY}
|
||||||
|
@ -42,6 +41,7 @@ class CrashLogUtil(private val context: Context) {
|
||||||
Device name: ${Build.DEVICE}
|
Device name: ${Build.DEVICE}
|
||||||
Device model: ${Build.MODEL}
|
Device model: ${Build.MODEL}
|
||||||
Device product name: ${Build.PRODUCT}
|
Device product name: ${Build.PRODUCT}
|
||||||
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
}
|
}
|
||||||
private fun showNotification(uri: Uri) {
|
private fun showNotification(uri: Uri) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue