Commit dcc70bc1 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Remove unused variables

CID #1297091, #1297090, #1297089
parent bef4bb09
......@@ -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;
......
......@@ -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"));
}
......
......@@ -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;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment