File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -591,9 +591,15 @@ private void destroyPlayer() {
591591 }
592592 }
593593
594- public void destroy () {
594+
595+ /**
596+ * Shut down this player.
597+ * Saves the stream progress, sets recovery.
598+ * Then destroys the player in all UIs and destroys the UIs as well.
599+ */
600+ public void saveAndShutdown () {
595601 if (DEBUG ) {
596- Log .d (TAG , "destroy () called" );
602+ Log .d (TAG , "saveAndShutdown () called" );
597603 }
598604
599605 saveStreamProgressState ();
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ class PlayerService : MediaBrowserServiceCompat() {
226226 // notify that the player is being destroyed
227227 onPlayerStartedOrStopped!! .accept(null )
228228 }
229- player!! .destroy ()
229+ player!! .saveAndShutdown ()
230230 player = null
231231 }
232232
You can’t perform that action at this time.
0 commit comments