mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-02-02 04:09:13 +00:00
Adjust javadoc format
This commit is contained in:
parent
ce919215fb
commit
137ade24ff
@ -174,9 +174,10 @@ public final class PlayerService extends Service {
|
|||||||
return mBinder;
|
return mBinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Allows us this {@link org.schabi.newpipe.player.PlayerService} over the Service boundary
|
/**
|
||||||
|
* Allows us this {@link org.schabi.newpipe.player.PlayerService} over the Service boundary
|
||||||
* back to our {@link org.schabi.newpipe.player.helper.PlayerHolder}.
|
* back to our {@link org.schabi.newpipe.player.helper.PlayerHolder}.
|
||||||
*/
|
*/
|
||||||
public static class LocalBinder extends Binder {
|
public static class LocalBinder extends Binder {
|
||||||
private final WeakReference<PlayerService> playerService;
|
private final WeakReference<PlayerService> playerService;
|
||||||
|
|
||||||
@ -184,7 +185,8 @@ public final class PlayerService extends Service {
|
|||||||
this.playerService = new WeakReference<>(playerService);
|
this.playerService = new WeakReference<>(playerService);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the PlayerService object itself.
|
/**
|
||||||
|
* Get the PlayerService object itself.
|
||||||
* @return this
|
* @return this
|
||||||
* */
|
* */
|
||||||
public @Nullable PlayerService getService() {
|
public @Nullable PlayerService getService() {
|
||||||
|
@ -24,8 +24,10 @@ import org.schabi.newpipe.player.event.PlayerServiceEventListener;
|
|||||||
import org.schabi.newpipe.player.event.PlayerHolderLifecycleEventListener;
|
import org.schabi.newpipe.player.event.PlayerHolderLifecycleEventListener;
|
||||||
import org.schabi.newpipe.player.playqueue.PlayQueue;
|
import org.schabi.newpipe.player.playqueue.PlayQueue;
|
||||||
|
|
||||||
/** Singleton that manages a `PlayerService`
|
/**
|
||||||
* and can be used to control the player instance through the service. */
|
* Singleton that manages a `PlayerService`
|
||||||
|
* and can be used to control the player instance through the service.
|
||||||
|
*/
|
||||||
public final class PlayerHolder {
|
public final class PlayerHolder {
|
||||||
|
|
||||||
private PlayerHolder() {
|
private PlayerHolder() {
|
||||||
@ -121,7 +123,8 @@ public final class PlayerHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Helper to handle context in common place as using the same
|
/**
|
||||||
|
* Helper to handle context in common place as using the same
|
||||||
* context to bind/unbind a service is crucial.
|
* context to bind/unbind a service is crucial.
|
||||||
*
|
*
|
||||||
* @return the common context
|
* @return the common context
|
||||||
@ -131,7 +134,8 @@ public final class PlayerHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Connect to (and if needed start) the {@link PlayerService}
|
/**
|
||||||
|
* Connect to (and if needed start) the {@link PlayerService}
|
||||||
* and bind {@link PlayerServiceConnection} to it.
|
* and bind {@link PlayerServiceConnection} to it.
|
||||||
* If the service is already started, only set the listener.
|
* If the service is already started, only set the listener.
|
||||||
* @param playAfterConnect If the service is started, start playing immediately
|
* @param playAfterConnect If the service is started, start playing immediately
|
||||||
@ -172,7 +176,8 @@ public final class PlayerHolder {
|
|||||||
context.stopService(new Intent(context, PlayerService.class));
|
context.stopService(new Intent(context, PlayerService.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Call {@link Context#unbindService(ServiceConnection)} on our service
|
/**
|
||||||
|
* Call {@link Context#unbindService(ServiceConnection)} on our service
|
||||||
* (does not necesarily stop the service right away).
|
* (does not necesarily stop the service right away).
|
||||||
* Remove all our listeners and deinitialize them.
|
* Remove all our listeners and deinitialize them.
|
||||||
* @param context shared context
|
* @param context shared context
|
||||||
@ -229,7 +234,8 @@ public final class PlayerHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Delegate all {@link PlayerServiceEventListener} events to our current `listener` object.
|
/**
|
||||||
|
* Delegate all {@link PlayerServiceEventListener} events to our current `listener` object.
|
||||||
* Only difference is that if {@link PlayerServiceEventListener#onServiceStopped()} is called,
|
* Only difference is that if {@link PlayerServiceEventListener#onServiceStopped()} is called,
|
||||||
* it also calls {@link PlayerHolder#unbind(Context)}.
|
* it also calls {@link PlayerHolder#unbind(Context)}.
|
||||||
* */
|
* */
|
||||||
|
Loading…
Reference in New Issue
Block a user