|
@@ -56,13 +56,19 @@ public class ImageLoader {
|
56
|
56
|
|
57
|
57
|
@NonNull
|
58
|
58
|
private Drawable getDrawable(Context context, String source) throws IOException {
|
59
|
|
- if (BuildConfig.DEBUG) {
|
60
|
|
- return readJsDevImage(context, source);
|
61
|
|
- } else if (isLocalFile(Uri.parse(source))) {
|
62
|
|
- return loadFile(source);
|
|
59
|
+ Drawable drawable;
|
|
60
|
+
|
|
61
|
+ if (isLocalFile(Uri.parse(source))) {
|
|
62
|
+ drawable = loadFile(source);
|
63
|
63
|
} else {
|
64
|
|
- return loadResource(source);
|
|
64
|
+ drawable = loadResource(source);
|
|
65
|
+
|
|
66
|
+ if (drawable == null || BuildConfig.DEBUG) {
|
|
67
|
+ drawable = readJsDevImage(context, source);
|
|
68
|
+ }
|
65
|
69
|
}
|
|
70
|
+
|
|
71
|
+ return drawable;
|
66
|
72
|
}
|
67
|
73
|
|
68
|
74
|
@NonNull
|