summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/blinkt/openvpn/core
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/core')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java8
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java8
2 files changed, 16 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 378b6b92..32e5cabb 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -26,6 +26,14 @@ public class ConfigParser {
private boolean extraRemotesAsCustom=false;
+ /*
+ * TODO: We shouldn't be using this method.
+ * We need to figure out how to use just parseConfig, probably removing parseOptions.
+ */
+ public void setDefinition(HashMap<String,Vector<Vector<String>>> args) {
+ options = args;
+ }
+
public void parseConfig(Reader reader) throws IOException, ConfigParseError {
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
index 8281aed8..d7bb827e 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
@@ -72,6 +72,14 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
private String mLastTunCfg;
private String mRemoteGW;
+ //TODO We should know if this is running or not without this method
+ public boolean isRunning() {
+ if (mStarting == true || mProcessThread != null)
+ return true;
+ else
+ return false;
+ }
+
// From: http://stackoverflow.com/questions/3758606/how-to-convert-byte-size-into-human-readable-format-in-java
public static String humanReadableByteCount(long bytes, boolean mbit) {
if (mbit)