Added two more tests

pull/194/merge
M66B 3 years ago
parent 813b8651b8
commit 0521d2e406

@ -319,7 +319,7 @@ public class ApplicationEx extends Application
editor.remove("crash_report_count");
if (!BuildConfig.TEST_RELEASE)
editor.remove("test1").remove("test2").remove("test3");
editor.remove("test1").remove("test2").remove("test3").remove("test4").remove("test5");
if (version < 468) {
editor.remove("notify_trash");

@ -145,7 +145,7 @@ public class FragmentOptions extends FragmentBase {
"swipe_reply",
"language_detection",
"quick_filter", "quick_scroll",
"experiments", "debug", "log_level", "test1", "test2", "test3", "webview_legacy",
"experiments", "debug", "log_level", "test1", "test2", "test3", "test4", "test5", "webview_legacy",
"biometrics",
"default_light"
};

@ -130,6 +130,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swTest1;
private SwitchCompat swTest2;
private SwitchCompat swTest3;
private SwitchCompat swTest4;
private SwitchCompat swTest5;
private Button btnRepair;
private SwitchCompat swAutostart;
@ -186,7 +188,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
"language", "deepl_enabled", "watchdog",
"updates", "weekly", "show_changelog",
"experiments", "crash_reports", "cleanup_attachments",
"protocol", "debug", "log_level", "test1", "test2", "test3",
"protocol", "debug", "log_level", "test1", "test2", "test3", "test4", "test5",
"query_threads", "wal", "checkpoints", "sqlite_cache",
"chunk_size", "webview_legacy",
"use_modseq", "perform_expunge", "uid_expunge",
@ -273,6 +275,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swTest1 = view.findViewById(R.id.swTest1);
swTest2 = view.findViewById(R.id.swTest2);
swTest3 = view.findViewById(R.id.swTest3);
swTest4 = view.findViewById(R.id.swTest4);
swTest5 = view.findViewById(R.id.swTest5);
btnRepair = view.findViewById(R.id.btnRepair);
swAutostart = view.findViewById(R.id.swAutostart);
@ -690,6 +694,20 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
swTest4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("test4", checked).apply();
}
});
swTest5.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("test5", checked).apply();
}
});
btnRepair.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -1401,6 +1419,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swTest1.setChecked(prefs.getBoolean("test1", false));
swTest2.setChecked(prefs.getBoolean("test2", false));
swTest3.setChecked(prefs.getBoolean("test3", false));
swTest4.setChecked(prefs.getBoolean("test4", false));
swTest5.setChecked(prefs.getBoolean("test5", false));
swAutostart.setChecked(Helper.isComponentEnabled(getContext(), ReceiverAutoStart.class));

@ -613,6 +613,28 @@
app:layout_constraintTop_toBottomOf="@id/swTest2"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swTest4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_test4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swTest3"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swTest5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_test5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swTest4"
app:switchPadding="12dp" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpUpdates"
android:layout_width="0dp"

@ -677,6 +677,8 @@
<string name="title_advanced_test1" translatable="false">Test #1</string>
<string name="title_advanced_test2" translatable="false">Test #2</string>
<string name="title_advanced_test3" translatable="false">Test #3</string>
<string name="title_advanced_test4" translatable="false">Test #4</string>
<string name="title_advanced_test5" translatable="false">Test #5</string>
<string name="title_advanced_repair" translatable="false">Repair</string>
<string name="title_advanced_autostart" translatable="false">Autostart</string>
<string name="title_advanced_room_query_threads" translatable="false">ROOM query threads: %1$s</string>

Loading…
Cancel
Save