mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-02 06:50:13 +01:00
Add comment about broadcast receiver
This commit is contained in:
parent
6fb0256997
commit
fa25ecf521
@ -663,6 +663,12 @@ public final class Player implements PlaybackListener, Listener {
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
//region Broadcast receiver
|
||||
|
||||
/**
|
||||
* This function prepares the broadcast receiver and is called only in the constructor.
|
||||
* Therefore if you want any PlayerUi to receive a broadcast action, you should add it here,
|
||||
* even if that player ui might never be added to the player. In that case the received
|
||||
* broadcast would not do anything.
|
||||
*/
|
||||
private void setupBroadcastReceiver() {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "setupBroadcastReceiver() called");
|
||||
|
@ -55,6 +55,10 @@ public abstract class PlayerUi {
|
||||
public void onFragmentListenerSet() {
|
||||
}
|
||||
|
||||
/**
|
||||
* If you want to register new broadcast actions to receive here, add them to
|
||||
* {@link Player#setupBroadcastReceiver()}.
|
||||
*/
|
||||
public void onBroadcastReceived(final Intent intent) {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user