[Android] Remove Chrome flavor related code

Geoffrey Métais git at videolan.org
Thu Jun 28 17:17:47 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun 28 17:17:19 2018 +0200| [7938743b125fa855778614667b1f5379b33aaba1] | committer: Geoffrey Métais

Remove Chrome flavor related code

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java    |  4 ----
 vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt | 15 ---------------
 2 files changed, 19 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 481e3f9d1..8532e80d8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -129,10 +129,6 @@ public class MainActivity extends ContentActivity implements FilterQueryProvider
 
     private void setupNavigationView() {
         mNavigationView = findViewById(R.id.navigation);
-        if (TextUtils.equals(BuildConfig.FLAVOR_target, "chrome")) {
-            final MenuItem item = mNavigationView.getMenu().findItem(R.id.nav_directories);
-            item.setTitle(R.string.open);
-        }
         mNavigationView.getMenu().findItem(R.id.nav_history).setVisible(mSettings.getBoolean(PreferencesFragment.PLAYBACK_HISTORY, true));
     }
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
index 29144569a..d0590280c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
@@ -33,10 +33,8 @@ import android.support.design.widget.NavigationView
 import android.support.v4.app.Fragment
 import android.support.v4.app.FragmentManager
 import android.support.v4.util.SimpleArrayMap
-import android.text.TextUtils
 import android.util.Log
 import android.view.MenuItem
-import org.videolan.vlc.BuildConfig
 import org.videolan.vlc.R
 import org.videolan.vlc.extensions.ExtensionManagerService
 import org.videolan.vlc.extensions.api.VLCExtensionItem
@@ -199,19 +197,6 @@ class Navigator(private val activity: MainActivity,
                     R.id.nav_about -> showSecondaryFragment(SecondaryActivity.ABOUT)
                     R.id.nav_settings -> activity.startActivityForResult(Intent(activity, PreferencesActivity::class.java), Constants.ACTIVITY_RESULT_PREFERENCES)
                     R.id.nav_mrl -> MRLPanelFragment().show(activity.supportFragmentManager, "fragment_mrl")
-                    R.id.nav_directories -> {
-                        if (TextUtils.equals(BuildConfig.FLAVOR_target, "chrome")) {
-                            val intent = Intent(Intent.ACTION_GET_CONTENT)
-                            intent.type = "audio/* video/*"
-                            activity.startActivityForResult(intent, Constants.ACTIVITY_RESULT_OPEN)
-                            activity.closeDrawer()
-                            return true
-                        }
-                        /* Slide down the audio player */
-                        activity.slideDownAudioPlayer()
-                        /* Switch the fragment */
-                        showFragment(id)
-                    }
                     else -> {
                         activity.slideDownAudioPlayer()
                         showFragment(id)



More information about the Android mailing list