1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 10:19:33 +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);
}
private static boolean accessDenied(IFile file) {
if (android.os.Build.VERSION.SDK_INT >= 9) {
return file instanceof File && (!((File)file).canExecute() || !((File)file).canRead());
} else {
return false;
}
}
private static boolean accessDenied(IFile f) {
if (!(f instanceof File)) {
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}.