aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-07-09 22:06:52 -0700
committerScott Jackson <daneren2005@gmail.com>2014-07-09 22:06:52 -0700
commit109c35a36ed0d382664f7a57c83914137f701caf (patch)
tree17ef1ff91f528451fbc009fe79b32a12d14b1e75
parentea1204acc79201c9b366f982207e34e0ab3d1236 (diff)
downloaddsub-109c35a36ed0d382664f7a57c83914137f701caf.tar.gz
dsub-109c35a36ed0d382664f7a57c83914137f701caf.tar.bz2
dsub-109c35a36ed0d382664f7a57c83914137f701caf.zip
#375 Fix expanded persistent notification not toggling play/pause display
-rw-r--r--src/github/daneren2005/dsub/util/Notifications.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java
index 142fffcb..75c69d9e 100644
--- a/src/github/daneren2005/dsub/util/Notifications.java
+++ b/src/github/daneren2005/dsub/util/Notifications.java
@@ -142,10 +142,14 @@ public final class Notifications {
}
boolean persistent = Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_PERSISTENT_NOTIFICATION, false);
- if(persistent && !expanded) {
- rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_pause : R.drawable.notification_play);
- rv.setImageViewResource(R.id.control_pause, R.drawable.notification_next);
- rv.setImageViewResource(R.id.control_next, R.drawable.notification_close);
+ if(persistent) {
+ if(expanded) {
+ rv.setImageViewResource(R.id.control_pause, playing ? R.drawable.notification_pause : R.drawable.notification_play);
+ } else {
+ rv.setImageViewResource(R.id.control_previous, playing ? R.drawable.notification_pause : R.drawable.notification_play);
+ rv.setImageViewResource(R.id.control_pause, R.drawable.notification_next);
+ rv.setImageViewResource(R.id.control_next, R.drawable.notification_close);
+ }
}
// Create actions for media buttons