[Android] Prevent displaying tips on TV as it leads to crashes

Nicolas Pomepuy git at videolan.org
Tue Sep 28 07:00:19 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Sep 28 08:41:35 2021 +0200| [9d0c61bf29bdc1d06dc377be829150929ef247bc] | committer: Nicolas Pomepuy

Prevent displaying tips on TV as it leads to crashes

> https://code.videolan.org/videolan/vlc-android/commit/9d0c61bf29bdc1d06dc377be829150929ef247bc
---

 .../org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
index 901145ae8..8b1cb099b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/PlayerOptionsDelegate.kt
@@ -117,11 +117,13 @@ class PlayerOptionsDelegate(val activity: FragmentActivity, val service: Playbac
         if (service.playlistManager.player.canDoPassthrough() && settings.getString("aout", "0") == "0")
             options.add(PlayerOption(ID_PASSTHROUGH, R.attr.ic_passthrough, res.getString(R.string.audio_digital_title)))
         (recyclerview.adapter as OptionsAdapter).update(options)
-        if (video) {
-            options.add(PlayerOption(ID_SHOW_VIDEO_TIPS, R.attr.ic_tips, res.getString(R.string.tips_title)))
-        } else {
-            options.add(PlayerOption(ID_SHOW_AUDIO_TIPS, R.attr.ic_tips, res.getString(R.string.audio_player_tips)))
-            options.add(PlayerOption(ID_SHOW_PLAYLIST_TIPS, R.attr.ic_tips, res.getString(R.string.playlist_tips)))
+        if (!Settings.showTvUi) {
+            if (video) {
+                options.add(PlayerOption(ID_SHOW_VIDEO_TIPS, R.attr.ic_tips, res.getString(R.string.tips_title)))
+            } else {
+                options.add(PlayerOption(ID_SHOW_AUDIO_TIPS, R.attr.ic_tips, res.getString(R.string.audio_player_tips)))
+                options.add(PlayerOption(ID_SHOW_PLAYLIST_TIPS, R.attr.ic_tips, res.getString(R.string.playlist_tips)))
+            }
         }
     }
 



More information about the Android mailing list