From 7010a71a1a4e41abcedc5bb5a9625066d80d6298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Thu, 18 Jan 2024 11:52:54 +0100 Subject: [PATCH 1/4] Remove "coucou" log in LeanbackPlayerFragment. --- .../demo/tv/player/leanback/LeanbackPlayerFragment.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt index 40e9509b2..50dcd712a 100644 --- a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt +++ b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt @@ -90,14 +90,18 @@ class LeanbackPlayerFragment : VideoSupportFragment() { } override fun onPause() { - Log.d("Coucou", "PlayerFragment:onPause") + Log.d(TAG, "PlayerFragment:onPause") super.onPause() player.pause() } override fun onDestroy() { super.onDestroy() - Log.d("Coucou", "PlayerFragment:onDestroy") + Log.d(TAG, "PlayerFragment:onDestroy") player.release() } + + companion object { + const val TAG = "LeanbackPlayerFragment" + } } From 95b6e6ef73878bc06bd3cc65f4064b1130facc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Thu, 18 Jan 2024 13:03:12 +0100 Subject: [PATCH 2/4] Fix detekt error Public properties require documentation --- .../pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt index 50dcd712a..c63c9bfa0 100644 --- a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt +++ b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt @@ -102,6 +102,6 @@ class LeanbackPlayerFragment : VideoSupportFragment() { } companion object { - const val TAG = "LeanbackPlayerFragment" + private const val TAG = "LeanbackPlayerFragment" } } From d6a00dd27bc41ab79fe976831dc75f56deff39b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Thu, 18 Jan 2024 13:28:32 +0100 Subject: [PATCH 3/4] Remove unnecessary logs --- .../demo/tv/player/leanback/LeanbackPlayerFragment.kt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt index c63c9bfa0..b550cb0dd 100644 --- a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt +++ b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt @@ -90,18 +90,12 @@ class LeanbackPlayerFragment : VideoSupportFragment() { } override fun onPause() { - Log.d(TAG, "PlayerFragment:onPause") super.onPause() player.pause() } override fun onDestroy() { super.onDestroy() - Log.d(TAG, "PlayerFragment:onDestroy") player.release() } - - companion object { - private const val TAG = "LeanbackPlayerFragment" - } } From 65ca3f56fdfe41e0559374fd66715b74a2ad5d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Thu, 18 Jan 2024 13:41:09 +0100 Subject: [PATCH 4/4] Fix Detekt errors. --- .../pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt index b550cb0dd..34b57c591 100644 --- a/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt +++ b/pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/player/leanback/LeanbackPlayerFragment.kt @@ -5,7 +5,6 @@ package ch.srgssr.pillarbox.demo.tv.player.leanback import android.os.Bundle -import android.util.Log import androidx.leanback.app.VideoSupportFragment import androidx.leanback.app.VideoSupportFragmentGlueHost import androidx.leanback.media.PlaybackGlue