|
@@ -66,16 +66,15 @@ public class ImageLoader {
|
66
|
66
|
@NonNull
|
67
|
67
|
private Drawable getDrawable(Context context, String source) throws IOException {
|
68
|
68
|
Drawable drawable;
|
69
|
|
-
|
70
|
69
|
if (isLocalFile(Uri.parse(source))) {
|
71
|
70
|
drawable = loadFile(source);
|
72
|
71
|
} else {
|
73
|
72
|
drawable = loadResource(source);
|
74
|
|
- if (drawable == null || NavigationApplication.instance.isDebug()) {
|
|
73
|
+ if (drawable == null && NavigationApplication.instance.isDebug()) {
|
75
|
74
|
drawable = readJsDevImage(context, source);
|
76
|
75
|
}
|
77
|
76
|
}
|
78
|
|
-
|
|
77
|
+ if (drawable == null) throw new RuntimeException("Could not load image " + source);
|
79
|
78
|
return drawable;
|
80
|
79
|
}
|
81
|
80
|
|