@@ -23,61 +23,59 @@ internal object DeviceUtils {
2323
2424 fun getDeviceDetails (context : Context ): String {
2525
26- return " ----------- Device info ----------- \n " +
27- " \n " +
26+ return " `` Device info `` $NEW_ROW " +
27+ NEW_ROW +
2828 " Report ID: ${UUID .randomUUID()} " +
29- " \n " +
30- " Device ID: ${getDeviceID(context)} \n " +
31- " Application version: ${getAppVersion(context)} \n " +
32- " Default launcher: ${getLaunchedFromApp(context)} \n " +
33- " Timezone name: ${TimeZone .getDefault().displayName} \n " +
34- " Timezone ID: ${TimeZone .getDefault().id} \n " +
35- " Version release: ${Build .VERSION .RELEASE } \n " +
36- " Version incremental : ${Build .VERSION .INCREMENTAL } \n " +
37- " Version SDK: ${Build .VERSION .SDK_INT } \n " +
38- " Board: ${Build .BOARD } \n " +
39- " Bootloader: ${Build .BOOTLOADER } \n " +
40- " Brand: ${Build .BRAND } \n " +
41- " CPU_ABIS_32: ${Build .SUPPORTED_32_BIT_ABIS .map { it }.mapWithoutNewLine().notAvailableIfNull()} \n " +
42- " CPU_ABIS_64: ${Build .SUPPORTED_64_BIT_ABIS .map { it }.mapWithoutNewLine().notAvailableIfNull()} \n " +
43- " Supported ABIS: ${Build .SUPPORTED_ABIS .map { it }.mapWithoutNewLine().notAvailableIfNull()} \n " +
44- " Device: ${Build .DEVICE } \n " +
45- " Display: ${Build .DISPLAY } \n " +
46- " Fingerprint: ${Build .FINGERPRINT } \n " +
47- " Hardware: ${Build .HARDWARE } \n " +
48- " Host: ${Build .HOST } \n " +
49- " ID: ${Build .ID } \n " +
50- " Manufacturer: ${Build .MANUFACTURER } \n " +
51- " Product: ${Build .PRODUCT } \n " +
52- " Build time: ${Build .TIME } \n " +
53- " Build time formatted: ${CrashyReporter .dateFormat.format(Date (Build .TIME ))} \n " +
54- " Type: ${Build .TYPE } \n " +
55- " Radio: ${getRadioVersion()} \n " +
56- " Tags: ${Build .TAGS } \n " +
57- " User: ${Build .USER } \n " +
58- " User IDs: ${getUserPlayIDs(context).notAvailableIfNull()} \n " +
59- " Is sustained performance mode supported: ${context.isSustainedPerformanceModeSupported} \n " +
60- " Is in power save mode: ${context.isInPowerSaveMode} \n " +
61- " Is in interactive state: ${context.isInInteractiveState} \n " +
62- " Is ignoring battery optimizations: ${context.isIgnoringBatteryOptimization} \n " +
63- " Thermal status: ${context.getThermalStatus} \n " +
64- " Location power save mode: ${context.locationPowerSaveMode} \n " +
65- " Is device idle: ${context.isDeviceIdle} \n " +
66- " Battery percentage: ${context.getBatteryPercentage} \n " +
67- " Battery remaining time: ${getChargeRemainingTime(context)} \n " +
68- " Is battery charging: ${context.isBatteryCharging.asYesOrNo()} \n " +
69- " Is device rooted: ${RootUtils .isDeviceRooted.asYesOrNo()} \n " +
70- " CPU Model: ${CPUInfo .getCPUModel().notAvailableIfNull()} \n " +
71- " # of CPU cores: ${CPUInfo .getNumberOfCores()} \n " +
72- " Up time with sleep: ${upTimeWithSleep()} \n " +
73- " Up time without sleep: ${upTimeWithoutSleep()} \n " +
74- " \n " +
75- " ----------- END of Device info -----------" +
76- " \n " +
77- " \n " +
29+ NEW_ROW +
30+ " Device ID: ${getDeviceID(context)}$NEW_ROW " +
31+ " Application version: ${getAppVersion(context)}$NEW_ROW " +
32+ " Default launcher: ${getLaunchedFromApp(context)}$NEW_ROW " +
33+ " Timezone name: ${TimeZone .getDefault().displayName}$NEW_ROW " +
34+ " Timezone ID: ${TimeZone .getDefault().id}$NEW_ROW " +
35+ " Version release: ${Build .VERSION .RELEASE }$NEW_ROW " +
36+ " Version incremental : ${Build .VERSION .INCREMENTAL }$NEW_ROW " +
37+ " Version SDK: ${Build .VERSION .SDK_INT }$NEW_ROW " +
38+ " Board: ${Build .BOARD }$NEW_ROW " +
39+ " Bootloader: ${Build .BOOTLOADER }$NEW_ROW " +
40+ " Brand: ${Build .BRAND }$NEW_ROW " +
41+ " CPU ABIS 32: ${Build .SUPPORTED_32_BIT_ABIS .joinToString { it }.notAvailableIfNull()}$NEW_ROW " +
42+ " CPU ABIS 64: ${Build .SUPPORTED_64_BIT_ABIS .joinToString { it }.notAvailableIfNull()}$NEW_ROW " +
43+ " Supported ABIS: ${Build .SUPPORTED_ABIS .joinToString { it }.notAvailableIfNull()}$NEW_ROW " +
44+ " Device: ${Build .DEVICE }$NEW_ROW " +
45+ " Display: ${Build .DISPLAY }$NEW_ROW " +
46+ " Fingerprint: ${Build .FINGERPRINT }$NEW_ROW " +
47+ " Hardware: ${Build .HARDWARE }$NEW_ROW " +
48+ " Host: ${Build .HOST }$NEW_ROW " +
49+ " ID: ${Build .ID }$NEW_ROW " +
50+ " Manufacturer: ${Build .MANUFACTURER }$NEW_ROW " +
51+ " Product: ${Build .PRODUCT }$NEW_ROW " +
52+ " Build time: ${Build .TIME }$NEW_ROW " +
53+ " Build time formatted: ${CrashyReporter .dateFormat.format(Date (Build .TIME ))}$NEW_ROW " +
54+ " Type: ${Build .TYPE }$NEW_ROW " +
55+ " Radio: ${getRadioVersion()}$NEW_ROW " +
56+ " Tags: ${Build .TAGS }$NEW_ROW " +
57+ " User: ${Build .USER }$NEW_ROW " +
58+ " User IDs: ${getUserPlayIDs(context).notAvailableIfNull()}$NEW_ROW " +
59+ " Is sustained performance mode supported: ${context.isSustainedPerformanceModeSupported}$NEW_ROW " +
60+ " Is in power save mode: ${context.isInPowerSaveMode}$NEW_ROW " +
61+ " Is in interactive state: ${context.isInInteractiveState}$NEW_ROW " +
62+ " Is ignoring battery optimizations: ${context.isIgnoringBatteryOptimization}$NEW_ROW " +
63+ " Thermal status: ${context.getThermalStatus}$NEW_ROW " +
64+ " Location power save mode: ${context.locationPowerSaveMode}$NEW_ROW " +
65+ " Is device idle: ${context.isDeviceIdle}$NEW_ROW " +
66+ " Battery percentage: ${context.getBatteryPercentage}$NEW_ROW " +
67+ " Battery remaining time: ${getChargeRemainingTime(context)}$NEW_ROW " +
68+ " Is battery charging: ${context.isBatteryCharging.asYesOrNo()}$NEW_ROW " +
69+ " Is device rooted: ${RootUtils .isDeviceRooted.asYesOrNo()}$NEW_ROW " +
70+ " CPU Model: ${CPUInfo .getCPUModel().notAvailableIfNull()}$NEW_ROW " +
71+ " Number of CPU cores: ${CPUInfo .getNumberOfCores()}$NEW_ROW " +
72+ " Up time with sleep: ${upTimeWithSleep()}$NEW_ROW " +
73+ " Up time without sleep: ${upTimeWithoutSleep()}$NEW_ROW " +
74+ NEW_ROW +
75+ " `` END of Device info ``" +
76+ NEW_ROW + NEW_ROW +
7877 appendExitReasons(context) +
79- " \n " +
80- " \n " +
78+ NEW_ROW + NEW_ROW +
8179 appendApplicationInfo(context)
8280 }
8381
@@ -96,9 +94,10 @@ internal object DeviceUtils {
9694
9795
9896 private fun appendExitReasons (context : Context ): String {
99- return " ########### Exit reasons ###########\n " +
100- " ${context.getExitReasons(maxRes = 3 ).notAvailableIfNullNewLine().replace(" [" , " " ).replace(" ]" , " " ).replace(" ," , " \n " )} \n " +
101- " ########### END of exit reasons ###########"
97+ return " `` Exit reasons ``$NEW_ROW " + NEW_ROW +
98+ " ${context.getExitReasons(maxRes = 3 ).notAvailableIfNullNewLine().replace(" [" , " " ).replace(" ]" , " " ).replace(" ," , NEW_ROW )}$NEW_ROW " +
99+ NEW_ROW +
100+ " `` END of exit reasons ``"
102101 }
103102
104103
@@ -151,11 +150,11 @@ internal object DeviceUtils {
151150
152151
153152 fun getRunningProcesses (context : Context ) =
154- " ^^^^^^^^^^^ Currently running foreground/background processes ^^^^^^^^^^^ \n " +
155- " \n " +
156- " ${context.getRunningProcesses()} \n " +
157- " \n " +
158- " ^^^^^^^^^^^ END of running foreground/background processes info ^^^^^^^^^^^ "
153+ " `` Currently running foreground/background processes `` $NEW_ROW " +
154+ NEW_ROW +
155+ " ${context.getRunningProcesses()}$NEW_ROW " +
156+ NEW_ROW +
157+ " `` END of running foreground/background processes info `` "
159158
160159
161160}
0 commit comments