ErrorReporter: Remove and add a few build constants to the report.

This commit is contained in:
Andreas Schildbach 2018-11-30 15:24:23 +01:00
parent 4d638b0b02
commit cfabfa2ea8

View file

@ -179,6 +179,7 @@ public class ErrorReporter implements Thread.UncaughtExceptionHandler {
final Configuration config = res.getConfiguration();
final ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
report.append("Manufacturer: " + Build.MANUFACTURER + "\n");
report.append("Phone Model: " + Build.MODEL + "\n");
report.append("Android Version: " + Build.VERSION.RELEASE + "\n");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
@ -188,20 +189,14 @@ public class ErrorReporter implements Thread.UncaughtExceptionHandler {
report.append("Board: " + Build.BOARD + "\n");
report.append("Brand: " + Build.BRAND + "\n");
report.append("Device: " + Build.DEVICE + "\n");
report.append("Display: " + Build.DISPLAY + "\n");
report.append("Finger Print: " + Build.FINGERPRINT + "\n");
report.append("Host: " + Build.HOST + "\n");
report.append("ID: " + Build.ID + "\n");
report.append("Manufacturer: " + Build.MANUFACTURER + "\n");
report.append("Model: " + Build.MODEL + "\n");
report.append("Product: " + Build.PRODUCT + "\n");
report.append("Tags: " + Build.TAGS + "\n");
report.append("Time: " + Build.TIME + "\n");
report.append("Type: " + Build.TYPE + "\n");
report.append("User: " + Build.USER + "\n");
report.append("Configuration: " + config + "\n");
report.append("Screen Layout: size " + (config.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) + " long "
+ (config.screenLayout & Configuration.SCREENLAYOUT_LONG_MASK) + "\n");
report.append("Screen Layout:" //
+ " size " + (config.screenLayout & android.content.res.Configuration.SCREENLAYOUT_SIZE_MASK) //
+ " long " + (config.screenLayout & android.content.res.Configuration.SCREENLAYOUT_LONG_MASK) //
+ " layoutdir " + (config.screenLayout & android.content.res.Configuration.SCREENLAYOUT_LAYOUTDIR_MASK) //
+ " round " + (config.screenLayout & android.content.res.Configuration.SCREENLAYOUT_ROUND_MASK) + "\n");
report.append("Display Metrics: " + res.getDisplayMetrics() + "\n");
report.append("Memory Class: " + activityManager.getMemoryClass() + "/" + activityManager.getLargeMemoryClass()
+ (ActivityManagerCompat.isLowRamDevice(activityManager) ? " (low RAM device)" : "") + "\n");