[Android] Remove dead code

Geoffrey Métais git at videolan.org
Thu Feb 26 11:23:34 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 26 10:32:17 2015 +0100| [6ee4e959fc00d12f9b16c7ad4ef2abb2f308c34a] | committer: Geoffrey Métais

Remove dead code

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=6ee4e959fc00d12f9b16c7ad4ef2abb2f308c34a
---

 .../src/org/videolan/vlc/gui/AboutFragment.java    |   32 ---------
 .../vlc/gui/audio/AudioAlbumsSongsFragment.java    |   69 +++++---------------
 2 files changed, 15 insertions(+), 86 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java
index de6f6db..53400c6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AboutFragment.java
@@ -20,7 +20,6 @@
 
 package org.videolan.vlc.gui;
 
-import android.annotation.SuppressLint;
 import android.content.Context;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
@@ -37,8 +36,6 @@ import android.view.animation.DecelerateInterpolator;
 import android.view.animation.RotateAnimation;
 import android.webkit.WebView;
 import android.widget.ImageView;
-import android.widget.TabHost;
-import android.widget.TabHost.TabSpec;
 import android.widget.TextView;
 
 import com.android.widget.SlidingTabLayout;
@@ -47,7 +44,6 @@ import org.videolan.vlc.BuildConfig;
 import org.videolan.vlc.R;
 import org.videolan.vlc.gui.audio.AudioPagerAdapter;
 import org.videolan.vlc.util.Util;
-import org.videolan.vlc.widget.FlingViewGroup;
 
 import java.util.ArrayList;
 
@@ -110,32 +106,4 @@ public class AboutFragment extends Fragment {
 
         return v;
     }
-
-    private static class DummyContentFactory implements TabHost.TabContentFactory {
-        private final Context mContext;
-        public DummyContentFactory(Context ctx) {
-            mContext = ctx;
-        }
-        @Override
-        public View createTabContent(String tag) {
-            View dummy = new View(mContext);
-            return dummy;
-        }
-    }
-
-    private void addNewTab(TabHost tabHost, String tag, String title) {
-        DummyContentFactory dcf = new DummyContentFactory(tabHost.getContext());
-        TabSpec tabSpec = tabHost.newTabSpec(tag);
-        tabSpec.setIndicator(getNewTabIndicator(tabHost.getContext(), title));
-        tabSpec.setContent(dcf);
-        tabHost.addTab(tabSpec);
-    }
-
-    @SuppressLint("InflateParams")
-    private View getNewTabIndicator(Context context, String title) {
-        View v = LayoutInflater.from(context).inflate(R.layout.tab_layout, null);
-        TextView tv = (TextView) v.findViewById(R.id.textView);
-        tv.setText(title);
-        return v;
-    }
 }
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index 0e0b353..c55b18c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -20,34 +20,13 @@
 
 package org.videolan.vlc.gui.audio;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.videolan.libvlc.LibVlcUtil;
-import org.videolan.vlc.MediaWrapper;
-import org.videolan.vlc.MediaLibrary;
-import org.videolan.vlc.R;
-import org.videolan.vlc.audio.AudioServiceController;
-import org.videolan.vlc.gui.BrowserFragment;
-import org.videolan.vlc.gui.CommonDialogs;
-import org.videolan.vlc.gui.MainActivity;
-import org.videolan.vlc.util.AndroidDevices;
-import org.videolan.vlc.util.Util;
-import org.videolan.vlc.util.VLCRunnable;
-import org.videolan.vlc.widget.FlingViewGroup;
-
-import android.annotation.SuppressLint;
 import android.annotation.TargetApi;
 import android.app.Activity;
 import android.app.AlertDialog;
-import android.content.Context;
 import android.os.Build;
 import android.os.Bundle;
-import android.support.v4.app.Fragment;
 import android.support.v4.view.ViewPager;
 import android.support.v4.widget.SwipeRefreshLayout;
-import android.support.v7.app.ActionBarActivity;
 import android.view.ContextMenu;
 import android.view.ContextMenu.ContextMenuInfo;
 import android.view.LayoutInflater;
@@ -66,12 +45,24 @@ import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
 import android.widget.ListView;
 import android.widget.PopupMenu;
 import android.widget.PopupMenu.OnMenuItemClickListener;
-import android.widget.TabHost;
-import android.widget.TabHost.TabSpec;
-import android.widget.TextView;
 
 import com.android.widget.SlidingTabLayout;
 
+import org.videolan.libvlc.LibVlcUtil;
+import org.videolan.vlc.MediaLibrary;
+import org.videolan.vlc.MediaWrapper;
+import org.videolan.vlc.R;
+import org.videolan.vlc.audio.AudioServiceController;
+import org.videolan.vlc.gui.BrowserFragment;
+import org.videolan.vlc.gui.CommonDialogs;
+import org.videolan.vlc.util.AndroidDevices;
+import org.videolan.vlc.util.Util;
+import org.videolan.vlc.util.VLCRunnable;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 public class AudioAlbumsSongsFragment extends BrowserFragment implements SwipeRefreshLayout.OnRefreshListener {
 
     public final static String TAG = "VLC/AudioAlbumsSongsFragment";
@@ -183,34 +174,6 @@ public class AudioAlbumsSongsFragment extends BrowserFragment implements SwipeRe
         return mTitle;
     }
 
-    private static class DummyContentFactory implements TabHost.TabContentFactory {
-        private final Context mContext;
-        public DummyContentFactory(Context ctx) {
-            mContext = ctx;
-        }
-        @Override
-        public View createTabContent(String tag) {
-            View dummy = new View(mContext);
-            return dummy;
-        }
-    }
-
-    private void addNewTab(TabHost tabHost, String tag, String title) {
-        DummyContentFactory dcf = new DummyContentFactory(tabHost.getContext());
-        TabSpec tabSpec = tabHost.newTabSpec(tag);
-        tabSpec.setIndicator(getNewTabIndicator(tabHost.getContext(), title));
-        tabSpec.setContent(dcf);
-        tabHost.addTab(tabSpec);
-    }
-
-    @SuppressLint("InflateParams")
-    private View getNewTabIndicator(Context context, String title) {
-        View v = LayoutInflater.from(context).inflate(R.layout.tab_layout, null);
-        TextView tv = (TextView) v.findViewById(R.id.textView);
-        tv.setText(title);
-        return v;
-    }
-
     @Override
     public void onPause() {
         super.onPause();
@@ -399,8 +362,6 @@ public class AudioAlbumsSongsFragment extends BrowserFragment implements SwipeRe
 
     };
 
-
-
     /*
      * Disable Swipe Refresh while scrolling horizontally
      */



More information about the Android mailing list