Merge pull request #3718 from ByteHamster/downloadservice-io-main-thread

Do not enqueue on main tread (database IO)
This commit is contained in:
H. Lehmann 2020-01-02 19:09:19 +01:00 committed by GitHub
commit 2e8b7e988f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ public class DownloadService extends Service {
Notification notification = notificationManager.updateNotifications(
requester.getNumberOfDownloads(), downloads);
startForeground(NOTIFICATION_ID, notification);
onDownloadQueued(intent);
syncExecutor.execute(() -> onDownloadQueued(intent));
} else if (numberOfDownloads.get() == 0) {
stopSelf();
} else {