Debug: low memory device indication

This commit is contained in:
M66B 2023-11-27 08:59:02 +01:00
parent 1df2e51815
commit 2e5966cfce
1 changed files with 3 additions and 2 deletions

View File

@ -2179,10 +2179,11 @@ public class Log {
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
am.getMemoryInfo(mi);
sb.append(String.format("Memory class: %d/%d Large: %s MB Total: %s\r\n",
sb.append(String.format("Memory class: %d/%d Large: %s MB Total: %s Low: %b\r\n",
am.getMemoryClass(), am.getLargeMemoryClass(),
largeHeap == null ? "?" : Boolean.toString(largeHeap),
Helper.humanReadableByteCount(mi.totalMem)));
Helper.humanReadableByteCount(mi.totalMem),
am.isLowRamDevice()));
long storage_available = Helper.getAvailableStorageSpace();
long storage_total = Helper.getTotalStorageSpace();