Commit 294ae10e by tonihei Committed by kim-vde

Change default of throwsWhenUsingWrongThread to true

Apps can still opt out for now, but this option will be removed in
the future.

Issue: #4463
PiperOrigin-RevId: 333489424
parent a92ccb01
......@@ -6,6 +6,10 @@
* Fix bug where streams with highly uneven durations may get stuck in a
buffering state
([#7943](https://github.com/google/ExoPlayer/issues/7943)).
* Verify correct thread usage in `SimpleExoPlayer` by default. Opt-out is
still possible until the next major release using
`setThrowsWhenUsingWrongThread(false)`
([#4463](https://github.com/google/ExoPlayer/issues/4463)).
* Track selection:
* Add option to specify multiple preferred audio or text languages.
* Data sources:
......
......@@ -618,6 +618,7 @@ public class SimpleExoPlayer extends BasePlayer
audioVolume = 1;
audioSessionId = C.AUDIO_SESSION_ID_UNSET;
currentCues = Collections.emptyList();
throwsWhenUsingWrongThread = true;
// Build the player and associated objects.
player =
......@@ -1948,7 +1949,7 @@ public class SimpleExoPlayer extends BasePlayer
* Sets whether the player should throw an {@link IllegalStateException} when methods are called
* from a thread other than the one associated with {@link #getApplicationLooper()}.
*
* <p>The default is {@code false}, but will change to {@code true} in the future.
* <p>The default is {@code true} and this method will be removed in the future.
*
* @param throwsWhenUsingWrongThread Whether to throw when methods are called from a wrong thread.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment