1
0
Fork 0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2025-10-05 02:39:29 +02:00

Move PlayerType into its own class and add documentation

Also replace some `isPlayerOpen` with direct `playerType == null` checks.
This commit is contained in:
Stypox 2022-07-10 23:05:37 +02:00
parent 4443c908cb
commit 8187a3bc04
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
11 changed files with 58 additions and 41 deletions

View file

@ -60,7 +60,7 @@ import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.ktx.ExceptionUtils;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.player.PlayerService;
import org.schabi.newpipe.player.PlayerType;
import org.schabi.newpipe.player.helper.PlayerHelper;
import org.schabi.newpipe.player.helper.PlayerHolder;
import org.schabi.newpipe.player.playqueue.ChannelPlayQueue;
@ -630,8 +630,8 @@ public class RouterActivity extends AppCompatActivity {
}
// ...the player is not running or in normal Video-mode/type
final PlayerService.PlayerType playerType = PlayerHolder.getInstance().getType();
return playerType == null || playerType == PlayerService.PlayerType.MAIN;
final PlayerType playerType = PlayerHolder.getInstance().getType();
return playerType == null || playerType == PlayerType.MAIN;
}
private void openAddToPlaylistDialog() {