Fixed Notifications. I messed up when I changed the code. Mastodon Boop now sounds again, and vibration works for silent notifications.

This commit is contained in:
PhotonQyv 2017-08-27 22:32:29 +01:00
parent fc0a6727c3
commit 39c9c4c188
1 changed files with 1 additions and 4 deletions

View File

@ -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));