1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

code clarification

This commit is contained in:
Nikolay Pultsin 2014-05-03 13:23:45 +01:00
parent 8d2d4d8309
commit f6708e2cdf

View file

@ -40,13 +40,17 @@ public class FileUtils {
_MapFileIcons.put(MimeTypes._RegexFileTypePlainTexts, R.drawable.afc_file_plain_text); _MapFileIcons.put(MimeTypes._RegexFileTypePlainTexts, R.drawable.afc_file_plain_text);
} }
private static boolean accessDenied(IFile file) { private static boolean accessDenied(IFile f) {
if (android.os.Build.VERSION.SDK_INT >= 9) { if (!(f instanceof File)) {
return file instanceof File && (!((File)file).canExecute() || !((File)file).canRead()); return false;
} else { }
return false; final File file = (File)f;
} if (android.os.Build.VERSION.SDK_INT >= 9) {
} return !file.canExecute() || !file.canRead();
} else {
return !file.canRead();
}
}
/** /**
* Gets resource icon ID of an {@link IFile}. * Gets resource icon ID of an {@link IFile}.