mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-05-05 18:11:04 +03:00
Adjust Timber debug level
This commit is contained in:
parent
cd27734c04
commit
0a170918c8
@ -323,7 +323,6 @@ class MediaPlayerService : Service() {
|
|||||||
|
|
||||||
private fun setupOnCurrentPlayingChangedHandler() {
|
private fun setupOnCurrentPlayingChangedHandler() {
|
||||||
localMediaPlayer.onCurrentPlayingChanged = { currentPlaying: DownloadFile? ->
|
localMediaPlayer.onCurrentPlayingChanged = { currentPlaying: DownloadFile? ->
|
||||||
Timber.w("Calling onCurrentPlayingChanged")
|
|
||||||
|
|
||||||
if (currentPlaying != null) {
|
if (currentPlaying != null) {
|
||||||
Util.broadcastNewTrackInfo(this@MediaPlayerService, currentPlaying.song)
|
Util.broadcastNewTrackInfo(this@MediaPlayerService, currentPlaying.song)
|
||||||
@ -364,8 +363,6 @@ class MediaPlayerService : Service() {
|
|||||||
currentPlaying: DownloadFile?
|
currentPlaying: DownloadFile?
|
||||||
->
|
->
|
||||||
|
|
||||||
Timber.w("Calling onPlayerStateChanged")
|
|
||||||
|
|
||||||
val context = this@MediaPlayerService
|
val context = this@MediaPlayerService
|
||||||
|
|
||||||
// Notify MediaSession
|
// Notify MediaSession
|
||||||
@ -418,7 +415,6 @@ class MediaPlayerService : Service() {
|
|||||||
|
|
||||||
private fun setupOnSongCompletedHandler() {
|
private fun setupOnSongCompletedHandler() {
|
||||||
localMediaPlayer.onSongCompleted = { currentPlaying: DownloadFile? ->
|
localMediaPlayer.onSongCompleted = { currentPlaying: DownloadFile? ->
|
||||||
Timber.w("Calling onSongCompleted")
|
|
||||||
val index = downloader.currentPlayingIndex
|
val index = downloader.currentPlayingIndex
|
||||||
val context = this@MediaPlayerService
|
val context = this@MediaPlayerService
|
||||||
|
|
||||||
@ -472,7 +468,7 @@ class MediaPlayerService : Service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun updateMediaSession(currentPlaying: DownloadFile?, playerState: PlayerState) {
|
private fun updateMediaSession(currentPlaying: DownloadFile?, playerState: PlayerState) {
|
||||||
Timber.w("Updating the MediaSession")
|
Timber.d("Updating the MediaSession")
|
||||||
|
|
||||||
if (mediaSession == null) initMediaSessions()
|
if (mediaSession == null) initMediaSessions()
|
||||||
|
|
||||||
@ -547,8 +543,7 @@ class MediaPlayerService : Service() {
|
|||||||
// Set Active state
|
// Set Active state
|
||||||
mediaSession!!.isActive = isPlaying
|
mediaSession!!.isActive = isPlaying
|
||||||
|
|
||||||
Timber.w("Current controller: %s", mediaSession!!.remoteControlClient)
|
Timber.d("Setting the MediaSession to active = %s", isPlaying)
|
||||||
Timber.w("Setting the MediaSession to active = %s", isPlaying)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createNotificationChannel() {
|
private fun createNotificationChannel() {
|
||||||
@ -586,7 +581,7 @@ class MediaPlayerService : Service() {
|
|||||||
} else {
|
} else {
|
||||||
startForeground(NOTIFICATION_ID, notification)
|
startForeground(NOTIFICATION_ID, notification)
|
||||||
isInForeground = true
|
isInForeground = true
|
||||||
Timber.w("Created Foreground notification")
|
Timber.v("Created Foreground notification")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -809,7 +804,7 @@ class MediaPlayerService : Service() {
|
|||||||
keycode
|
keycode
|
||||||
).send()
|
).send()
|
||||||
|
|
||||||
Timber.w("Media Session Callback: onPlay")
|
Timber.v("Media Session Callback: onPlay")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
@ -819,7 +814,7 @@ class MediaPlayerService : Service() {
|
|||||||
KeyEvent.KEYCODE_MEDIA_PAUSE,
|
KeyEvent.KEYCODE_MEDIA_PAUSE,
|
||||||
keycode
|
keycode
|
||||||
).send()
|
).send()
|
||||||
Timber.w("Media Session Callback: onPause")
|
Timber.v("Media Session Callback: onPause")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStop() {
|
override fun onStop() {
|
||||||
@ -829,7 +824,7 @@ class MediaPlayerService : Service() {
|
|||||||
KeyEvent.KEYCODE_MEDIA_STOP,
|
KeyEvent.KEYCODE_MEDIA_STOP,
|
||||||
keycode
|
keycode
|
||||||
).send()
|
).send()
|
||||||
Timber.w("Media Session Callback: onStop")
|
Timber.v("Media Session Callback: onStop")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
|
override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user