mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
code clarification
This commit is contained in:
parent
8d2d4d8309
commit
f6708e2cdf
1 changed files with 11 additions and 7 deletions
|
@ -40,12 +40,16 @@ 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());
|
|
||||||
} else {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
final File file = (File)f;
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= 9) {
|
||||||
|
return !file.canExecute() || !file.canRead();
|
||||||
|
} else {
|
||||||
|
return !file.canRead();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue