Moved DANE option back

pull/214/head
M66B 2 years ago
parent dafe2d01ef
commit e6f393d36c

@ -101,6 +101,8 @@ public class FragmentAccount extends FragmentBase {
private RadioGroup rgEncryption; private RadioGroup rgEncryption;
private CheckBox cbInsecure; private CheckBox cbInsecure;
private TextView tvInsecureRemark; private TextView tvInsecureRemark;
private CheckBox cbDane;
private EditText etPort; private EditText etPort;
private EditText etUser; private EditText etUser;
private TextInputLayout tilPassword; private TextInputLayout tilPassword;
@ -140,7 +142,6 @@ public class FragmentAccount extends FragmentBase {
private CheckBox cbUnicode; private CheckBox cbUnicode;
private CheckBox cbUnmetered; private CheckBox cbUnmetered;
private CheckBox cbVpnOnly; private CheckBox cbVpnOnly;
private CheckBox cbDane;
private Button btnCheck; private Button btnCheck;
private ContentLoadingProgressBar pbCheck; private ContentLoadingProgressBar pbCheck;
@ -224,6 +225,7 @@ public class FragmentAccount extends FragmentBase {
rgEncryption = view.findViewById(R.id.rgEncryption); rgEncryption = view.findViewById(R.id.rgEncryption);
cbInsecure = view.findViewById(R.id.cbInsecure); cbInsecure = view.findViewById(R.id.cbInsecure);
tvInsecureRemark = view.findViewById(R.id.tvInsecureRemark); tvInsecureRemark = view.findViewById(R.id.tvInsecureRemark);
cbDane = view.findViewById(R.id.cbDane);
etUser = view.findViewById(R.id.etUser); etUser = view.findViewById(R.id.etUser);
tilPassword = view.findViewById(R.id.tilPassword); tilPassword = view.findViewById(R.id.tilPassword);
tvAppPassword = view.findViewById(R.id.tvAppPassword); tvAppPassword = view.findViewById(R.id.tvAppPassword);
@ -261,7 +263,6 @@ public class FragmentAccount extends FragmentBase {
cbUnicode = view.findViewById(R.id.cbUnicode); cbUnicode = view.findViewById(R.id.cbUnicode);
cbUnmetered = view.findViewById(R.id.cbUnmeteredOnly); cbUnmetered = view.findViewById(R.id.cbUnmeteredOnly);
cbVpnOnly = view.findViewById(R.id.cbVpnOnly); cbVpnOnly = view.findViewById(R.id.cbVpnOnly);
cbDane = view.findViewById(R.id.cbDane);
btnCheck = view.findViewById(R.id.btnCheck); btnCheck = view.findViewById(R.id.btnCheck);
pbCheck = view.findViewById(R.id.pbCheck); pbCheck = view.findViewById(R.id.pbCheck);
@ -1687,6 +1688,8 @@ public class FragmentAccount extends FragmentBase {
rgEncryption.check(R.id.radio_ssl); rgEncryption.check(R.id.radio_ssl);
cbInsecure.setChecked(account == null ? false : account.insecure); cbInsecure.setChecked(account == null ? false : account.insecure);
cbDane.setChecked(account == null ? false : account.dane);
cbDane.setEnabled(!cbInsecure.isChecked());
etUser.setText(account == null ? null : account.user); etUser.setText(account == null ? null : account.user);
tilPassword.getEditText().setText(account == null ? null : account.password); tilPassword.getEditText().setText(account == null ? null : account.password);
@ -1726,8 +1729,6 @@ public class FragmentAccount extends FragmentBase {
cbUnicode.setChecked(account == null ? false : account.unicode); cbUnicode.setChecked(account == null ? false : account.unicode);
cbUnmetered.setChecked(jcondition.optBoolean("unmetered")); cbUnmetered.setChecked(jcondition.optBoolean("unmetered"));
cbVpnOnly.setChecked(jcondition.optBoolean("vpn_only")); cbVpnOnly.setChecked(jcondition.optBoolean("vpn_only"));
cbDane.setChecked(account == null ? false : account.dane);
cbDane.setEnabled(!cbInsecure.isChecked());
if (account != null && account.use_date) if (account != null && account.use_date)
rgDate.check(R.id.radio_date_header); rgDate.check(R.id.radio_date_header);

@ -102,6 +102,7 @@ public class FragmentIdentity extends FragmentBase {
private RadioGroup rgEncryption; private RadioGroup rgEncryption;
private CheckBox cbInsecure; private CheckBox cbInsecure;
private TextView tvInsecureRemark; private TextView tvInsecureRemark;
private CheckBox cbDane;
private EditText etPort; private EditText etPort;
private EditText etUser; private EditText etUser;
private TextInputLayout tilPassword; private TextInputLayout tilPassword;
@ -136,7 +137,6 @@ public class FragmentIdentity extends FragmentBase {
private CheckBox cbUnicode; private CheckBox cbUnicode;
private CheckBox cbOctetMime; private CheckBox cbOctetMime;
private EditText etMaxSize; private EditText etMaxSize;
private CheckBox cbDane;
private Button btnSave; private Button btnSave;
private ContentLoadingProgressBar pbSave; private ContentLoadingProgressBar pbSave;
@ -210,6 +210,7 @@ public class FragmentIdentity extends FragmentBase {
rgEncryption = view.findViewById(R.id.rgEncryption); rgEncryption = view.findViewById(R.id.rgEncryption);
cbInsecure = view.findViewById(R.id.cbInsecure); cbInsecure = view.findViewById(R.id.cbInsecure);
tvInsecureRemark = view.findViewById(R.id.tvInsecureRemark); tvInsecureRemark = view.findViewById(R.id.tvInsecureRemark);
cbDane = view.findViewById(R.id.cbDane);
etPort = view.findViewById(R.id.etPort); etPort = view.findViewById(R.id.etPort);
etUser = view.findViewById(R.id.etUser); etUser = view.findViewById(R.id.etUser);
tilPassword = view.findViewById(R.id.tilPassword); tilPassword = view.findViewById(R.id.tilPassword);
@ -244,7 +245,6 @@ public class FragmentIdentity extends FragmentBase {
cbUnicode = view.findViewById(R.id.cbUnicode); cbUnicode = view.findViewById(R.id.cbUnicode);
cbOctetMime = view.findViewById(R.id.cbOctetMime); cbOctetMime = view.findViewById(R.id.cbOctetMime);
etMaxSize = view.findViewById(R.id.etMaxSize); etMaxSize = view.findViewById(R.id.etMaxSize);
cbDane = view.findViewById(R.id.cbDane);
btnSave = view.findViewById(R.id.btnSave); btnSave = view.findViewById(R.id.btnSave);
pbSave = view.findViewById(R.id.pbSave); pbSave = view.findViewById(R.id.pbSave);
@ -1291,6 +1291,8 @@ public class FragmentIdentity extends FragmentBase {
rgEncryption.check(R.id.radio_ssl); rgEncryption.check(R.id.radio_ssl);
cbInsecure.setChecked(identity == null ? false : identity.insecure); cbInsecure.setChecked(identity == null ? false : identity.insecure);
cbDane.setChecked(identity == null ? false : identity.dane);
cbDane.setEnabled(!cbInsecure.isChecked());
etPort.setText(identity == null ? null : Long.toString(identity.port)); etPort.setText(identity == null ? null : Long.toString(identity.port));
etUser.setText(identity == null ? null : identity.user); etUser.setText(identity == null ? null : identity.user);
tilPassword.getEditText().setText(identity == null ? null : identity.password); tilPassword.getEditText().setText(identity == null ? null : identity.password);
@ -1331,8 +1333,6 @@ public class FragmentIdentity extends FragmentBase {
cbEncryptDefault.setChecked(identity != null && identity.encrypt_default); cbEncryptDefault.setChecked(identity != null && identity.encrypt_default);
cbUnicode.setChecked(identity != null && identity.unicode); cbUnicode.setChecked(identity != null && identity.unicode);
cbOctetMime.setChecked(identity != null && identity.octetmime); cbOctetMime.setChecked(identity != null && identity.octetmime);
cbDane.setChecked(identity == null ? false : identity.dane);
cbDane.setEnabled(!cbInsecure.isChecked());
auth = (identity == null ? AUTH_TYPE_PASSWORD : identity.auth_type); auth = (identity == null ? AUTH_TYPE_PASSWORD : identity.auth_type);
provider = (identity == null ? null : identity.provider); provider = (identity == null ? null : identity.provider);

@ -76,6 +76,7 @@ public class FragmentPop extends FragmentBase {
private RadioGroup rgEncryption; private RadioGroup rgEncryption;
private CheckBox cbInsecure; private CheckBox cbInsecure;
private TextView tvInsecureRemark; private TextView tvInsecureRemark;
private CheckBox cbDane;
private EditText etPort; private EditText etPort;
private EditText etUser; private EditText etUser;
private TextInputLayout tilPassword; private TextInputLayout tilPassword;
@ -107,7 +108,6 @@ public class FragmentPop extends FragmentBase {
private EditText etInterval; private EditText etInterval;
private CheckBox cbUnmetered; private CheckBox cbUnmetered;
private CheckBox cbVpnOnly; private CheckBox cbVpnOnly;
private CheckBox cbDane;
private ArrayAdapter<EntityFolder> adapterSwipe; private ArrayAdapter<EntityFolder> adapterSwipe;
private Spinner spLeft; private Spinner spLeft;
@ -157,6 +157,7 @@ public class FragmentPop extends FragmentBase {
rgEncryption = view.findViewById(R.id.rgEncryption); rgEncryption = view.findViewById(R.id.rgEncryption);
cbInsecure = view.findViewById(R.id.cbInsecure); cbInsecure = view.findViewById(R.id.cbInsecure);
tvInsecureRemark = view.findViewById(R.id.tvInsecureRemark); tvInsecureRemark = view.findViewById(R.id.tvInsecureRemark);
cbDane = view.findViewById(R.id.cbDane);
etUser = view.findViewById(R.id.etUser); etUser = view.findViewById(R.id.etUser);
tilPassword = view.findViewById(R.id.tilPassword); tilPassword = view.findViewById(R.id.tilPassword);
tvPasswordStorage = view.findViewById(R.id.tvPasswordStorage); tvPasswordStorage = view.findViewById(R.id.tvPasswordStorage);
@ -186,7 +187,6 @@ public class FragmentPop extends FragmentBase {
etInterval = view.findViewById(R.id.etInterval); etInterval = view.findViewById(R.id.etInterval);
cbUnmetered = view.findViewById(R.id.cbUnmeteredOnly); cbUnmetered = view.findViewById(R.id.cbUnmeteredOnly);
cbVpnOnly = view.findViewById(R.id.cbVpnOnly); cbVpnOnly = view.findViewById(R.id.cbVpnOnly);
cbDane = view.findViewById(R.id.cbDane);
spLeft = view.findViewById(R.id.spLeft); spLeft = view.findViewById(R.id.spLeft);
spRight = view.findViewById(R.id.spRight); spRight = view.findViewById(R.id.spRight);
@ -848,6 +848,8 @@ public class FragmentPop extends FragmentBase {
rgEncryption.check(R.id.radio_ssl); rgEncryption.check(R.id.radio_ssl);
cbInsecure.setChecked(account == null ? false : account.insecure); cbInsecure.setChecked(account == null ? false : account.insecure);
cbDane.setChecked(account == null ? false : account.dane);
cbDane.setEnabled(!cbInsecure.isChecked());
etUser.setText(account == null ? null : account.user); etUser.setText(account == null ? null : account.user);
tilPassword.getEditText().setText(account == null ? null : account.password); tilPassword.getEditText().setText(account == null ? null : account.password);
@ -880,8 +882,6 @@ public class FragmentPop extends FragmentBase {
etInterval.setText(account == null ? "" : Long.toString(account.poll_interval)); etInterval.setText(account == null ? "" : Long.toString(account.poll_interval));
cbUnmetered.setChecked(jcondition.optBoolean("unmetered")); cbUnmetered.setChecked(jcondition.optBoolean("unmetered"));
cbVpnOnly.setChecked(jcondition.optBoolean("vpn_only")); cbVpnOnly.setChecked(jcondition.optBoolean("vpn_only"));
cbDane.setChecked(account == null ? false : account.dane);
cbDane.setEnabled(!cbInsecure.isChecked());
cbIdentity.setChecked(account == null); cbIdentity.setChecked(account == null);

@ -227,6 +227,29 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbInsecure" /> app:layout_constraintTop_toBottomOf="@id/cbInsecure" />
<CheckBox
android:id="@+id/cbDane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_dane"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" />
<TextView
android:id="@+id/tvDaneRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:text="@string/title_dane_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDane" />
<!-- port --> <!-- port -->
<TextView <TextView
@ -239,7 +262,7 @@
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" /> app:layout_constraintTop_toBottomOf="@id/tvDaneRemark" />
<eu.faircode.email.EditTextPlain <eu.faircode.email.EditTextPlain
android:id="@+id/etPort" android:id="@+id/etPort"
@ -818,27 +841,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbUnmeteredOnly" /> app:layout_constraintTop_toBottomOf="@id/cbUnmeteredOnly" />
<CheckBox
android:id="@+id/cbDane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_dane"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbVpnOnly" />
<TextView
android:id="@+id/tvDaneRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_dane_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDane" />
<!-- check --> <!-- check -->
<Button <Button
@ -851,7 +853,7 @@
android:tag="disable" android:tag="disable"
android:text="@string/title_check" android:text="@string/title_check"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDaneRemark" /> app:layout_constraintTop_toBottomOf="@id/cbVpnOnly" />
<eu.faircode.email.ContentLoadingProgressBar <eu.faircode.email.ContentLoadingProgressBar
android:id="@+id/pbCheck" android:id="@+id/pbCheck"
@ -1254,7 +1256,7 @@
cbAutoSeen, cbAutoSeen,
tvInterval,etInterval,tvIntervalRemark,cbNoop,tvNoopRemark, tvInterval,etInterval,tvIntervalRemark,cbNoop,tvNoopRemark,
cbPartialFetch,tvPartialFetchRemark,cbRawFetch,tvRawFetchRemark,cbIgnoreSize,rgDate,tvDateRemark, cbPartialFetch,tvPartialFetchRemark,cbRawFetch,tvRawFetchRemark,cbIgnoreSize,rgDate,tvDateRemark,
cbUnicode,cbUnmeteredOnly,cbVpnOnly,cbDane,tvDaneRemark" /> cbUnicode,cbUnmeteredOnly,cbVpnOnly" />
<androidx.constraintlayout.widget.Group <androidx.constraintlayout.widget.Group
android:id="@+id/grpFolders" android:id="@+id/grpFolders"

@ -378,6 +378,29 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbInsecure" /> app:layout_constraintTop_toBottomOf="@id/cbInsecure" />
<CheckBox
android:id="@+id/cbDane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_dane"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" />
<TextView
android:id="@+id/tvDaneRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:text="@string/title_dane_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDane" />
<!-- port --> <!-- port -->
<TextView <TextView
@ -390,7 +413,7 @@
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" /> app:layout_constraintTop_toBottomOf="@id/tvDaneRemark" />
<eu.faircode.email.EditTextPlain <eu.faircode.email.EditTextPlain
android:id="@+id/etPort" android:id="@+id/etPort"
@ -983,27 +1006,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMaxSize" /> app:layout_constraintTop_toBottomOf="@id/tvMaxSize" />
<CheckBox
android:id="@+id/cbDane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_dane"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/etMaxSize" />
<TextView
android:id="@+id/tvDaneRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_dane_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDane" />
<Button <Button
android:id="@+id/btnSave" android:id="@+id/btnSave"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -1014,7 +1016,7 @@
android:tag="disable" android:tag="disable"
android:text="@string/title_save" android:text="@string/title_save"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDaneRemark" /> app:layout_constraintTop_toBottomOf="@id/etMaxSize" />
<eu.faircode.email.ContentLoadingProgressBar <eu.faircode.email.ContentLoadingProgressBar
android:id="@+id/pbSave" android:id="@+id/pbSave"

@ -168,6 +168,29 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbInsecure" /> app:layout_constraintTop_toBottomOf="@id/cbInsecure" />
<CheckBox
android:id="@+id/cbDane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_dane"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" />
<TextView
android:id="@+id/tvDaneRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="6dp"
android:text="@string/title_dane_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDane" />
<!-- port --> <!-- port -->
<TextView <TextView
@ -180,7 +203,7 @@
android:textColor="?android:textColorPrimary" android:textColor="?android:textColorPrimary"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" /> app:layout_constraintTop_toBottomOf="@id/tvDaneRemark" />
<eu.faircode.email.EditTextPlain <eu.faircode.email.EditTextPlain
android:id="@+id/etPort" android:id="@+id/etPort"
@ -624,27 +647,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbUnmeteredOnly" /> app:layout_constraintTop_toBottomOf="@id/cbUnmeteredOnly" />
<CheckBox
android:id="@+id/cbDane"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_dane"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbVpnOnly" />
<TextView
android:id="@+id/tvDaneRemark"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:text="@string/title_dane_remark"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDane" />
<TextView <TextView
android:id="@+id/tvLeft" android:id="@+id/tvLeft"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -653,7 +655,7 @@
android:text="@string/title_account_left" android:text="@string/title_account_left"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvDaneRemark" /> app:layout_constraintTop_toBottomOf="@+id/cbVpnOnly" />
<Spinner <Spinner
android:id="@+id/spLeft" android:id="@+id/spLeft"

Loading…
Cancel
Save