use priority low when creating notification without sound/vibration.

should prevent notifcations showing up in ambient display
This commit is contained in:
Daniel Gultsch 2017-02-28 15:32:57 +01:00
parent 4cddf31ad2
commit 23a91e5019
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ public class NotificationService {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mBuilder.setCategory(Notification.CATEGORY_MESSAGE);
}
mBuilder.setPriority(NotificationCompat.PRIORITY_HIGH);
mBuilder.setPriority(notify ? NotificationCompat.PRIORITY_HIGH : NotificationCompat.PRIORITY_LOW);
setNotificationColor(mBuilder);
mBuilder.setDefaults(0);
if (led) {