This commit is contained in:
Oizaro 2020-09-18 02:12:44 +02:00
parent 7b97618467
commit a1813f2bcc
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class ForegroundServiceContext extends ContextWrapper {
@Override
public ComponentName startService(Intent service) {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !isIgnoringBatteryOptimizations() && !isAppOnForeground()) {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && isIgnoringBatteryOptimizations() && !isAppOnForeground()) {
Log.d(TAG, "Starting in foreground mode.");
service.putExtra(EXTRA_FOREGROUND, true);
return super.startForegroundService(service);