Added exact alarm debug option

This commit is contained in:
M66B
2021-04-27 07:53:09 +02:00
parent f595f21f61
commit c1e6d7bf34
8 changed files with 98 additions and 34 deletions

View File

@@ -118,6 +118,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swAuthLogin;
private SwitchCompat swAuthNtlm;
private SwitchCompat swAuthSasl;
private SwitchCompat swExactAlarms;
private TextView tvProcessors;
private TextView tvMemoryClass;
private TextView tvMemoryUsage;
@@ -142,7 +143,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
"experiments", "wal", "query_threads", "crash_reports", "cleanup_attachments",
"protocol", "debug", "log_level",
"use_modseq", "perform_expunge",
"auth_plain", "auth_login", "auth_ntlm", "auth_sasl"
"auth_plain", "auth_login", "auth_ntlm", "auth_sasl",
"exact_alarms"
};
private final static String[] RESET_QUESTIONS = new String[]{
@@ -222,6 +224,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swAuthLogin = view.findViewById(R.id.swAuthLogin);
swAuthNtlm = view.findViewById(R.id.swAuthNtlm);
swAuthSasl = view.findViewById(R.id.swAuthSasl);
swExactAlarms = view.findViewById(R.id.swExactAlarms);
tvProcessors = view.findViewById(R.id.tvProcessors);
tvMemoryClass = view.findViewById(R.id.tvMemoryClass);
tvMemoryUsage = view.findViewById(R.id.tvMemoryUsage);
@@ -577,6 +580,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
swExactAlarms.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("exact_alarms", checked).apply();
}
});
btnGC.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -946,6 +956,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swAuthLogin.setChecked(prefs.getBoolean("auth_login", true));
swAuthNtlm.setChecked(prefs.getBoolean("auth_ntlm", true));
swAuthSasl.setChecked(prefs.getBoolean("auth_sasl", true));
swExactAlarms.setChecked(prefs.getBoolean("exact_alarms", false));
tvProcessors.setText(getString(R.string.title_advanced_processors, Runtime.getRuntime().availableProcessors()));