[Android] Prevent showing the TV interface security dialog if we already know the device is compatible

Nicolas Pomepuy git at videolan.org
Wed Mar 16 10:15:34 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Mar 16 08:50:33 2022 +0100| [d2a556ec0a0612b61d9fe9eb43a419abb224d019] | committer: Nicolas Pomepuy

Prevent showing the TV interface security dialog if we already know the device is compatible

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

 .../main/java/org/videolan/television/ui/preferences/PreferencesUi.kt   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/television/src/main/java/org/videolan/television/ui/preferences/PreferencesUi.kt b/application/television/src/main/java/org/videolan/television/ui/preferences/PreferencesUi.kt
index 62e34ff2d..8744a3f08 100644
--- a/application/television/src/main/java/org/videolan/television/ui/preferences/PreferencesUi.kt
+++ b/application/television/src/main/java/org/videolan/television/ui/preferences/PreferencesUi.kt
@@ -106,7 +106,7 @@ class PreferencesUi : BasePreferenceFragment(), SharedPreferences.OnSharedPrefer
         if (preference.key == null) return false
         when (preference.key) {
             PREF_TV_UI -> {
-                if (!tvUiPref.isChecked) {
+                if (!tvUiPref.isChecked && Settings.device.isTv) {
                     tvUiPref.isChecked = true
                     val dialog = FeatureTouchOnlyWarningDialog.newInstance {
                         tvUiPref.isChecked = false



More information about the Android mailing list