Explicitly mark service notifications as ongoing

pull/207/head
M66B 3 years ago
parent a4265be2d4
commit d0a9e49221

@ -137,7 +137,8 @@ public class ServiceExternal extends Service {
.setPriority(NotificationCompat.PRIORITY_MIN)
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
.setLocalOnly(true);
.setLocalOnly(true)
.setOngoing(true);
return builder;
}

@ -222,6 +222,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
.setOnlyAlertOnce(!alert)
.setDefaults(0) // disable sound on pre Android 8
.setLocalOnly(true)
.setOngoing(true)
.setPriority(NotificationCompat.PRIORITY_MIN)
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setVisibility(NotificationCompat.VISIBILITY_SECRET);

@ -1314,7 +1314,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
.setDefaults(0) // disable sound on pre Android 8
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
.setLocalOnly(true);
.setLocalOnly(true)
.setOngoing(true);
if (lastAccounts > 0)
builder.setContentTitle(getResources().getQuantityString(

Loading…
Cancel
Save