This commit is contained in:
cebgcontract 2022-11-15 16:18:03 +08:00
parent 08698a666b
commit 8fd577bc33
2 changed files with 18 additions and 13 deletions

View File

@ -155,11 +155,16 @@ public class FileUtils {
public static Bitmap loadImgData(Context activity, String oid) {
Uri uri = readImageFromGallery(activity, oid);
Bitmap data;
if (uri != null) {
try {
data = MediaStore.Images.Media.getBitmap(activity.getContentResolver(),uri);
} catch (IOException e) {
data = readImageFromExt(activity, oid);
}
} else {
data = readImageFromExt(activity, oid);
}
return data;
}

File diff suppressed because one or more lines are too long