Document threading guarantee of Player.addListener
These guarantees were documented for `EventListener` and hold as well for Listener but were not documented. PiperOrigin-RevId: 382498188
This commit is contained in:
parent
a24bbbdd5e
commit
4de4f85739
@ -1262,9 +1262,11 @@ public interface Player {
|
||||
Looper getApplicationLooper();
|
||||
|
||||
/**
|
||||
* Registers a listener to receive events from the player. The listener's methods will be called
|
||||
* on the thread that was used to construct the player. However, if the thread used to construct
|
||||
* the player does not have a {@link Looper}, then the listener will be called on the main thread.
|
||||
* Registers a listener to receive events from the player.
|
||||
*
|
||||
* <p>The listener's methods will be called on the thread that was used to construct the player.
|
||||
* However, if the thread used to construct the player does not have a {@link Looper}, then the
|
||||
* listener will be called on the main thread.
|
||||
*
|
||||
* @param listener The listener to register.
|
||||
* @deprecated Use {@link #addListener(Listener)} and {@link #removeListener(Listener)} instead.
|
||||
@ -1275,6 +1277,10 @@ public interface Player {
|
||||
/**
|
||||
* Registers a listener to receive all events from the player.
|
||||
*
|
||||
* <p>The listener's methods will be called on the thread that was used to construct the player.
|
||||
* However, if the thread used to construct the player does not have a {@link Looper}, then the
|
||||
* listener will be called on the main thread.
|
||||
*
|
||||
* @param listener The listener to register.
|
||||
*/
|
||||
void addListener(Listener listener);
|
||||
|
Loading…
x
Reference in New Issue
Block a user