media/library
christosts 3db269812a Synchronize initialization of DefaultDownloadIndex
There is a race condition when initializing the downloads database. The
constructor of the DownloadManager kicks-off the database initialization
in its internal thread, but at the same time an app can try to access
the database directly through the manager's download index, e.g. doing

DonwloadManager manager = new ...
manager.getDownloadIndex().getDownload("id");

might enter DefaultDownloadIndex.ensureInitialized() from two threads.
When upgrading the downloads table from version 2 to version 3, the
first thread that enters the database transaction in ensureInitialized()
will drop and recreate the table using the v3 schema. Then, the second
thread will attempt to read from the newly created table using the v2
schema, which will fail.

This race condition was not introduced in 2.12 but was there already.
However, prior to 2.12, the code only dropped and re-created and the
table and did not attempt to read any data. Hence, if the race condition
happened, the code would drop and create the table twice, but no error
would occur.

Issue: #8420
#minor-release
PiperOrigin-RevId: 350745463
2021-01-11 16:14:34 +00:00
..
all Move common gradle setup to a setting file. 2020-06-26 11:13:25 +01:00
common Throw ParserException if AAC config is invalid 2021-01-11 16:13:28 +00:00
core Synchronize initialization of DefaultDownloadIndex 2021-01-11 16:14:34 +00:00
dash Switch to an 'api' dependency on Guava 2020-10-20 22:16:12 +01:00
extractor Add iso9 to the list of supported MP4 brands 2021-01-11 16:13:28 +00:00
hls HlsPlaylistParser: ignore subtitles without URI 2021-01-11 16:14:34 +00:00
smoothstreaming Simplify DefaultMediaSourceFactory ad configuration 2020-09-07 20:46:57 +01:00
ui Fix UI menu not dismissing on API level 22 and earlier 2021-01-11 16:13:29 +00:00
README.md Tweak and add READMEs + remove refs to V1 2017-08-17 22:59:34 +01:00

ExoPlayer library

The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.