Remove opt-out for suppressing wrong thread usage error.
Enforcing the correct thread usage has been enabled since 2.13.0. Opting-out of this enforement is dangerous as it can hide very hard to debug bugs. PiperOrigin-RevId: 424815808
This commit is contained in:
parent
3a23383bc3
commit
857c18b2e9
@ -1547,20 +1547,6 @@ public interface ExoPlayer extends Player {
|
|||||||
@UnstableApi
|
@UnstableApi
|
||||||
void setPriorityTaskManager(@Nullable PriorityTaskManager priorityTaskManager);
|
void setPriorityTaskManager(@Nullable PriorityTaskManager priorityTaskManager);
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 true} and this method will be removed in the future.
|
|
||||||
*
|
|
||||||
* @param throwsWhenUsingWrongThread Whether to throw when methods are called from a wrong thread.
|
|
||||||
* @deprecated Disabling the enforcement can result in hard-to-detect bugs. Do not use this method
|
|
||||||
* except to ease the transition while wrong thread access problems are fixed.
|
|
||||||
*/
|
|
||||||
@UnstableApi
|
|
||||||
@Deprecated
|
|
||||||
void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets whether audio offload scheduling is enabled. If enabled, ExoPlayer's main loop will run as
|
* Sets whether audio offload scheduling is enabled. If enabled, ExoPlayer's main loop will run as
|
||||||
* rarely as possible when playing an audio stream using audio offload.
|
* rarely as possible when playing an audio stream using audio offload.
|
||||||
|
@ -1552,9 +1552,7 @@ public class SimpleExoPlayer extends BasePlayer
|
|||||||
streamVolumeManager.setMuted(muted);
|
streamVolumeManager.setMuted(muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
/* package */ void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
||||||
@Override
|
|
||||||
public void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
|
||||||
this.throwsWhenUsingWrongThread = throwsWhenUsingWrongThread;
|
this.throwsWhenUsingWrongThread = throwsWhenUsingWrongThread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,12 +359,6 @@ public class StubExoPlayer extends StubPlayer implements ExoPlayer {
|
|||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
@Override
|
|
||||||
public void setThrowsWhenUsingWrongThread(boolean throwsWhenUsingWrongThread) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void experimentalSetOffloadSchedulingEnabled(boolean offloadSchedulingEnabled) {
|
public void experimentalSetOffloadSchedulingEnabled(boolean offloadSchedulingEnabled) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user