Commit d3bf1781 authored by Geoffrey Métais's avatar Geoffrey Métais

Catch SecurityException in FileUtils.getUri()

parent 5a86e7f9
......@@ -120,11 +120,10 @@ public class FileUtils {
final int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
return cursor.getString(column_index);
} catch (IllegalArgumentException e) {
} catch (IllegalArgumentException|SecurityException e) {
return "";
} finally {
if (cursor != null && !cursor.isClosed())
cursor.close();
if (cursor != null && !cursor.isClosed()) cursor.close();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment