Merged in PhotonQyv/mastodon_etalab/FixedNotification (pull request #91)

Fixed Notifications
This commit is contained in:
PhotonQyv 2017-08-28 06:34:28 +00:00 committed by tom79
commit 45f1922750
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));