Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Accept the deprecated 3 as an alias for 2 #3410

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
Expand Down Expand Up @@ -225,9 +224,12 @@ public void onTextChanged(CharSequence s, int start, int before, int count) { }
authMethod.setSelection(sel);
expandAdvanced = expandAdvanced || sel != 0;

int certCheckFlags = DcHelper.getInt(this, "imap_certificate_checks");
certCheck.setSelection(certCheckFlags);
expandAdvanced = expandAdvanced || certCheckFlags != 0;
int imapCertificateChecks = DcHelper.getInt(this, "imap_certificate_checks");
if (imapCertificateChecks == 3) {
imapCertificateChecks = 2; // 3 is a deprecated alias for 2
}
certCheck.setSelection(imapCertificateChecks);
expandAdvanced = expandAdvanced || imapCertificateChecks != 0;
} else if (getIntent() != null && getIntent().getBundleExtra(ACCOUNT_DATA) != null) {
// Companion app might have sent account data
Bundle b = getIntent().getBundleExtra(ACCOUNT_DATA);
Expand Down
1 change: 0 additions & 1 deletion src/main/res/layout/registration_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@
android:layout_width="0dp"
android:layout_height="48dp"
android:entries="@array/pref_dc_certck_entries"
android:entryValues="@array/pref_dc_certck_values"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was supposed to map "Accept invalid certificates" to 3. This didn't actually work, though, so the behavior doesn't actually change here.

app:layout_constraintEnd_toEndOf="@id/guideline_root_end"
app:layout_constraintStart_toStartOf="@id/guideline_root_start"
app:layout_constraintTop_toBottomOf="@id/cert_check_label" />
Expand Down
6 changes: 0 additions & 6 deletions src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@
<item>@string/accept_invalid_certificates</item>
</string-array>

<string-array name="pref_dc_certck_values">
<item>0</item>
<item>1</item>
<item>3</item>
</string-array>

<!-- discrete MIME type (the part before the "/") -->


Expand Down
Loading