In which cases SecurityException thrown on file operations on android?

view full story

http://stackoverflow.com – I work with File.java class. Most of its methods can throw SecurityException. But I don't find any information about cases in which it throws. I look in android sources and find following: different File methods perform such call SecurityManager security = System.getSecurityManager(); if (security != null) { security.e(path); } Or checkWrite() / checkDelete() In all this cases SecurityManager creates FilePermission object and validates it in Context.checkPermission() public void checkRead(String file, Object context) { checkPermission(new FilePermission(file, "read (HowTos)