Log memory size

This commit is contained in:
M66B
2020-07-21 19:06:41 +02:00
parent 88c8cc2c5a
commit 03e3895298
3 changed files with 9 additions and 3 deletions

View File

@@ -1114,7 +1114,10 @@ public class Log {
sb.append(String.format("Processors: %d\r\n", Runtime.getRuntime().availableProcessors()));
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
sb.append(String.format("Memory class: %d\r\n", am.getMemoryClass()));
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
am.getMemoryInfo(mi);
sb.append(String.format("Memory class: %d MB/%s\r\n",
am.getMemoryClass(), Helper.humanReadableByteCount(mi.totalMem)));
sb.append(String.format("Storage space: %s/%s\r\n",
Helper.humanReadableByteCount(Helper.getAvailableStorageSpace()),