Update ExoPlayer doc to specifically discourage parallel access instead of allowing it.

Even if a developer synchronizes every method, thread safety is still not guaranteed
because the internal callback methods can't be synced from outside.

Issue:#3773

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184122072
This commit is contained in:
tonihei 2018-02-01 04:52:51 -08:00 committed by Oliver Woodman
parent 51963dea2e
commit c8f39fe14d

View File

@ -91,10 +91,9 @@ import com.google.android.exoplayer2.video.MediaCodecVideoRenderer;
* model">
*
* <ul>
* <li>It is recommended that ExoPlayer instances are created and accessed from a single
* <li>It is strongly recommended that ExoPlayer instances are created and accessed from a single
* application thread. The application's main thread is ideal. Accessing an instance from
* multiple threads is discouraged, however if an application does wish to do this then it may
* do so provided that it ensures accesses are synchronized.
* multiple threads is discouraged as it may cause synchronization problems.
* <li>Registered listeners are called on the thread that created the ExoPlayer instance, unless
* the thread that created the ExoPlayer instance does not have a {@link Looper}. In that
* case, registered listeners will be called on the application's main thread.