@@ -30,6 +30,9 @@ import com.hjq.demo.R
3030import com.hjq.demo.aop.SingleClick
3131import com.hjq.demo.app.AppActivity
3232import com.hjq.demo.other.AppConfig
33+ import com.hjq.device.compat.DeviceBrand
34+ import com.hjq.device.compat.DeviceMarketName
35+ import com.hjq.device.compat.DeviceOs
3336import com.tencent.bugly.library.Bugly
3437import kotlinx.coroutines.Dispatchers
3538import kotlinx.coroutines.launch
@@ -165,8 +168,14 @@ class CrashActivity : AppActivity() {
165168 }
166169 }
167170 val builder: StringBuilder = StringBuilder ()
168- builder.append(" 设备品牌:\t " ).append(Build .BRAND )
169- .append(" \n 设备型号:\t " ).append(Build .MODEL )
171+ builder.append(" 设备品牌:\t " ).append(DeviceBrand .getBrandName())
172+
173+ val marketName = DeviceMarketName .getMarketName(this )
174+ if (! TextUtils .isEmpty(marketName)) {
175+ builder.append(" \n 设备名称:\t " ).append(marketName)
176+ }
177+
178+ builder.append(" \n 设备型号:\t " ).append(Build .MODEL )
170179 .append(" \n 设备类型:\t " ).append(if (isTabletDevice()) " 平板" else " 手机" )
171180
172181 builder.append(" \n 屏幕宽高:\t " ).append(screenWidth).append(" x " ).append(screenHeight)
@@ -179,6 +188,15 @@ class CrashActivity : AppActivity() {
179188 .append(" \n API 版本:\t " ).append(getSdkVersion())
180189 .append(" \n CPU 架构:\t " ).append(Build .SUPPORTED_ABIS [0 ])
181190
191+ val osName = DeviceOs .getOsName()
192+ if (! TextUtils .isEmpty(osName)) {
193+ builder.append(" \n 厂商系统:\t " ).append(osName)
194+ val osVersionName = DeviceOs .getOsVersionName()
195+ if (! TextUtils .isEmpty(osVersionName)) {
196+ builder.append(" \n 厂商版本:\t " ).append(osVersionName)
197+ }
198+ }
199+
182200 builder.append(" \n 应用版本:\t " ).append(AppConfig .getVersionName())
183201 .append(" \n 版本代码:\t " ).append(AppConfig .getVersionCode())
184202
0 commit comments