FileCompat: fix setExecutable signature

For some reason its first argument was "readable", while it clearly
should be "executable" as per the code below. Also see the method we
call on api 9 and newer:

https://developer.android.com/reference/java/io/File.html#setReadable(boolean, boolean)
This commit is contained in:
Daniel Martí 2015-12-01 13:52:25 +01:00
parent 30bc2cf8d5
commit 4f8fe4e967

View File

@ -118,13 +118,13 @@ public class FileCompat extends Compatibility {
}
@TargetApi(9)
public static boolean setExecutable(SanitizedFile file, boolean readable, boolean ownerOnly) {
public static boolean setExecutable(SanitizedFile file, boolean executable, boolean ownerOnly) {
if (hasApi(9)) {
return file.setExecutable(readable, ownerOnly);
return file.setExecutable(executable, ownerOnly);
}
String mode;
if (readable) {
if (executable) {
mode = ownerOnly ? "0700" : "0711";
} else {
mode = ownerOnly ? "0600" : "0600";