[Android] Consider 0px width for covers as invalid
Ludovic Fauvet
git at videolan.org
Fri Oct 19 15:23:29 CEST 2012
vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Fri Oct 19 14:29:28 2012 +0200| [8e4e20bbb6ccf8660425fc398c5fa76e387e0902] | committer: Ludovic Fauvet
Consider 0px width for covers as invalid
Lately a 0px width meant that we needed the full size cover but because
of our memory concerns this is not acceptable anymore.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=8e4e20bbb6ccf8660425fc398c5fa76e387e0902
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
index 25160a7..0799637 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
@@ -165,8 +165,13 @@ public class AudioUtil {
Bitmap cover = null;
String cachePath = null;
+ if (width <= 0) {
+ Log.e(TAG, "Invalid cover width requested");
+ return null;
+ }
+
// if external storage is not available, skip covers to prevent slow audio browsing
- if (!Util.hasExternalStorage() && width > 0)
+ if (!Util.hasExternalStorage())
return null;
try {
More information about the Android
mailing list