From 882c5625b84da25bb8f162705bfa76d3a07baaf6 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 23 May 2022 21:19:31 +0600 Subject: [PATCH] 5491-Disable_openPGP_support_by_default issue: https://gitlab.e.foundation/e/backlog/-/issues/5491 Revert "5342-Enable_opePGP_support_by_default" This reverts commit 47ab9aaabf3e7fcb346d52eefd2b8f227deacde0. --- .../fsck/k9/activity/setup/AccountSetupBasics.java | 3 --- .../setup/accountmanager/EeloAccountCreator.java | 2 -- .../openintents/openpgp/util/OpenPgpProviderUtil.java | 11 ----------- 3 files changed, 16 deletions(-) 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 184e402bc9..03a4ec4c30 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 @@ -43,7 +43,6 @@ import com.fsck.k9.view.ClientCertificateSpinner; import com.fsck.k9.view.ClientCertificateSpinner.OnClientCertificateChangedListener; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; -import org.openintents.openpgp.util.OpenPgpProviderUtil; import timber.log.Timber; /** @@ -253,7 +252,6 @@ public class AccountSetupBasics extends K9Activity if (mAccount == null) { mAccount = Preferences.getPreferences(this).newAccount(); mAccount.setChipColor(accountCreator.pickColor()); - mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext())); } mAccount.setSenderName(getOwnerName()); @@ -380,7 +378,6 @@ public class AccountSetupBasics extends K9Activity if (mAccount == null) { mAccount = Preferences.getPreferences(this).newAccount(); mAccount.setChipColor(accountCreator.pickColor()); - mAccount.setOpenPgpProvider(OpenPgpProviderUtil.getOpenPgpProviderPackage(getApplicationContext())); } mAccount.setSenderName(getOwnerName()); mAccount.setEmail(email); 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 d139c1cd19..25f1fbcf30 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 @@ -19,7 +19,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; @@ -35,7 +34,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 e2b3fd729c..b5e9b1e802 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 @@ -9,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"; @@ -19,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<>(); -- GitLab