From 73566b6de268de5f4913be6b61d176dfbd757931 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 8 Sep 2021 10:35:49 +0200 Subject: [PATCH] Debug only --- .../java/eu/faircode/email/ApplicationEx.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 0cb90d62af..a1b674c792 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -56,19 +56,20 @@ public class ApplicationEx extends Application private Thread.UncaughtExceptionHandler prev = null; static { - try { - Provider[] providers = Security.getProviders(); - for (int p = 0; p < providers.length; p++) - if (BouncyCastleProvider.PROVIDER_NAME.equals(providers[p].getName())) { - Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME); - Provider bc = new BouncyCastleProvider(); - Security.insertProviderAt(bc, p + 1); - Log.i("Replacing provider " + providers[p] + " at " + p + " by " + bc); - break; - } - } catch (Throwable ex) { - Log.e(ex); - } + if (BuildConfig.DEBUG) + try { + Provider[] providers = Security.getProviders(); + for (int p = 0; p < providers.length; p++) + if (BouncyCastleProvider.PROVIDER_NAME.equals(providers[p].getName())) { + Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME); + Provider bc = new BouncyCastleProvider(); + Security.insertProviderAt(bc, p + 1); + Log.i("Replacing provider " + providers[p] + " at " + p + " by " + bc); + break; + } + } catch (Throwable ex) { + Log.e(ex); + } } @Override