mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Moved query threads to debug mode
This commit is contained in:
parent
025ebcb730
commit
cf3b4ac130
2 changed files with 77 additions and 72 deletions
|
@ -97,8 +97,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
private SwitchCompat swUpdates;
|
private SwitchCompat swUpdates;
|
||||||
private SwitchCompat swExperiments;
|
private SwitchCompat swExperiments;
|
||||||
private TextView tvExperimentsHint;
|
private TextView tvExperimentsHint;
|
||||||
private SwitchCompat swQueries;
|
|
||||||
private SwitchCompat swWal;
|
|
||||||
private SwitchCompat swCrashReports;
|
private SwitchCompat swCrashReports;
|
||||||
private TextView tvUuid;
|
private TextView tvUuid;
|
||||||
private Button btnReset;
|
private Button btnReset;
|
||||||
|
@ -111,6 +109,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
private SwitchCompat swProtocol;
|
private SwitchCompat swProtocol;
|
||||||
private SwitchCompat swLogInfo;
|
private SwitchCompat swLogInfo;
|
||||||
private SwitchCompat swDebug;
|
private SwitchCompat swDebug;
|
||||||
|
private SwitchCompat swQueries;
|
||||||
|
private SwitchCompat swWal;
|
||||||
private SwitchCompat swExpunge;
|
private SwitchCompat swExpunge;
|
||||||
private SwitchCompat swAuthPlain;
|
private SwitchCompat swAuthPlain;
|
||||||
private SwitchCompat swAuthLogin;
|
private SwitchCompat swAuthLogin;
|
||||||
|
@ -194,8 +194,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
swUpdates = view.findViewById(R.id.swUpdates);
|
swUpdates = view.findViewById(R.id.swUpdates);
|
||||||
swExperiments = view.findViewById(R.id.swExperiments);
|
swExperiments = view.findViewById(R.id.swExperiments);
|
||||||
tvExperimentsHint = view.findViewById(R.id.tvExperimentsHint);
|
tvExperimentsHint = view.findViewById(R.id.tvExperimentsHint);
|
||||||
swQueries = view.findViewById(R.id.swQueries);
|
|
||||||
swWal = view.findViewById(R.id.swWal);
|
|
||||||
swCrashReports = view.findViewById(R.id.swCrashReports);
|
swCrashReports = view.findViewById(R.id.swCrashReports);
|
||||||
tvUuid = view.findViewById(R.id.tvUuid);
|
tvUuid = view.findViewById(R.id.tvUuid);
|
||||||
btnReset = view.findViewById(R.id.btnReset);
|
btnReset = view.findViewById(R.id.btnReset);
|
||||||
|
@ -208,6 +206,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
swProtocol = view.findViewById(R.id.swProtocol);
|
swProtocol = view.findViewById(R.id.swProtocol);
|
||||||
swLogInfo = view.findViewById(R.id.swLogInfo);
|
swLogInfo = view.findViewById(R.id.swLogInfo);
|
||||||
swDebug = view.findViewById(R.id.swDebug);
|
swDebug = view.findViewById(R.id.swDebug);
|
||||||
|
swQueries = view.findViewById(R.id.swQueries);
|
||||||
|
swWal = view.findViewById(R.id.swWal);
|
||||||
swExpunge = view.findViewById(R.id.swExpunge);
|
swExpunge = view.findViewById(R.id.swExpunge);
|
||||||
swAuthPlain = view.findViewById(R.id.swAuthPlain);
|
swAuthPlain = view.findViewById(R.id.swAuthPlain);
|
||||||
swAuthLogin = view.findViewById(R.id.swAuthLogin);
|
swAuthLogin = view.findViewById(R.id.swAuthLogin);
|
||||||
|
@ -398,23 +398,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
swQueries.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
||||||
if (checked)
|
|
||||||
prefs.edit().putInt("query_threads", 2).commit(); // apply won't work here
|
|
||||||
else
|
|
||||||
prefs.edit().remove("query_threads").commit(); // apply won't work here
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
swWal.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
||||||
prefs.edit().putBoolean("wal", checked).commit(); // apply won't work here
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
swCrashReports.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swCrashReports.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -484,6 +467,23 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
swQueries.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
if (checked)
|
||||||
|
prefs.edit().putInt("query_threads", 2).commit(); // apply won't work here
|
||||||
|
else
|
||||||
|
prefs.edit().remove("query_threads").commit(); // apply won't work here
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
swWal.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
prefs.edit().putBoolean("wal", checked).commit(); // apply won't work here
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
swProtocol.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swProtocol.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -868,8 +868,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
Helper.isPlayStoreInstall() || !Helper.hasValidFingerprint(getContext())
|
Helper.isPlayStoreInstall() || !Helper.hasValidFingerprint(getContext())
|
||||||
? View.GONE : View.VISIBLE);
|
? View.GONE : View.VISIBLE);
|
||||||
swExperiments.setChecked(prefs.getBoolean("experiments", false));
|
swExperiments.setChecked(prefs.getBoolean("experiments", false));
|
||||||
swQueries.setChecked(prefs.getInt("query_threads", 4) < 4);
|
|
||||||
swWal.setChecked(prefs.getBoolean("wal", true));
|
|
||||||
swCrashReports.setChecked(prefs.getBoolean("crash_reports", false));
|
swCrashReports.setChecked(prefs.getBoolean("crash_reports", false));
|
||||||
tvUuid.setText(prefs.getString("uuid", null));
|
tvUuid.setText(prefs.getString("uuid", null));
|
||||||
swCleanupAttachments.setChecked(prefs.getBoolean("cleanup_attachments", false));
|
swCleanupAttachments.setChecked(prefs.getBoolean("cleanup_attachments", false));
|
||||||
|
@ -877,6 +875,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
swProtocol.setChecked(prefs.getBoolean("protocol", false));
|
swProtocol.setChecked(prefs.getBoolean("protocol", false));
|
||||||
swLogInfo.setChecked(prefs.getInt("log_level", Log.getDefaultLogLevel()) <= android.util.Log.INFO);
|
swLogInfo.setChecked(prefs.getInt("log_level", Log.getDefaultLogLevel()) <= android.util.Log.INFO);
|
||||||
swDebug.setChecked(prefs.getBoolean("debug", false));
|
swDebug.setChecked(prefs.getBoolean("debug", false));
|
||||||
|
swQueries.setChecked(prefs.getInt("query_threads", 4) < 4);
|
||||||
|
swWal.setChecked(prefs.getBoolean("wal", true));
|
||||||
swExpunge.setChecked(prefs.getBoolean("perform_expunge", true));
|
swExpunge.setChecked(prefs.getBoolean("perform_expunge", true));
|
||||||
swAuthPlain.setChecked(prefs.getBoolean("auth_plain", true));
|
swAuthPlain.setChecked(prefs.getBoolean("auth_plain", true));
|
||||||
swAuthLogin.setChecked(prefs.getBoolean("auth_login", true));
|
swAuthLogin.setChecked(prefs.getBoolean("auth_login", true));
|
||||||
|
|
|
@ -303,52 +303,6 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/swExperiments" />
|
app:layout_constraintTop_toBottomOf="@id/swExperiments" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/swQueries"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:text="@string/title_advanced_query_threads"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvExperimentsHint"
|
|
||||||
app:switchPadding="12dp" />
|
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
|
||||||
android:id="@+id/tvQueriesHint"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="48dp"
|
|
||||||
android:text="@string/title_advanced_queries_hint"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/swQueries" />
|
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
|
||||||
android:id="@+id/tvQueriesRemark"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="48dp"
|
|
||||||
android:text="@string/title_advanced_english_hint"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvQueriesHint" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/swWal"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:text="@string/title_advanced_wal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvQueriesRemark"
|
|
||||||
app:switchPadding="12dp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/swCrashReports"
|
android:id="@+id/swCrashReports"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -357,7 +311,7 @@
|
||||||
android:text="@string/title_advanced_crash_reports"
|
android:text="@string/title_advanced_crash_reports"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/swWal"
|
app:layout_constraintTop_toBottomOf="@id/tvExperimentsHint"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
<eu.faircode.email.FixedTextView
|
||||||
|
@ -517,6 +471,52 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/swDebug" />
|
app:layout_constraintTop_toBottomOf="@id/swDebug" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/swQueries"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="@string/title_advanced_query_threads"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvDebugHint"
|
||||||
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
|
<eu.faircode.email.FixedTextView
|
||||||
|
android:id="@+id/tvQueriesHint"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="48dp"
|
||||||
|
android:text="@string/title_advanced_queries_hint"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/swQueries" />
|
||||||
|
|
||||||
|
<eu.faircode.email.FixedTextView
|
||||||
|
android:id="@+id/tvQueriesRemark"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="48dp"
|
||||||
|
android:text="@string/title_advanced_english_hint"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textStyle="italic"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvQueriesHint" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/swWal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="@string/title_advanced_wal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvQueriesRemark"
|
||||||
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/swExpunge"
|
android:id="@+id/swExpunge"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -526,7 +526,7 @@
|
||||||
android:text="@string/title_advanced_expunge"
|
android:text="@string/title_advanced_expunge"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvDebugHint"
|
app:layout_constraintTop_toBottomOf="@id/swWal"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
@ -664,6 +664,11 @@
|
||||||
android:id="@+id/grpDebug"
|
android:id="@+id/grpDebug"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:constraint_referenced_ids="swWal,swExpunge,swAuthPlain,swAuthLogin,swAuthNtlm,swAuthSasl,tvProcessors,tvMemoryClass,tvMemoryUsage,tvStorageUsage,tvFingerprint,btnCharsets,btnCiphers,btnFiles" />
|
app:constraint_referenced_ids="
|
||||||
|
swQueries,tvQueriesHint,tvQueriesRemark,swWal,
|
||||||
|
swExpunge,
|
||||||
|
swAuthPlain,swAuthLogin,swAuthNtlm,swAuthSasl,
|
||||||
|
tvProcessors,tvMemoryClass,tvMemoryUsage,tvStorageUsage,
|
||||||
|
tvFingerprint,btnCharsets,btnCiphers,btnFiles" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</eu.faircode.email.ScrollViewEx>
|
</eu.faircode.email.ScrollViewEx>
|
||||||
|
|
Loading…
Reference in a new issue