mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
parent
2c7201024e
commit
6016418c33
1 changed files with 3 additions and 0 deletions
|
|
@ -89,6 +89,9 @@ public final class SimpleBitmapLoader implements BitmapLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Bitmap load(Uri uri) throws IOException {
|
private static Bitmap load(Uri uri) throws IOException {
|
||||||
|
if (uri.getScheme().equals("file")) {
|
||||||
|
return BitmapFactory.decodeFile(uri.getPath());
|
||||||
|
}
|
||||||
URLConnection connection = new URL(uri.toString()).openConnection();
|
URLConnection connection = new URL(uri.toString()).openConnection();
|
||||||
if (!(connection instanceof HttpURLConnection)) {
|
if (!(connection instanceof HttpURLConnection)) {
|
||||||
throw new UnsupportedOperationException("Unsupported scheme: " + uri.getScheme());
|
throw new UnsupportedOperationException("Unsupported scheme: " + uri.getScheme());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue