Do not enqueue on main tread (database IO)
This commit is contained in:
parent
5fc6877a87
commit
e119b154cb
@ -167,7 +167,7 @@ public class DownloadService extends Service {
|
|||||||
Notification notification = notificationManager.updateNotifications(
|
Notification notification = notificationManager.updateNotifications(
|
||||||
requester.getNumberOfDownloads(), downloads);
|
requester.getNumberOfDownloads(), downloads);
|
||||||
startForeground(NOTIFICATION_ID, notification);
|
startForeground(NOTIFICATION_ID, notification);
|
||||||
onDownloadQueued(intent);
|
syncExecutor.execute(() -> onDownloadQueued(intent));
|
||||||
} else if (numberOfDownloads.get() == 0) {
|
} else if (numberOfDownloads.get() == 0) {
|
||||||
stopSelf();
|
stopSelf();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user