aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java6
-rw-r--r--src/github/daneren2005/dsub/util/MediaRouteManager.java6
2 files changed, 5 insertions, 7 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index addcb0a2..4cbf2317 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -53,7 +53,6 @@ import github.daneren2005.dsub.view.UpdateView;
import github.daneren2005.serverproxy.BufferProxy;
import java.io.File;
-import java.io.IOError;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -70,7 +69,6 @@ import android.content.SharedPreferences;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.audiofx.AudioEffect;
-import android.media.audiofx.Equalizer;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
@@ -558,9 +556,9 @@ public class DownloadService extends Service {
public void setOnline(final boolean online) {
if(online) {
- mediaRouter.addOfflineProviders();
+ mediaRouter.addOnlineProviders();
} else {
- mediaRouter.removeOfflineProviders();
+ mediaRouter.removeOnlineProviders();
}
lifecycleSupport.post(new Runnable() {
diff --git a/src/github/daneren2005/dsub/util/MediaRouteManager.java b/src/github/daneren2005/dsub/util/MediaRouteManager.java
index e356a1b6..11e0d387 100644
--- a/src/github/daneren2005/dsub/util/MediaRouteManager.java
+++ b/src/github/daneren2005/dsub/util/MediaRouteManager.java
@@ -141,7 +141,7 @@ public class MediaRouteManager extends MediaRouter.Callback {
}
}
- public void addOfflineProviders() {
+ public void addOnlineProviders() {
JukeboxRouteProvider jukeboxProvider = new JukeboxRouteProvider(downloadService);
router.addProvider(jukeboxProvider);
providers.add(jukeboxProvider);
@@ -152,7 +152,7 @@ public class MediaRouteManager extends MediaRouter.Callback {
providers.add(dlnaProvider);
offlineProviders.add(dlnaProvider);
}
- public void removeOfflineProviders() {
+ public void removeOnlineProviders() {
for(MediaRouteProvider provider: offlineProviders) {
router.removeProvider(provider);
}
@@ -160,7 +160,7 @@ public class MediaRouteManager extends MediaRouter.Callback {
private void addProviders() {
if(!Util.isOffline(downloadService)) {
- addOfflineProviders();
+ addOnlineProviders();
}
}
public void buildSelector() {