diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle
index fdad471916c50664589122ff1cb5ec22c98e8ff0..2daf4845b98fc41282dc07cefa05b7ae90450192 100644
--- a/app/k9mail/build.gradle
+++ b/app/k9mail/build.gradle
@@ -49,7 +49,7 @@ android {
testApplicationId "foundation.e.mail.tests"
versionCode 30000
- versionName '6.000'
+ versionName '6.001'
// Keep in sync with the resource string array 'supported_languages'
resConfigs "in", "br", "ca", "cs", "cy", "da", "de", "et", "en", "en_GB", "es", "eo", "eu", "fr", "gd", "gl",
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java
index 83be6b12989235d2e8970d4403f2f4df3208afff..510b4e405c7268ac9af019a140c83c16a6e5faab 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java
@@ -1,20 +1,3 @@
-/*
- * Copyright ECORP SAS 2022
- *
- * this program is free software: you can redistribute it and/or modify
- * it under the terms of the gnu general public license as published by
- * the free software foundation, either version 3 of the license, or
- * (at your option) any later version.
- *
- * this program is distributed in the hope that it will be useful,
- * but without any warranty; without even the implied warranty of
- * merchantability or fitness for a particular purpose. see the
- * gnu general public license for more details.
- *
- * you should have received a copy of the gnu general public license
- * along with this program. if not, see .
- */
-
package com.fsck.k9.activity;
@@ -42,6 +25,9 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcelable;
+import androidx.annotation.Nullable;
+import androidx.annotation.StringRes;
+import androidx.appcompat.app.ActionBar;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.TypedValue;
@@ -60,9 +46,6 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
-import androidx.annotation.Nullable;
-import androidx.annotation.StringRes;
-import androidx.appcompat.app.ActionBar;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.fsck.k9.Account;
@@ -132,6 +115,7 @@ import com.fsck.k9.ui.messagelist.DefaultFolderProvider;
import com.fsck.k9.ui.permissions.K9PermissionUiHelper;
import com.fsck.k9.ui.permissions.Permission;
import com.fsck.k9.ui.permissions.PermissionUiHelper;
+
import org.jetbrains.annotations.NotNull;
import org.openintents.openpgp.OpenPgpApiManager;
import org.openintents.openpgp.util.OpenPgpApi;
@@ -718,14 +702,14 @@ public class MessageCompose extends K9Activity implements OnClickListener,
boolean shouldUsePgpMessageBuilder = cryptoStatus.isOpenPgpConfigured();
if (shouldUsePgpMessageBuilder) {
SendErrorState maybeSendErrorState = cryptoStatus.getSendErrorStateOrNull();
- if (maybeSendErrorState == null) {
- PgpMessageBuilder pgpBuilder = PgpMessageBuilder.newInstance();
- recipientPresenter.builderSetProperties(pgpBuilder, cryptoStatus);
- builder = pgpBuilder;
- } else {
- builder = SimpleMessageBuilder.newInstance();
- recipientPresenter.builderSetProperties(builder);
+ if (maybeSendErrorState != null) {
+ recipientPresenter.showPgpSendError(maybeSendErrorState);
+ return null;
}
+
+ PgpMessageBuilder pgpBuilder = PgpMessageBuilder.newInstance();
+ recipientPresenter.builderSetProperties(pgpBuilder, cryptoStatus);
+ builder = pgpBuilder;
} else {
builder = SimpleMessageBuilder.newInstance();
recipientPresenter.builderSetProperties(builder);
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java
index 44a6b1984d80652a20a4c740cc07768159b96e6b..b7c6dbf8fe64d20249755a643b1cea7b1a40df75 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/AccountSetupBasics.java
@@ -30,6 +30,8 @@ import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
+import androidx.annotation.Nullable;
+import androidx.lifecycle.LifecycleOwner;
import com.fsck.k9.Account;
import com.fsck.k9.Core;
import com.fsck.k9.DI;
@@ -56,7 +58,6 @@ import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListe
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import com.lamonjush.fullscreenloadingdialog.FullScreenLoadingDialog;
-import org.openintents.openpgp.util.OpenPgpProviderUtil;
import timber.log.Timber;
/**
@@ -266,7 +267,6 @@ public class AccountSetupBasics extends K9Activity
if (mAccount == null) {
mAccount = Preferences.getPreferences(this).newAccount();
mAccount.setChipColor(accountCreator.pickColor());
- setOpenPgpProvider();
}
mAccount.setSenderName(getOwnerName());
@@ -405,7 +405,6 @@ public class AccountSetupBasics extends K9Activity
if (mAccount == null) {
mAccount = Preferences.getPreferences(this).newAccount();
mAccount.setChipColor(accountCreator.pickColor());
- setOpenPgpProvider();
}
mAccount.setSenderName(getOwnerName());
mAccount.setEmail(email);
@@ -416,10 +415,6 @@ public class AccountSetupBasics extends K9Activity
AccountSetupAccountType.actionSelectAccountType(this, mAccount, false, initialAccountSettings);
}
- private void setOpenPgpProvider() {
- mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext()));
- }
-
public void onClick(View v) {
int id = v.getId();
if (id == R.id.next) {
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java
index 0ee13b75eee098760fb8e4c4fb401dc881159337..16627d6565934300a69e0b2d7ef98f7189e09281 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/setup/accountmanager/EeloAccountCreator.java
@@ -1,18 +1,17 @@
/*
* Copyright ECORP SAS 2022
- *
- * this program is free software: you can redistribute it and/or modify
- * it under the terms of the gnu general public license as published by
- * the free software foundation, either version 3 of the license, or
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * this program is distributed in the hope that it will be useful,
- * but without any warranty; without even the implied warranty of
- * merchantability or fitness for a particular purpose. see the
- * gnu general public license for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * you should have received a copy of the gnu general public license
- * along with this program. if not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
*/
package com.fsck.k9.activity.setup.accountmanager;
@@ -35,7 +34,6 @@ import com.fsck.k9.mail.ServerSettings;
import com.fsck.k9.mailstore.SpecialLocalFoldersCreator;
import com.fsck.k9.preferences.Protocols;
import com.fsck.k9.ui.ConnectionSettings;
-import org.openintents.openpgp.util.OpenPgpProviderUtil;
import timber.log.Timber;
@@ -51,7 +49,6 @@ public class EeloAccountCreator {
account.setChipColor(accountCreator.pickColor());
account.setEmail(emailId);
account.setName(emailId);
- account.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(context.getApplicationContext()));
ConnectionSettings connectionSettings = providersXmlDiscoveryDiscover(emailId);
if (connectionSettings == null) {
diff --git a/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java b/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java
index c87d3eede41424a431c596de5d915315f07ab6c2..b5e9b1e802d4fd6df64e8730c1e84b596f402114 100644
--- a/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java
+++ b/plugins/openpgp-api-lib/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpProviderUtil.java
@@ -1,20 +1,3 @@
-/*
- * Copyright ECORP SAS 2022
- *
- * this program is free software: you can redistribute it and/or modify
- * it under the terms of the gnu general public license as published by
- * the free software foundation, either version 3 of the license, or
- * (at your option) any later version.
- *
- * this program is distributed in the hope that it will be useful,
- * but without any warranty; without even the implied warranty of
- * merchantability or fitness for a particular purpose. see the
- * gnu general public license for more details.
- *
- * you should have received a copy of the gnu general public license
- * along with this program. if not, see .
- */
-
package org.openintents.openpgp.util;
@@ -26,8 +9,6 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import androidx.annotation.Nullable;
-
public class OpenPgpProviderUtil {
private static final String PACKAGE_NAME_APG = "org.thialfihar.android.apg";
@@ -36,15 +17,6 @@ public class OpenPgpProviderUtil {
DISALLOWED_PROVIDERS.add(PACKAGE_NAME_APG);
}
- @Nullable
- public static String getOpenPgpProviderPackage(Context context) {
- List openPgpProviderPackages = getOpenPgpProviderPackages(context);
- if (openPgpProviderPackages.size() > 0) {
- return openPgpProviderPackages.get(0);
- }
- return null;
- }
-
public static List getOpenPgpProviderPackages(Context context) {
ArrayList result = new ArrayList<>();