Skip to content

Commit da36b8a

Browse files
authored
Merge pull request #12337 from Profpatsch/video-detail-fragment-kotlin-conversion
2 parents 183cc58 + 046ea73 commit da36b8a

File tree

16 files changed

+2783
-3036
lines changed

16 files changed

+2783
-3036
lines changed

app/src/main/java/org/schabi/newpipe/MainActivity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ private void openMiniPlayerUponPlayerStarted() {
849849
return;
850850
}
851851

852-
if (PlayerHolder.getInstance().isPlayerOpen()) {
852+
if (PlayerHolder.INSTANCE.isPlayerOpen()) {
853853
// if the player is already open, no need for a broadcast receiver
854854
openMiniPlayerIfMissing();
855855
} else {
@@ -859,7 +859,7 @@ private void openMiniPlayerUponPlayerStarted() {
859859
public void onReceive(final Context context, final Intent intent) {
860860
if (Objects.equals(intent.getAction(),
861861
VideoDetailFragment.ACTION_PLAYER_STARTED)
862-
&& PlayerHolder.getInstance().isPlayerOpen()) {
862+
&& PlayerHolder.INSTANCE.isPlayerOpen()) {
863863
openMiniPlayerIfMissing();
864864
// At this point the player is added 100%, we can unregister. Other actions
865865
// are useless since the fragment will not be removed after that.
@@ -874,7 +874,7 @@ public void onReceive(final Context context, final Intent intent) {
874874

875875
// If the PlayerHolder is not bound yet, but the service is running, try to bind to it.
876876
// Once the connection is established, the ACTION_PLAYER_STARTED will be sent.
877-
PlayerHolder.getInstance().tryBindIfNeeded(this);
877+
PlayerHolder.INSTANCE.tryBindIfNeeded(this);
878878
}
879879
}
880880

app/src/main/java/org/schabi/newpipe/RouterActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ private boolean canHandleChoiceLikeShowInfo(final String selectedChoiceKey) {
701701
}
702702

703703
// ...the player is not running or in normal Video-mode/type
704-
final PlayerType playerType = PlayerHolder.getInstance().getType();
704+
final PlayerType playerType = PlayerHolder.INSTANCE.getType();
705705
return playerType == null || playerType == PlayerType.MAIN;
706706
}
707707

0 commit comments

Comments
 (0)