mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-11 09:28:35 +00:00
parent
6fceb25121
commit
b8bb2b78bd
@ -466,11 +466,11 @@ public class SubmitLogFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getMemoryUsage(Context context) {
|
public static String getMemoryUsage(Context context) {
|
||||||
Runtime info = Runtime.getRuntime();
|
Runtime info = Runtime.getRuntime();
|
||||||
info.totalMemory();
|
long totalMemory = info.totalMemory();
|
||||||
return String.format(Locale.ENGLISH, "%dM (%.2f%% free, %dM max)",
|
return String.format(Locale.ENGLISH, "%dM (%.2f%% free, %dM max)",
|
||||||
asMegs(info.totalMemory()),
|
asMegs(totalMemory),
|
||||||
(float)info.freeMemory() / info.totalMemory() * 100f,
|
(float)info.freeMemory() / totalMemory * 100f,
|
||||||
asMegs(info.maxMemory()));
|
asMegs(info.maxMemory()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user