Commit 0bf07d9a authored by Sébastien Toque's avatar Sébastien Toque

fix audio cover and URItoFile

parent 3fcb24b6
......@@ -344,7 +344,7 @@ public class AudioService extends Service {
if (b != null)
return b;
}
File f = new File(mCurrentMedia.getLocation());
File f = Util.URItoFile(mCurrentMedia.getLocation());
for (File s : f.getParentFile().listFiles()) {
if (s.getAbsolutePath().endsWith("png") ||
s.getAbsolutePath().endsWith("jpg"))
......
......@@ -26,6 +26,7 @@ import java.text.DecimalFormat;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.widget.Toast;
public class Util {
......@@ -41,7 +42,7 @@ public class Util {
}
public static File URItoFile(String URI) {
return new File(URI.replace("file://", "file:"));
return new File(Uri.decode(URI).replace("file://",""));
}
public static String PathToURI(String path) {
......
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