Skip to content

Commit 5c49ba6

Browse files
committed
Use tryBindIfNeeded() instead of startService()
1 parent 8afb00d commit 5c49ba6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,10 +1411,8 @@ public void onReceive(final Context context, final Intent intent) {
14111411
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
14121412
}
14131413
// Rebound to the service if it was closed via notification or mini player
1414-
if (!playerHolder.isBound()) {
1415-
playerHolder.startService(
1416-
false, VideoDetailFragment.this);
1417-
}
1414+
playerHolder.setListener(VideoDetailFragment.this);
1415+
playerHolder.tryBindIfNeeded(context);
14181416
break;
14191417
}
14201418
}

0 commit comments

Comments
 (0)