mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 01:23:38 +02:00
Extra logging option
This commit is contained in:
@@ -109,8 +109,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
private Button btnMore;
|
||||
|
||||
private SwitchCompat swProtocol;
|
||||
private SwitchCompat swLogInfo;
|
||||
private SwitchCompat swDebug;
|
||||
private SwitchCompat swInfo;
|
||||
private SwitchCompat swExpunge;
|
||||
private SwitchCompat swAuthPlain;
|
||||
private SwitchCompat swAuthLogin;
|
||||
@@ -206,8 +206,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
btnMore = view.findViewById(R.id.btnMore);
|
||||
|
||||
swProtocol = view.findViewById(R.id.swProtocol);
|
||||
swLogInfo = view.findViewById(R.id.swLogInfo);
|
||||
swDebug = view.findViewById(R.id.swDebug);
|
||||
swInfo = view.findViewById(R.id.swInfo);
|
||||
swExpunge = view.findViewById(R.id.swExpunge);
|
||||
swAuthPlain = view.findViewById(R.id.swAuthPlain);
|
||||
swAuthLogin = view.findViewById(R.id.swAuthLogin);
|
||||
@@ -469,6 +469,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
}
|
||||
});
|
||||
|
||||
swLogInfo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putInt("log_level", checked ? android.util.Log.INFO : android.util.Log.WARN).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -477,13 +484,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
}
|
||||
});
|
||||
|
||||
swInfo.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putInt("log_level", checked ? android.util.Log.INFO : android.util.Log.WARN).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swProtocol.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -875,8 +875,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
swCleanupAttachments.setChecked(prefs.getBoolean("cleanup_attachments", false));
|
||||
|
||||
swProtocol.setChecked(prefs.getBoolean("protocol", false));
|
||||
swLogInfo.setChecked(prefs.getInt("log_level", Log.getDefaultLogLevel()) <= android.util.Log.INFO);
|
||||
swDebug.setChecked(prefs.getBoolean("debug", false));
|
||||
swInfo.setChecked(prefs.getInt("log_level", Log.getDefaultLogLevel()) <= android.util.Log.INFO);
|
||||
swExpunge.setChecked(prefs.getBoolean("perform_expunge", true));
|
||||
swAuthPlain.setChecked(prefs.getBoolean("auth_plain", true));
|
||||
swAuthLogin.setChecked(prefs.getBoolean("auth_login", true));
|
||||
|
||||
Reference in New Issue
Block a user