Android: mark bgtask as finished if process is already running
This commit is contained in:
parent
445a013801
commit
a005494a12
|
@ -71,7 +71,7 @@ Future<void> _runInForeground() async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _runBackgroundTask(String taskId) async {
|
Future<void> _runBackgroundTask(String taskId) async {
|
||||||
if (Platform.isIOS && _isProcessRunning) {
|
if (_isProcessRunning) {
|
||||||
_logger.info("Background task triggered when process was already running");
|
_logger.info("Background task triggered when process was already running");
|
||||||
await _sync('bgTaskActiveProcess');
|
await _sync('bgTaskActiveProcess');
|
||||||
BackgroundFetch.finish(taskId);
|
BackgroundFetch.finish(taskId);
|
||||||
|
|
Loading…
Reference in a new issue