Skip to content
Permalink
Browse files

Ensure Legacy notifications are local only, have correct priority

On pre-API 26 devices, we need to set the priority/sound/vibrate on the notification itself. As the notification is related only to the phone and not connected devices, it should be local only and not bridged over.
  • Loading branch information...
ianhanniballake committed Jul 11, 2019
1 parent d23e0a9 commit 47c43428cd80376e7ec7e9539e3432242bf0f777
@@ -109,6 +109,9 @@ class LegacySourcePackageListener(
.setStyle(NotificationCompat.BigTextStyle().bigText(
applicationContext.getString(R.string.legacy_notification_text)))
.setLargeIcon(info.icon)
.setLocalOnly(true)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
.setDefaults(NotificationCompat.DEFAULT_ALL)
.setOnlyAlertOnce(true)
.build()
notificationManager.notify(info.packageName, NOTIFICATION_ID, notification)

0 comments on commit 47c4342

Please sign in to comment.
You can’t perform that action at this time.