dont close app accidentially

This commit is contained in:
Bnyro 2022-09-22 19:08:00 +02:00
parent c4fde665d0
commit e888b8a061

View File

@ -1026,9 +1026,9 @@ class PlayerFragment : BaseFragment() {
} }
// listen for the stop button in the notification // listen for the stop button in the notification
if (playbackState == PlaybackState.STATE_STOPPED) { if (playbackState == PlaybackState.STATE_STOPPED && SDK_INT >= Build.VERSION_CODES.O) {
// finish PiP by finishing the activity // finish PiP by finishing the activity
activity?.finish() if (activity?.isInPictureInPictureMode!!) activity?.finish()
} }
super.onPlaybackStateChanged(playbackState) super.onPlaybackStateChanged(playbackState)
} }