Merge pull request #2495 from jekor/master
workaround for NullPointerException for some document thumbnails
This commit is contained in:
commit
ea023aaf18
|
@ -220,7 +220,7 @@ public class FileHelper {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
try {
|
try {
|
||||||
return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null);
|
return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null);
|
||||||
} catch (FileNotFoundException e) {
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue