[Android] Hide extensions in release builds & TV preferences

Geoffrey Métais git at videolan.org
Mon Aug 28 11:35:12 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Aug 28 09:49:37 2017 +0200| [11e6b0198312ac0d52cb76efa258d0592630fbb8] | committer: Geoffrey Métais

Hide extensions in release builds & TV preferences

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

 .../src/org/videolan/vlc/gui/preferences/PreferencesFragment.java | 8 +-------
 .../org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java  | 1 +
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java
index a407ece1a..78da2d365 100644
--- a/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/preferences/PreferencesFragment.java
@@ -63,13 +63,7 @@ public class PreferencesFragment extends BasePreferenceFragment {
     @Override
     public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
         super.onViewCreated(view, savedInstanceState);
-        if (BuildConfig.DEBUG) {
-            findPreference("extensions_category").setEnabled(true);
-            findPreference("extensions_category").setVisible(true);
-        } else {
-            findPreference("extensions_category").setEnabled(false);
-            findPreference("extensions_category").setVisible(false);
-        }
+        findPreference("extensions_category").setVisible(BuildConfig.DEBUG);
     }
 
     @Override
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
index 77e0f9680..ae343fccd 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/preferences/PreferencesFragment.java
@@ -59,6 +59,7 @@ public class PreferencesFragment extends BasePreferenceFragment {
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         findPreference("screen_orientation").setVisible(false);
+        findPreference("extensions_category").setVisible(false);
     }
 
     @Override



More information about the Android mailing list