优化
This commit is contained in:
@@ -81,7 +81,7 @@ class CrashHandler(val context: Context) : Thread.UncaughtExceptionHandler {
|
||||
LocalConfig.appCrash = true
|
||||
//保存日志文件
|
||||
saveCrashInfo2File(ex)
|
||||
if (ex is OutOfMemoryError && AppConfig.recordHeapDump) {
|
||||
if ((ex is OutOfMemoryError || ex.cause is OutOfMemoryError) && AppConfig.recordHeapDump) {
|
||||
doHeapDump()
|
||||
}
|
||||
context.longToastOnUiLegacy(ex.stackTraceStr)
|
||||
@@ -106,6 +106,7 @@ class CrashHandler(val context: Context) : Thread.UncaughtExceptionHandler {
|
||||
} catch (e: Throwable) {
|
||||
e.toString()
|
||||
}
|
||||
map["packageName"] = appCtx.packageName
|
||||
//获取app版本信息
|
||||
AppConst.appInfo.let {
|
||||
map["versionName"] = it.versionName
|
||||
|
||||
@@ -114,6 +114,7 @@ object LogUtils {
|
||||
e.toString()
|
||||
}
|
||||
append("WebViewUserAgent=").append(userAgent).append("\n")
|
||||
append("packageName=").append(appCtx.packageName).append("\n")
|
||||
//获取app版本信息
|
||||
AppConst.appInfo.let {
|
||||
append("versionName=").append(it.versionName).append("\n")
|
||||
|
||||
Reference in New Issue
Block a user