update compile sdk to 27

This commit is contained in:
Vincent Breitmoser
2018-01-24 01:32:14 +01:00
parent 938081f125
commit 3379a1d85c
8 changed files with 35 additions and 31 deletions
@@ -218,7 +218,11 @@ public class FileHelper {
*/
public static Bitmap getThumbnail(Context context, Uri uri, Point size) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null);
try {
return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null);
} catch (FileNotFoundException e) {
return null;
}
} else {
return null;
}