From 685a971c264e4dad14d8053d8bf2b9021ba0b84f Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Mon, 2 Dec 2013 13:24:55 -0800 Subject: #200 Close notification when switching remote state --- src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index e379291f..d15ab7a5 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -1078,6 +1078,13 @@ public class DownloadServiceImpl extends Service implements DownloadService { currentDownloading.cancelDownload(); } } + + SharedPreferences prefs = Util.getPreferences(this); + if(currentPlaying != null && prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false)) { + Util.showPlayingNotification(this, this, handler, currentPlaying.getSong()); + } else { + Util.hidePlayingNotification(this, this, handler); + } } @Override -- cgit v1.2.3