From 39c9c4c18812f3d7388e040ede97e35429d20d46 Mon Sep 17 00:00:00 2001 From: PhotonQyv Date: Sun, 27 Aug 2017 22:32:29 +0100 Subject: [PATCH] Fixed Notifications. I messed up when I changed the code. Mastodon Boop now sounds again, and vibration works for silent notifications. --- app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java index 1e71beb5c..4c9281d39 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java @@ -596,11 +596,8 @@ public class Helper { .setAutoCancel(true) .setContentIntent(pIntent) .setContentText(message); - - int notifDefaults = FLAG_SHOW_LIGHTS; - notificationBuilder.setDefaults(notifDefaults); if( sharedpreferences.getBoolean(Helper.SET_NOTIF_SILENT,false) ) { - notificationBuilder.setDefaults(notifDefaults|DEFAULT_VIBRATE); + notificationBuilder.setVibrate(new long[] { 500, 500, 500}); }else { String soundUri = ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() +"/"; notificationBuilder.setSound(Uri.parse(soundUri + R.raw.boop));