This commit is contained in:
Oizaro 2020-09-20 01:10:05 +02:00 committed by GitHub
parent 6d47d24b56
commit a9ee2e5065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class ForegroundServiceContext extends ContextWrapper {
if (!isIgnoringBatteryOptimizations() && !isAppOnForeground()) {
Log.d(TAG, "Starting in foreground mode.");
service.putExtra(EXTRA_FOREGROUND, true);
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return super.startService(service);
}
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -100,4 +100,4 @@ public class ForegroundServiceContext extends ContextWrapper {
.bigText(context.getResources().getString(R.string.notification_service_content)))
.build();
}
}
}