mirror of
https://github.com/samsonjs/media.git
synced 2026-03-30 10:15:48 +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 {
|
||||
if (uri.getScheme().equals("file")) {
|
||||
return BitmapFactory.decodeFile(uri.getPath());
|
||||
}
|
||||
URLConnection connection = new URL(uri.toString()).openConnection();
|
||||
if (!(connection instanceof HttpURLConnection)) {
|
||||
throw new UnsupportedOperationException("Unsupported scheme: " + uri.getScheme());
|
||||
|
|
|
|||
Loading…
Reference in a new issue