Explicitly set defaults for service notifications

pull/174/head
M66B 5 years ago
parent e6749d5ef1
commit e91b411cf7

@ -141,6 +141,7 @@ public class ServiceExternal extends Service {
.setContentTitle(getString(R.string.tile_synchronize))
.setAutoCancel(false)
.setShowWhen(false)
.setDefaults(0) // disable sound on pre Android 8
.setPriority(NotificationCompat.PRIORITY_MIN)
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setVisibility(NotificationCompat.VISIBILITY_SECRET)

@ -174,6 +174,7 @@ public class ServiceSend extends ServiceBase {
.setContentIntent(pi)
.setAutoCancel(false)
.setShowWhen(true)
.setDefaults(0) // disable sound on pre Android 8
.setLocalOnly(true)
.setPriority(NotificationCompat.PRIORITY_MIN)
.setCategory(NotificationCompat.CATEGORY_SERVICE)

@ -717,6 +717,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
.setAutoCancel(false)
.setShowWhen(false)
.setPriority(NotificationCompat.PRIORITY_MIN)
.setDefaults(0) // disable sound on pre Android 8
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
.setLocalOnly(true);

Loading…
Cancel
Save