add the ability for briar-android to get the current country.

- this will be useful later for e.g. auto-disabling Tor
This commit is contained in:
Ximin Luo
2014-02-06 19:16:04 +00:00
parent 39b7a97267
commit 9697b351e9
4 changed files with 58 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ import org.briarproject.util.StringUtils;
import socks.Socks5Proxy;
import socks.SocksSocket;
import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -275,6 +276,7 @@ class TorPlugin implements DuplexPlugin, EventHandler {
out.close();
}
@SuppressLint("NewApi")
private boolean setExecutable(File f) {
if(Build.VERSION.SDK_INT >= 9) {
return f.setExecutable(true, true);