diff options
author | Scott Jackson <daneren2005@gmail.com> | 2020-09-21 20:20:12 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2020-09-21 20:20:12 -0700 |
commit | c62b800dc5438081cea0a5a7b625d7e904da16bb (patch) | |
tree | b1f87c5ce8cc3feff66b56c77c737017af24d832 /app/src/main/java/github/daneren2005/dsub/service | |
parent | 0ff92da4cb86a807e9738f8f0a60e4224790ffd6 (diff) | |
parent | 4e539142736007e0a59e41da391f8b8bb58a0d53 (diff) | |
download | dsub-c62b800dc5438081cea0a5a7b625d7e904da16bb.tar.gz dsub-c62b800dc5438081cea0a5a7b625d7e904da16bb.tar.bz2 dsub-c62b800dc5438081cea0a5a7b625d7e904da16bb.zip |
Merge branch 'avm99963-new-notifications' into edge
Diffstat (limited to 'app/src/main/java/github/daneren2005/dsub/service')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/DownloadService.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java index e9096900..aa9fcc66 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -1519,12 +1519,14 @@ public class DownloadService extends Service { Util.requestAudioFocus(this, audioManager); } + SharedPreferences prefs = Util.getPreferences(this); + boolean usingMediaStyleNotification = prefs.getBoolean(Constants.PREFERENCES_KEY_MEDIA_STYLE_NOTIFICATION, true) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; + if (show) { - Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong()); + Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); } else if (pause) { - SharedPreferences prefs = Util.getPreferences(this); - if(prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false)) { - Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong()); + if (prefs.getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false)) { + Notifications.showPlayingNotification(this, this, handler, currentPlaying.getSong(), usingMediaStyleNotification); } else { Notifications.hidePlayingNotification(this, this, handler); } |