summaryrefslogtreecommitdiff
path: root/core/src/play/java/de/danoeh
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-09-19 21:20:15 +0200
committerByteHamster <info@bytehamster.com>2020-09-19 21:27:01 +0200
commit806b1f48ecf93f93e548980a87c0e6495591f596 (patch)
treee320a6a36155418c233a55a65ae1073ebff8b74f /core/src/play/java/de/danoeh
parent689bdb69db71295eca1eaad9ab0a1e996c4b1536 (diff)
downloadAntennaPod-806b1f48ecf93f93e548980a87c0e6495591f596.zip
Make ProviderInstaller synchronous again
See #4077 for details: It is fast and the old method sometimes does not install the provider early enough Reverts #3946 and #4285
Diffstat (limited to 'core/src/play/java/de/danoeh')
-rw-r--r--core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java16
1 files changed, 2 insertions, 14 deletions
diff --git a/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java b/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java
index 09d9f4623..7d38aedc2 100644
--- a/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java
+++ b/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java
@@ -12,7 +12,6 @@ import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
import de.danoeh.antennapod.core.preferences.SleepTimerPreferences;
import de.danoeh.antennapod.core.preferences.UsageStatistics;
import de.danoeh.antennapod.core.preferences.UserPreferences;
-import de.danoeh.antennapod.core.service.ProviderInstallerInterceptor;
import de.danoeh.antennapod.core.service.download.AntennapodHttpClient;
import de.danoeh.antennapod.core.storage.PodDBAdapter;
import de.danoeh.antennapod.core.util.NetworkUtils;
@@ -55,6 +54,7 @@ public class ClientConfig {
UserPreferences.init(context);
UsageStatistics.init(context);
PlaybackPreferences.init(context);
+ installSslProvider(context);
NetworkUtils.init(context);
// Don't initialize Cast-related logic unless it is enabled, to avoid the unnecessary
// Google Play Service usage.
@@ -65,18 +65,6 @@ public class ClientConfig {
} else {
Log.v(TAG, "Cast is disabled. All Cast-related initialization will be skipped.");
}
- ProviderInstaller.installIfNeededAsync(context, new ProviderInstaller.ProviderInstallListener() {
- @Override
- public void onProviderInstalled() {
- Log.e(TAG, "onProviderInstalled");
- }
-
- @Override
- public void onProviderInstallFailed(int i, Intent intent) {
- Log.e(TAG, "onProviderInstallFailed");
- }
- });
- ProviderInstallerInterceptor.installer = () -> installSslProvider(context);
AntennapodHttpClient.setCacheDirectory(new File(context.getCacheDir(), "okhttp"));
SleepTimerPreferences.init(context);
RxJavaErrorHandlerSetup.setupRxJavaErrorHandler();
@@ -84,7 +72,7 @@ public class ClientConfig {
initialized = true;
}
- public static void installSslProvider(Context context) {
+ private static void installSslProvider(Context context) {
try {
ProviderInstaller.installIfNeeded(context);
} catch (GooglePlayServicesRepairableException e) {