24
24
import org .schabi .newpipe .player .event .PlayerHolderLifecycleEventListener ;
25
25
import org .schabi .newpipe .player .playqueue .PlayQueue ;
26
26
27
- /** Singleton that manages a `PlayerService`
28
- * and can be used to control the player instance through the service. */
27
+ /**
28
+ * Singleton that manages a `PlayerService`
29
+ * and can be used to control the player instance through the service.
30
+ */
29
31
public final class PlayerHolder {
30
32
31
33
private PlayerHolder () {
@@ -121,7 +123,8 @@ public void setListener(@NonNull final PlayerServiceEventListener newListener,
121
123
}
122
124
}
123
125
124
- /** Helper to handle context in common place as using the same
126
+ /**
127
+ * Helper to handle context in common place as using the same
125
128
* context to bind/unbind a service is crucial.
126
129
*
127
130
* @return the common context
@@ -131,7 +134,8 @@ private Context getCommonContext() {
131
134
}
132
135
133
136
134
- /** Connect to (and if needed start) the {@link PlayerService}
137
+ /**
138
+ * Connect to (and if needed start) the {@link PlayerService}
135
139
* and bind {@link PlayerServiceConnection} to it.
136
140
* If the service is already started, only set the listener.
137
141
* @param playAfterConnect If the service is started, start playing immediately
@@ -172,7 +176,8 @@ public void stopService() {
172
176
context .stopService (new Intent (context , PlayerService .class ));
173
177
}
174
178
175
- /** Call {@link Context#unbindService(ServiceConnection)} on our service
179
+ /**
180
+ * Call {@link Context#unbindService(ServiceConnection)} on our service
176
181
* (does not necesarily stop the service right away).
177
182
* Remove all our listeners and deinitialize them.
178
183
* @param context shared context
@@ -229,7 +234,8 @@ public void onServiceConnected(final ComponentName compName, final IBinder servi
229
234
}
230
235
}
231
236
232
- /** Delegate all {@link PlayerServiceEventListener} events to our current `listener` object.
237
+ /**
238
+ * Delegate all {@link PlayerServiceEventListener} events to our current `listener` object.
233
239
* Only difference is that if {@link PlayerServiceEventListener#onServiceStopped()} is called,
234
240
* it also calls {@link PlayerHolder#unbind(Context)}.
235
241
* */
0 commit comments