diff options
author | ByteHamster <info@bytehamster.com> | 2020-01-07 12:06:29 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-01-07 12:17:08 +0100 |
commit | 2d93af6707d55834b5d1412952b8acd8d08b03a4 (patch) | |
tree | 584c26641919a1179ddb34d0ec7cc0db4aba04bc /core/src/play/java | |
parent | a8b126221c3ae4a4e449cd090963e2403e2c3dd3 (diff) | |
download | AntennaPod-2d93af6707d55834b5d1412952b8acd8d08b03a4.zip |
Use Google Trust provider
Diffstat (limited to 'core/src/play/java')
-rw-r--r-- | core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java | 15 |
1 files changed, 15 insertions, 0 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 55d804203..c92ce3e74 100644 --- a/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java +++ b/core/src/play/java/de/danoeh/antennapod/core/ClientConfig.java @@ -3,6 +3,10 @@ package de.danoeh.antennapod.core; import android.content.Context; import android.util.Log; +import com.google.android.gms.common.GoogleApiAvailability; +import com.google.android.gms.common.GooglePlayServicesNotAvailableException; +import com.google.android.gms.common.GooglePlayServicesRepairableException; +import com.google.android.gms.security.ProviderInstaller; import de.danoeh.antennapod.core.cast.CastManager; import de.danoeh.antennapod.core.preferences.PlaybackPreferences; import de.danoeh.antennapod.core.preferences.SleepTimerPreferences; @@ -57,10 +61,21 @@ public class ClientConfig { } else { Log.v(TAG, "Cast is disabled. All Cast-related initialization will be skipped."); } + installSslProvider(context); SleepTimerPreferences.init(context); RxJavaErrorHandlerSetup.setupRxJavaErrorHandler(); NotificationUtils.createChannels(context); initialized = true; } + private static void installSslProvider(Context context) { + try { + ProviderInstaller.installIfNeeded(context); + } catch (GooglePlayServicesRepairableException e) { + e.printStackTrace(); + GoogleApiAvailability.getInstance().showErrorNotification(context, e.getConnectionStatusCode()); + } catch (GooglePlayServicesNotAvailableException e) { + e.printStackTrace(); + } + } } |