[Android] Remove dead code

Geoffrey Métais git at videolan.org
Mon Sep 7 14:29:23 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Sep  1 15:10:40 2015 +0200| [b0e2d96f452cce8bb8ba7dcf579faf09072d342e] | committer: Geoffrey Métais

Remove dead code

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

 .../org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java  |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index 3d63850..17f6216 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -302,7 +302,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
 
     public View getViewMedia(int position, View convertView, ViewGroup parent) {
         View v = convertView;
-        ViewHolder holder;
+        ViewHolder holder = null;
 
         /* convertView may be a recycled view but we must recreate it
          * if it does not correspond to a media view. */
@@ -322,8 +322,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
             Util.setAlignModeByPref(mAlignMode, (TextView) v.findViewById(R.id.title));
             holder.viewType = VIEW_MEDIA;
             v.setTag(holder);
-        } else
-            holder = (ViewHolder) v.getTag();
+        }
 
         holder.position = position;
         ListItem item = getItem(position);
@@ -356,7 +355,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
 
     public View getViewSeparator(int position, View convertView, ViewGroup parent) {
         View v = convertView;
-        ViewHolder holder;
+        ViewHolder holder = null;
 
         /* convertView may be a recycled view but we must recreate it
          * if it does not correspond to a separator view. */
@@ -374,8 +373,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
             v = holder.binding.getRoot();
             holder.viewType = VIEW_SEPARATOR;
             v.setTag(holder);
-        } else
-            holder = (ViewHolder) v.getTag();
+        }
 
         ListItem item = getItem(position);
         holder.binding.setVariable(BR.item, item);



More information about the Android mailing list