[Android] Remove unnecessary actions on service destroyed
Geoffrey Métais
git at videolan.org
Fri Jan 26 17:41:24 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan 26 17:40:55 2018 +0100| [cd55bb5616ade9937b434ab1c6a68d9ba0d7c1d8] | committer: Geoffrey Métais
Remove unnecessary actions on service destroyed
> https://code.videolan.org/videolan/vlc-android/commit/cd55bb5616ade9937b434ab1c6a68d9ba0d7c1d8
---
vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index b63dd1f91..3d0009de2 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -174,10 +174,13 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
previous.clear()
currentIndex = -1
mediaList.clear()
- if (systemExit) player.release() else player.restart()
- medialibrary.resumeBackgroundOperations()
- service.onPlaybackStopped()
- if (!systemExit) service.hideNotification()
+ if (systemExit) player.release()
+ else {
+ player.restart()
+ medialibrary.resumeBackgroundOperations()
+ service.onPlaybackStopped()
+ service.hideNotification()
+ }
}
@MainThread
More information about the Android
mailing list