Bug 1839039 Comment 5 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I'm able to reproduce this issue consistently and have a fix planned. 

STR

1. Open Fenix and download a test file that is big enough that you can pause the download once it starts.
2. Pause the download.
3. Force close fenix.
4. Open fenix and press home immediately going back to the device launcher screen
5. Quickly open another app/activity.

This results in the crash on android S (SDK 31) and above as `ForegroundServiceStartNotAllowedException` is thrown.
I'm able to reproduce this issue consistently and have a fix planned. 

STR

1. Open Fenix and download a test file that is big enough that you can pause the download once it starts.
2. Pause the download.
3. Force close fenix.
4. Open fenix and press home immediately going back to the device launcher screen
5. Quickly open another app/activity.

This results in the crash on android S (SDK 31) and above as `ForegroundServiceStartNotAllowedException` is thrown. `RestoreDownloadsUsecase` triggers `DownloadMiddleware` to launch a foreground service for non completed/finished downloads. We should check if the app is in foreground before launching the service on SDK 31 and above, and generally do that for all foreground services.

Back to Bug 1839039 Comment 5