Android: mark bgtask as finished if process is already running

This commit is contained in:
Neeraj Gupta 2022-07-05 22:51:06 +05:30
parent 445a013801
commit a005494a12
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -71,7 +71,7 @@ Future<void> _runInForeground() async {
}
Future<void> _runBackgroundTask(String taskId) async {
if (Platform.isIOS && _isProcessRunning) {
if (_isProcessRunning) {
_logger.info("Background task triggered when process was already running");
await _sync('bgTaskActiveProcess');
BackgroundFetch.finish(taskId);