[Android] Remove unused variables

Geoffrey Métais git at videolan.org
Thu May 7 16:29:25 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May  7 14:52:11 2015 +0200| [dcc70bc170b432429f9b1361cb1e3fe4bed795c6] | committer: Geoffrey Métais

Remove unused variables

CID #1297091, #1297090, #1297089

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

 .../src/org/videolan/vlc/gui/HistoryAdapter.java       |    2 --
 .../org/videolan/vlc/gui/audio/AudioAlbumFragment.java |    3 ---
 .../videolan/vlc/widget/ContextMenuRecyclerView.java   |   16 +++++++---------
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.java b/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.java
index 1891f00..8daf4ff 100644
--- a/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/HistoryAdapter.java
@@ -85,7 +85,6 @@ public class HistoryAdapter extends BaseAdapter implements AudioServiceControlle
         if (v == null) {
             v = mInflater.inflate(R.layout.list_item, parent, false);
             holder = new DirectoryViewHolder();
-            holder.layout = v.findViewById(R.id.layout_item);
             holder.title = (TextView) v.findViewById(R.id.title);
             holder.text = (TextView) v.findViewById(R.id.artist);
             holder.icon = (ImageView) v.findViewById(R.id.cover);
@@ -129,7 +128,6 @@ public class HistoryAdapter extends BaseAdapter implements AudioServiceControlle
     }
 
     private static class DirectoryViewHolder {
-        View layout;
         TextView title;
         TextView text;
         ImageView icon;
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumFragment.java
index 239cc0a..74a0930 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumFragment.java
@@ -45,7 +45,6 @@ import android.widget.ImageView;
 import android.widget.ListView;
 
 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;
@@ -58,7 +57,6 @@ public class AudioAlbumFragment extends Fragment implements AdapterView.OnItemCl
     public final static String TAG = "VLC/AudioAlbumFragment";
 
     AudioServiceController mAudioController;
-    private MediaLibrary mMediaLibrary;
 
     private AlbumAdapter mAdapter;
     private ArrayList<MediaWrapper> mMediaList;
@@ -73,7 +71,6 @@ public class AudioAlbumFragment extends Fragment implements AdapterView.OnItemCl
         mAdapter.setContextPopupMenuListener(mContextPopupMenuListener);
 
         mAudioController = AudioServiceController.getInstance();
-        mMediaLibrary = MediaLibrary.getInstance();
         if (savedInstanceState != null)
             setMediaList(savedInstanceState.<MediaWrapper>getParcelableArrayList("list"), savedInstanceState.getString("title"));
     }
diff --git a/vlc-android/src/org/videolan/vlc/widget/ContextMenuRecyclerView.java b/vlc-android/src/org/videolan/vlc/widget/ContextMenuRecyclerView.java
index 60d3d81..1af7ff5 100644
--- a/vlc-android/src/org/videolan/vlc/widget/ContextMenuRecyclerView.java
+++ b/vlc-android/src/org/videolan/vlc/widget/ContextMenuRecyclerView.java
@@ -52,29 +52,27 @@ public class ContextMenuRecyclerView extends RecyclerView {
 
     public void openContextMenu(int position) {
         if (position >= 0)
-            createContextMenuInfo(position, getAdapter().getItemId(position));
+            createContextMenuInfo(position);
         showContextMenu();
     }
 
-    private void createContextMenuInfo(int position, long id) {
+    private void createContextMenuInfo(int position) {
         if (mContextMenuInfo == null)
-            mContextMenuInfo = new RecyclerContextMenuInfo(position, id);
+            mContextMenuInfo = new RecyclerContextMenuInfo(position);
         else
-            ((RecyclerContextMenuInfo)mContextMenuInfo).setValues(position, id);
+            ((RecyclerContextMenuInfo)mContextMenuInfo).setValues(position);
     }
 
     public static class RecyclerContextMenuInfo implements ContextMenu.ContextMenuInfo {
 
         public int position;
-        public long id;
 
-        public RecyclerContextMenuInfo(int position, long id) {
-            setValues(position, id);
+        public RecyclerContextMenuInfo(int position) {
+            setValues(position);
         }
 
-        public void setValues(int position, long id){
+        public void setValues(int position){
             this.position = position;
-            this.id = id;
         }
     }
 }



More information about the Android mailing list