mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Removed a Java 1.6 API call.
This commit is contained in:
@@ -40,7 +40,6 @@ import net.sf.briar.api.plugins.duplex.DuplexTransportConnection;
|
|||||||
import net.sf.briar.util.StringUtils;
|
import net.sf.briar.util.StringUtils;
|
||||||
import socks.Socks5Proxy;
|
import socks.Socks5Proxy;
|
||||||
import socks.SocksSocket;
|
import socks.SocksSocket;
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.FileObserver;
|
import android.os.FileObserver;
|
||||||
@@ -275,11 +274,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
private boolean setExecutable(File f) {
|
private boolean setExecutable(File f) {
|
||||||
if(Build.VERSION.SDK_INT >= 9) {
|
|
||||||
return f.setExecutable(true, true);
|
|
||||||
} else {
|
|
||||||
String[] command = { "chmod", "700", f.getAbsolutePath() };
|
String[] command = { "chmod", "700", f.getAbsolutePath() };
|
||||||
try {
|
try {
|
||||||
return Runtime.getRuntime().exec(command).waitFor() == 0;
|
return Runtime.getRuntime().exec(command).waitFor() == 0;
|
||||||
@@ -294,7 +289,6 @@ class TorPlugin implements DuplexPlugin, EventHandler {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void tryToClose(InputStream in) {
|
private void tryToClose(InputStream in) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user