aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java4
-rw-r--r--src/github/daneren2005/dsub/util/MediaRouteManager.java4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index e31075ac..eda0fc55 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -1120,6 +1120,10 @@ public class DownloadService extends Service {
setPlayerState(PlayerState.IDLE);
remoteController.shutdown();
remoteController = null;
+
+ if(newState == RemoteCtronlState.LOCAL) {
+ mediaRouter.setDefaultRoute();
+ }
}
remoteState = newState;
diff --git a/src/github/daneren2005/dsub/util/MediaRouteManager.java b/src/github/daneren2005/dsub/util/MediaRouteManager.java
index d41a5516..95cded67 100644
--- a/src/github/daneren2005/dsub/util/MediaRouteManager.java
+++ b/src/github/daneren2005/dsub/util/MediaRouteManager.java
@@ -80,6 +80,10 @@ public class MediaRouteManager extends MediaRouter.Callback {
downloadService.setRemoteEnabled(RemoteControlState.LOCAL);
}
+ public void setDefaultRoute() {
+ router.selectRoute(router.getDefaultRoute());
+ }
+
public void startScan() {
router.addCallback(selector, this, MediaRouter.CALLBACK_FLAG_PERFORM_ACTIVE_SCAN);
}