Collect garbage

pull/194/head
M66B 4 years ago
parent 6c8a534ff9
commit 91def72f0a

@ -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) {

@ -631,6 +631,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvStorageUsage" />
<Button
android:id="@+id/btnGC"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_gc"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvFingerprint" />
<Button
android:id="@+id/btnCharsets"
style="?android:attr/buttonStyleSmall"
@ -639,7 +649,7 @@
android:layout_marginTop="12dp"
android:text="@string/title_advanced_charsets"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvFingerprint" />
app:layout_constraintTop_toBottomOf="@id/btnGC" />
<Button
android:id="@+id/btnCiphers"
@ -670,6 +680,7 @@
swExpunge,
swAuthPlain,swAuthLogin,swAuthNtlm,swAuthSasl,
tvProcessors,tvMemoryClass,tvMemoryUsage,tvStorageUsage,
tvFingerprint,btnCharsets,btnCiphers,btnFiles" />
tvFingerprint,
btnGC,btnCharsets,btnCiphers,btnFiles" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

@ -550,6 +550,7 @@
<string name="title_advanced_memory_class" translatable="false">Memory class: %1$s/%2$s Total: %3$s</string>
<string name="title_advanced_memory_usage" translatable="false">Memory usage: %1$s/%2$s Native: %3$s</string>
<string name="title_advanced_storage_usage" translatable="false">Storage space: %1$s/%2$s App: %3$s</string>
<string name="title_advanced_gc" translatable="false">GC</string>
<string name="title_advanced_charsets" translatable="false">Charsets</string>
<string name="title_advanced_ciphers" translatable="false">Ciphers</string>
<string name="title_advanced_files" translatable="false">Files &gt;%1$s</string>

Loading…
Cancel
Save