Skip to content

Stuck downloads when changing network conditions #6798

@daveoxley

Description

@daveoxley

Issue description

DownloadService race condition causing downloads to not resume when network requirements are met after previously not being met.

The issue appears to be that DownloadManagerHelper.onDownloadChanged is called before the new service is attached to the DownloadManagerHelper. Therefore DownloadService.notifyDownloadChanged is never called and startForeground is never called on the new service. The app process is then killed after roughly 10 seconds as the scheduler has been cancelled.

Reproduction steps

Using the exoplayer app:

  • Start downloading some content
  • Click back to exit the app. Downloading notification should be shown.
  • Turn off network. Downloading notification should be hidden.
  • Wait approximately 2 minutes.
  • Turn on network. Downloading notification is not reshown when it should be.

Link to test content

Tested using WV: Clear SD & HD (MP4,H264) in the sample app.

Version of ExoPlayer being used

2.10.7. Also reproduced the issue on 2.11.1.

Device(s) and version(s) of Android being used

Pixel 3XL Android 10 (QQ1A.191205.008)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions