[Android] Restore service callbacks in onStart/onStop
Geoffrey Métais
git at videolan.org
Wed Apr 4 18:35:53 CEST 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 26 16:01:03 2018 +0200| [5fde0fd55a43ccf45158f32f309eca5edd749643] | committer: Geoffrey Métais
Restore service callbacks in onStart/onStop
> https://code.videolan.org/videolan/vlc-android/commit/5fde0fd55a43ccf45158f32f309eca5edd749643
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 021a05dda..28be41ee3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -75,6 +75,9 @@ import org.videolan.vlc.util.Constants
import org.videolan.vlc.viewmodels.PlaybackProgress
import org.videolan.vlc.viewmodels.PlaylistModel
+private const val TAG = "VLC/AudioPlayer"
+private const val SEARCH_TIMEOUT_MILLIS = 5000
+
@Suppress("UNUSED_PARAMETER")
class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, PlaybackService.Client.Callback {
@@ -99,11 +102,8 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, PlaybackSe
private var currentCoverArt: String? = null
companion object {
- const val TAG = "VLC/AudioPlayer"
-
private var DEFAULT_BACKGROUND_DARKER_ID = 0
private var DEFAULT_BACKGROUND_ID = 0
- private const val SEARCH_TIMEOUT_MILLIS = 5000
}
override fun onCreate(savedInstanceState: Bundle?) {
@@ -151,13 +151,13 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, PlaybackSe
binding.playlistSwitch.setImageResource(UiTools.getResourceFromAttribute(view.context, if (binding.showCover) R.attr.ic_playlist else R.attr.ic_playlist_on))
}
- override fun onResume() {
- super.onResume()
+ override fun onStart() {
+ super.onStart()
helper.onStart()
}
- override fun onPause() {
- super.onPause()
+ override fun onStop() {
+ super.onStop()
helper.onStop()
}
More information about the Android
mailing list