Skip to content

Commit 5a2047f

Browse files
committed
PlayerHolder: improve interface docstrings
1 parent c9d273b commit 5a2047f

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/event/PlayerHolderLifecycleEventListener.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22

33
import org.schabi.newpipe.player.PlayerService;
44

5-
/** Gets signalled if our PlayerHolder (dis)connects from the PlayerService. */
5+
/** Gets signalled if our PlayerHolder (dis)connects from the PlayerService.
6+
* This is currently only implemented by the
7+
* {@link org.schabi.newpipe.fragments.detail.VideoDetailFragment}. */
68
public interface PlayerHolderLifecycleEventListener {
9+
10+
/** Our {@link org.schabi.newpipe.player.helper.PlayerHolder} connected to its service.
11+
* @param playerService The service the holder connected to
12+
* @param playAfterConnect */
713
void onServiceConnected(PlayerService playerService,
814
boolean playAfterConnect);
15+
16+
/** Our {@link org.schabi.newpipe.player.helper.PlayerHolder} was unbound and thus
17+
* disconnected from the {@link org.schabi.newpipe.player.PlayerService}. */
918
void onServiceDisconnected();
1019
}

app/src/main/java/org/schabi/newpipe/player/helper/PlayerHolder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ private Context getCommonContext() {
125125
* Connect to (and if needed start) the {@link PlayerService}
126126
* and bind {@link PlayerServiceConnection} to it.
127127
* If the service is already started, only set the listener.
128-
* @param playAfterConnect If the service is started, start playing immediately
128+
* @param playAfterConnect If this holder’s service was already started,
129+
* start playing immediately
129130
* @param newListener set this listener
130131
* @param newHolderListener set this listener
131132
* */

0 commit comments

Comments
 (0)