Adjust Timber debug level

This commit is contained in:
tzugen 2021-04-25 12:24:35 +02:00
parent cd27734c04
commit 0a170918c8
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
1 changed files with 6 additions and 11 deletions

View File

@ -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 {