From a82d3984fa99dab55c45b71ea9ee92272eb2d786 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Sat, 22 Oct 2022 15:59:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=BC=82=E5=B8=B8=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/NeverCrashUtils.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java b/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java index b36fe9f3d..524c37b1f 100644 --- a/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java +++ b/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java @@ -2,6 +2,7 @@ package com.shayu.phonelive; import android.app.Application; import android.content.Context; +import android.os.Build; import android.os.Handler; import android.os.Looper; import android.util.Log; @@ -13,6 +14,7 @@ import com.yunbao.common.utils.SpUtil; import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; +import java.util.Arrays; /** * @ClassName NeverCrashUtils @@ -128,11 +130,13 @@ public class NeverCrashUtils { } private static String throwableToString(Throwable e) { StringWriter writer=new StringWriter(); - writer.write("time="+System.currentTimeMillis()); - writer.write("\n"); - writer.write("UserData="); - writer.write(SpUtil.getInstance().getStringValue(SpUtil.USER_INFO)); - writer.write("\n"); + writer.write("time="+System.currentTimeMillis()+"\n"); + writer.write("AndroidVersion="+ Build.VERSION.SDK_INT+"\n"); + writer.write("AndroidName="+ Build.VERSION.RELEASE+"\n"); + writer.write("PhoneName="+ Build.BRAND+"\n"); + writer.write("Phone="+ Build.MODEL+"\n"); + writer.write("CPU="+ Arrays.toString(Build.SUPPORTED_ABIS) +"\n"); + writer.write("UserData="+SpUtil.getInstance().getStringValue(SpUtil.USER_INFO)+"\n"); writer.write("[ERROR]"); PrintWriter printWriter=new PrintWriter(writer); e.printStackTrace(printWriter);