From b3fbc5258e6ec5cdb861c3567baa92245cd01e59 Mon Sep 17 00:00:00 2001 From: Domingos Lopes Date: Sun, 17 Apr 2016 16:25:42 -0400 Subject: [PATCH] allow base cast manager to save information of wifi network when it connects --- .../danoeh/antennapod/core/cast/CastManager.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java b/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java index 547e89b3c..629798f41 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java @@ -128,6 +128,7 @@ public class CastManager extends BaseCastManager implements OnFailedListener { CastConfiguration castConfiguration = new CastConfiguration.Builder(CAST_APP_ID) .enableDebug() .enableAutoReconnect() + .enableWifiReconnection() .setLaunchOptions(true, Locale.getDefault()) .build(); Log.d(TAG, "New instance of CastManager is created"); @@ -1736,4 +1737,19 @@ public class CastManager extends BaseCastManager implements OnFailedListener { } return mediaRouteActionProvider; } + + /* (non-Javadoc) + * These methods startReconnectionService and stopReconnectionService simply override the ones + * from BaseCastManager with empty implementations because we handle the service ourselves, but + * need to allow BaseCastManager to save current network information. + */ + @Override + protected void startReconnectionService(long mediaDurationLeft) { + // Do nothing + } + + @Override + protected void stopReconnectionService() { + // Do nothing + } }