Moved privacy option to advanced

This commit is contained in:
M66B 2022-05-09 17:20:44 +02:00
parent a5b4fee735
commit c2e45d7c62
2 changed files with 27 additions and 26 deletions

View File

@ -73,7 +73,6 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
private SwitchCompat swConfirmHtml;
private SwitchCompat swAskHtml;
private SwitchCompat swDisableTracking;
private SwitchCompat swHideTimeZone;
private Button btnPin;
private Button btnBiometrics;
private Spinner spBiometricsTimeout;
@ -83,6 +82,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
private SwitchCompat swClientId;
private TextView tvClientId;
private ImageButton ibClientId;
private SwitchCompat swHideTimeZone;
private SwitchCompat swDisplayHidden;
private SwitchCompat swIncognitoKeyboard;
private ImageButton ibIncognitoKeyboard;
@ -109,9 +109,10 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
private final static String[] RESET_OPTIONS = new String[]{
"confirm_links", "check_links_dbl", "browse_links",
"confirm_images", "ask_images", "html_always_images", "confirm_html", "ask_html",
"disable_tracking", "hide_timezone",
"disable_tracking",
"pin", "biometrics", "biometrics_timeout", "autolock", "autolock_nav",
"client_id", "display_hidden", "incognito_keyboard", "secure",
"client_id", "hide_timezone",
"display_hidden", "incognito_keyboard", "secure",
"generic_ua", "safe_browsing", "load_emoji",
"disconnect_auto_update", "disconnect_links", "disconnect_images",
"wipe_mnemonic"
@ -137,7 +138,6 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
swConfirmHtml = view.findViewById(R.id.swConfirmHtml);
swAskHtml = view.findViewById(R.id.swAskHtml);
swDisableTracking = view.findViewById(R.id.swDisableTracking);
swHideTimeZone = view.findViewById(R.id.swHideTimeZone);
btnPin = view.findViewById(R.id.btnPin);
btnBiometrics = view.findViewById(R.id.btnBiometrics);
spBiometricsTimeout = view.findViewById(R.id.spBiometricsTimeout);
@ -147,6 +147,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
swClientId = view.findViewById(R.id.swClientId);
tvClientId = view.findViewById(R.id.tvClientId);
ibClientId = view.findViewById(R.id.ibClientId);
swHideTimeZone = view.findViewById(R.id.swHideTimeZone);
swDisplayHidden = view.findViewById(R.id.swDisplayHidden);
swIncognitoKeyboard = view.findViewById(R.id.swIncognitoKeyboard);
ibIncognitoKeyboard = view.findViewById(R.id.ibIncognitoKeyboard);
@ -248,13 +249,6 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
}
});
swHideTimeZone.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("hide_timezone", checked).apply();
}
});
btnPin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -339,6 +333,13 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
}
});
swHideTimeZone.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("hide_timezone", checked).apply();
}
});
swDisplayHidden.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -551,7 +552,6 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
swAskHtml.setChecked(prefs.getBoolean("ask_html", true));
swAskHtml.setEnabled(swConfirmHtml.isChecked());
swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true));
swHideTimeZone.setChecked(prefs.getBoolean("hide_timezone", true));
String pin = prefs.getString("pin", null);
btnPin.setCompoundDrawablesRelativeWithIntrinsicBounds(
@ -575,6 +575,7 @@ public class FragmentOptionsPrivacy extends FragmentBase implements SharedPrefer
swAutoLockNav.setChecked(prefs.getBoolean("autolock_nav", false));
swClientId.setChecked(prefs.getBoolean("client_id", true));
swHideTimeZone.setChecked(prefs.getBoolean("hide_timezone", true));
swDisplayHidden.setChecked(prefs.getBoolean("display_hidden", false));
swIncognitoKeyboard.setChecked(prefs.getBoolean("incognito_keyboard", false));
swSecure.setChecked(prefs.getBoolean("secure", false));

View File

@ -223,18 +223,6 @@
app:layout_constraintTop_toBottomOf="@+id/swAskHtml"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swHideTimeZone"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_hide_timezone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/swDisableTracking"
app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvBiometrics"
android:layout_width="0dp"
@ -246,7 +234,7 @@
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swHideTimeZone" />
app:layout_constraintTop_toBottomOf="@id/swDisableTracking" />
<Button
android:id="@+id/btnBiometrics"
@ -419,6 +407,18 @@
app:layout_constraintTop_toBottomOf="@id/tvClientId"
app:srcCompat="@drawable/twotone_info_24" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swHideTimeZone"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:checked="true"
android:text="@string/title_advanced_hide_timezone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ibClientId"
app:switchPadding="12dp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swDisplayHidden"
android:layout_width="0dp"
@ -427,7 +427,7 @@
android:text="@string/title_advanced_display_hidden"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ibClientId"
app:layout_constraintTop_toBottomOf="@id/swHideTimeZone"
app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView