diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-03-10 15:51:42 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-03-10 15:51:42 -0700 |
commit | bc1c4d26ecfd9b33b79cbdf1e200ac790188e996 (patch) | |
tree | 70d506d3ca279d2db8b56724d38565a4af0ac767 /src/github/daneren2005 | |
parent | 6d51347c27c462f32291aaef6747cf9a9f7a061a (diff) | |
download | dsub-bc1c4d26ecfd9b33b79cbdf1e200ac790188e996.tar.gz dsub-bc1c4d26ecfd9b33b79cbdf1e200ac790188e996.tar.bz2 dsub-bc1c4d26ecfd9b33b79cbdf1e200ac790188e996.zip |
#306 Fix timeout not updating MediaRouter info
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadService.java | 4 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/util/MediaRouteManager.java | 4 |
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); } |