mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Added option tolog memory usage
This commit is contained in:
@@ -21,6 +21,7 @@ package eu.faircode.email;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Debug;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
@@ -120,6 +121,13 @@ public class EntityLog {
|
||||
if (!main_log)
|
||||
return;
|
||||
|
||||
boolean main_log_memory = prefs.getBoolean("main_log_memory", false);
|
||||
if (main_log_memory) {
|
||||
long j = Log.getAvailableMb() - Log.getFreeMemMb();
|
||||
long n = Debug.getNativeHeapSize() / 1024L / 1024L;
|
||||
data = j + "/" + n + " " + data;
|
||||
}
|
||||
|
||||
final EntityLog entry = new EntityLog();
|
||||
entry.time = new Date().getTime();
|
||||
entry.type = type;
|
||||
|
||||
Reference in New Issue
Block a user