mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-24 16:02:13 +01:00
Merge pull request #3737 from ByteHamster/use-google-trust-provider
Use Google Trust provider
This commit is contained in:
commit
e32ba7621a
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user