[Android] AudioUtil: try to avoid creating File from null path
Jean-Baptiste Kempf
git at videolan.org
Fri Oct 19 11:49:55 CEST 2012
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Oct 19 11:49:37 2012 +0200| [e866ce6779beef64495b28a1190a8a436c5b872f] | committer: Jean-Baptiste Kempf
AudioUtil: try to avoid creating File from null path
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=e866ce6779beef64495b28a1190a8a436c5b872f
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
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 de01be1..25160a7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioUtil.java
@@ -194,13 +194,11 @@ public class AudioUtil {
coverPath = getCoverFromVlc(context, media);
// no found yet, looking in folder
- cacheFile = new File(coverPath);
- if (coverPath == null || !cacheFile.exists())
+ if (coverPath == null || !(new File(coverPath)).exists())
coverPath = getCoverFromFolder(context, media);
// try to get the cover from android MediaStore
- cacheFile = new File(coverPath);
- if (coverPath == null || !cacheFile.exists())
+ if (coverPath == null || !(new File(coverPath)).exists())
coverPath = getCoverFromMediaStore(context, media);
// read (and scale?) the bitmap
More information about the Android
mailing list