Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 485029c5 authored by Vincent Breitmoser's avatar Vincent Breitmoser
Browse files

get rid of magic and inline strings

parent ce6f080e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ public class AccountSettings extends K9PreferenceActivity {
    private static final String PREFERENCE_TRASH_FOLDER = "trash_folder";
    private static final String PREFERENCE_ALWAYS_SHOW_CC_BCC = "always_show_cc_bcc";
    public static final String APG_DEPRECATION_DIALOG_TAG = "apgDeprecationDialog";
    public static final String APG_PROVIDER_PLACEHOLDER = "apg-placeholder";


    private Account mAccount;
@@ -710,12 +711,12 @@ public class AccountSettings extends K9PreferenceActivity {

            mCryptoApp.setValue(String.valueOf(mAccount.getCryptoApp()));
            if (OpenPgpAppPreference.isApgInstalled(getApplicationContext())) {
                mCryptoApp.addLegacyProvider("apg-placeholder", "APG", R.drawable.ic_apg_small);
                mCryptoApp.addLegacyProvider(APG_PROVIDER_PLACEHOLDER, getString(R.string.apg), R.drawable.ic_apg_small);
            }
            mCryptoApp.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
                public boolean onPreferenceChange(Preference preference, Object newValue) {
                    String value = newValue.toString();
                    if ("apg-placeholder".equals(value)) {
                    if (APG_PROVIDER_PLACEHOLDER.equals(value)) {
                        mCryptoApp.setValue("");
                        mCryptoKey.setOpenPgpProvider("");
                        showApgDeprecationDialog();
+1 −0
Original line number Diff line number Diff line
@@ -1212,5 +1212,6 @@ Please submit bug reports, contribute new features and ask questions at
    <string name="apg_deprecated_bullet_2">Contains unfixed security issues</string>
    <string name="apg_learn_more">You can <a href="https://k9mail.github.io/2017/01/13/Why-APG-is-no-longer-supported.html">click here</a> to learn more.</string>
    <string name="apg_deprecated_ok">Got it!</string>
    <string name="apg">APG</string>

</resources>