mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 10:19:33 +02:00
code clarification
This commit is contained in:
parent
8d2d4d8309
commit
f6708e2cdf
1 changed files with 11 additions and 7 deletions
|
@ -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}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue