[Android] Bitmap: Rename method for consistency

Jean-Baptiste Kempf git at videolan.org
Fri Jun 12 16:58:51 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun 12 15:23:31 2015 +0200| [0f6e4b786d1489bdcde9a54fbfe9f4608abd0f99] | committer: Jean-Baptiste Kempf

Bitmap: Rename method for consistency

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

 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java   |    2 +-
 vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java  |    5 ++---
 vlc-android/src/org/videolan/vlc/util/BitmapCache.java            |    2 +-
 3 files changed, 4 insertions(+), 5 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 7d1ad2e..4b3de4b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -344,7 +344,7 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
                     testedAlbums.add(media.getAlbum());
             }
             if (cover == null)
-                cover = BitmapCache.GetFromResource(v, R.drawable.icon);
+                cover = BitmapCache.getFromResource(v, R.drawable.icon);
             holder.cover.setImageBitmap(cover);
             int size = (int) mContext.getResources().getDimension(R.dimen.audio_browser_item_size);
             paramsCover = new RelativeLayout.LayoutParams(size, size);
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index bf8df07..2b4e42b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -36,7 +36,6 @@ import android.widget.TextView;
 import org.videolan.vlc.MediaGroup;
 import org.videolan.vlc.MediaWrapper;
 import org.videolan.vlc.R;
-import org.videolan.vlc.VLCApplication;
 import org.videolan.vlc.util.BitmapCache;
 import org.videolan.vlc.util.BitmapUtil;
 import org.videolan.vlc.util.Strings;
@@ -205,12 +204,12 @@ public class VideoListAdapter extends ArrayAdapter<MediaWrapper>
         if (thumbnail == null) {
             // missing thumbnail
             holder.thumbnail.setScaleType(ImageView.ScaleType.CENTER);
-            thumbnail = BitmapCache.GetFromResource(v, R.drawable.ic_cone_o);
+            thumbnail = BitmapCache.getFromResource(v, R.drawable.ic_cone_o);
         }
         else if (thumbnail.getWidth() == 1 && thumbnail.getHeight() == 1) {
             // dummy thumbnail
             holder.thumbnail.setScaleType(ImageView.ScaleType.CENTER);
-            thumbnail = BitmapCache.GetFromResource(v, R.drawable.ic_cone_o);
+            thumbnail = BitmapCache.getFromResource(v, R.drawable.ic_cone_o);
         }
         //FIXME Warning: the thumbnails are upscaled in the grid view!
         holder.thumbnail.setImageBitmap(thumbnail);
diff --git a/vlc-android/src/org/videolan/vlc/util/BitmapCache.java b/vlc-android/src/org/videolan/vlc/util/BitmapCache.java
index 4c889b4..09ba722 100644
--- a/vlc-android/src/org/videolan/vlc/util/BitmapCache.java
+++ b/vlc-android/src/org/videolan/vlc/util/BitmapCache.java
@@ -100,7 +100,7 @@ public class BitmapCache {
         mMemCache.evictAll();
     }
 
-    public static Bitmap GetFromResource(View v, int resId) {
+    public static Bitmap getFromResource(View v, int resId) {
         BitmapCache cache = BitmapCache.getInstance();
         Bitmap bitmap = cache.getBitmapFromMemCache(resId);
         if (bitmap == null) {



More information about the Android mailing list