Added settings to enable confirming actions that might leak info

This commit is contained in:
M66B
2018-11-13 10:49:36 +01:00
parent 9a7802d319
commit 370bd9d701
6 changed files with 96 additions and 52 deletions

View File

@@ -50,6 +50,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
private SwitchCompat swBrowse;
private SwitchCompat swSwipe;
private SwitchCompat swNav;
private SwitchCompat swConfirm;
private SwitchCompat swSender;
private SwitchCompat swInsecure;
private Spinner spDownload;
@@ -73,6 +74,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
swBrowse = view.findViewById(R.id.swBrowse);
swSwipe = view.findViewById(R.id.swSwipe);
swNav = view.findViewById(R.id.swNav);
swConfirm = view.findViewById(R.id.swConfirm);
swSender = view.findViewById(R.id.swSender);
swInsecure = view.findViewById(R.id.swInsecure);
spDownload = view.findViewById(R.id.spDownload);
@@ -181,6 +183,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
}
});
swConfirm.setChecked(prefs.getBoolean("confirm", false));
swConfirm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("confirm", checked).apply();
}
});
swNav.setChecked(prefs.getBoolean("navigation", true));
swNav.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override