diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index 68f7846e46..ac5738caad 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -121,6 +121,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private TextView tvMemoryUsage; private TextView tvStorageUsage; private TextView tvFingerprint; + private Button btnGC; private Button btnCharsets; private Button btnCiphers; private Button btnFiles; @@ -218,6 +219,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc tvMemoryUsage = view.findViewById(R.id.tvMemoryUsage); tvStorageUsage = view.findViewById(R.id.tvStorageUsage); tvFingerprint = view.findViewById(R.id.tvFingerprint); + btnGC = view.findViewById(R.id.btnGC); btnCharsets = view.findViewById(R.id.btnCharsets); btnCiphers = view.findViewById(R.id.btnCiphers); btnFiles = view.findViewById(R.id.btnFiles); @@ -527,6 +529,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc } }); + btnGC.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Runtime.getRuntime().gc(); + } + }); + btnCharsets.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 72b39109de..e5feb2d615 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -631,6 +631,16 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvStorageUsage" /> +