aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-08-08 07:52:04 -0700
committerScott Jackson <daneren2005@gmail.com>2014-08-08 07:52:04 -0700
commit59549007f1932c723626853f75169d23c2489c77 (patch)
tree4c9b5d8fd5371bb1a62f5b12d8c4f790d26b6637 /src
parente506efda4e97521888eb11293a8c6c40dfb088da (diff)
downloaddsub-59549007f1932c723626853f75169d23c2489c77.tar.gz
dsub-59549007f1932c723626853f75169d23c2489c77.tar.bz2
dsub-59549007f1932c723626853f75169d23c2489c77.zip
#383 Fix sync notification intents
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/Notifications.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java
index 67eb4626..93db25b8 100644
--- a/src/github/daneren2005/dsub/util/Notifications.java
+++ b/src/github/daneren2005/dsub/util/Notifications.java
@@ -307,12 +307,13 @@ public final class Notifications {
.setStyle(new NotificationCompat.BigTextStyle().bigText(extra.replace(", ", "\n")))
.setOngoing(false)
.setGroup(NOTIFICATION_SYNC_GROUP)
- .setPriority(NotificationCompat.PRIORITY_LOW);
+ .setPriority(NotificationCompat.PRIORITY_LOW)
+ .setAutoCancel(true);
Intent notificationIntent = new Intent(context, SubsonicFragmentActivity.class);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
- String tab, type;
+ String tab = null, type = null;
switch(stringId) {
case R.string.sync_new_albums:
type = "newest";
@@ -333,8 +334,8 @@ public final class Notifications {
if(type != null) {
notificationIntent.putExtra(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_TYPE, type);
}
-
- builder.setContentIntent(PendingIntent.getActivity(context, 2, notificationIntent, 0));
+
+ builder.setContentIntent(PendingIntent.getActivity(context, stringId, notificationIntent, 0));
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(stringId, builder.build());