Small fix

This commit is contained in:
M66B 2020-10-09 20:33:31 +02:00
parent 0e6f764300
commit c342b8c625
1 changed files with 1 additions and 1 deletions

View File

@ -2253,7 +2253,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
private static void start(Context context, Intent intent) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean background_service = prefs.getBoolean("background_service", false);
if (background_service)
if (background_service && Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
context.startService(intent);
else
ContextCompat.startForegroundService(context, intent);