mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-06-26 15:13:00 +00:00
Player: destroy -> saveAndShutdown
This commit is contained in:
parent
06cf511188
commit
f5a4af2d67
@ -591,9 +591,15 @@ public final class Player implements PlaybackListener, Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void destroy() {
|
|
||||||
|
/**
|
||||||
|
* Shut down this player.
|
||||||
|
* Saves the stream progress, sets recovery.
|
||||||
|
* Then destroys the player in all UIs and destroys the UIs as well.
|
||||||
|
*/
|
||||||
|
public void saveAndShutdown() {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.d(TAG, "destroy() called");
|
Log.d(TAG, "saveAndShutdown() called");
|
||||||
}
|
}
|
||||||
|
|
||||||
saveStreamProgressState();
|
saveStreamProgressState();
|
||||||
|
@ -226,7 +226,7 @@ class PlayerService : MediaBrowserServiceCompat() {
|
|||||||
// notify that the player is being destroyed
|
// notify that the player is being destroyed
|
||||||
onPlayerStartedOrStopped!!.accept(null)
|
onPlayerStartedOrStopped!!.accept(null)
|
||||||
}
|
}
|
||||||
player!!.destroy()
|
player!!.saveAndShutdown()
|
||||||
player = null
|
player = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user