pull/205/head
M66B 3 years ago
parent 2e4e5d04ed
commit 73566b6de2

@ -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

Loading…
Cancel
Save