summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVPN.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-27 23:01:24 +0200
committerArne Schwabe <arne@rfc2549.org>2012-06-27 23:01:24 +0200
commit7cb22c98cc326aceb6a9672ebddc6988703dc1c8 (patch)
treecac8c9125e78bbb59a5ddf628b3742459602178c /src/de/blinkt/openvpn/OpenVPN.java
parentce20c72f201f6982cf0273aff4cab939abe08459 (diff)
parent5428376e0d14bd128c2bdc5b50ab95c85321a517 (diff)
merge
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java
index c23ee56d..64ecf17c 100644
--- a/src/de/blinkt/openvpn/OpenVPN.java
+++ b/src/de/blinkt/openvpn/OpenVPN.java
@@ -4,9 +4,24 @@ import java.util.LinkedList;
import java.util.Vector;
import android.content.Context;
+import android.os.Build;
public class OpenVPN {
+
+ public static LinkedList<LogItem> logbuffer;
+
+ private static Vector<LogListener> logListener;
+ private static Vector<StateListener> stateListener;
+ private static String[] mBconfig;
+
+ static {
+ logbuffer = new LinkedList<LogItem>();
+ logListener = new Vector<OpenVPN.LogListener>();
+ stateListener = new Vector<OpenVPN.StateListener>();
+ logInformation();
+ }
+
static class LogItem {
public static final int ERROR = 1;
public static final int INFO = 2;
@@ -68,11 +83,6 @@ public class OpenVPN {
- public static LinkedList<LogItem> logbuffer = new LinkedList<LogItem>();
-
- private static Vector<LogListener> logListener=new Vector<OpenVPN.LogListener>();
- private static Vector<StateListener> stateListener=new Vector<OpenVPN.StateListener>();
- private static String[] mBconfig;
public interface LogListener {
void newLog(LogItem logItem);
@@ -90,6 +100,12 @@ public class OpenVPN {
synchronized static void clearLog() {
logbuffer.clear();
+ logInformation();
+ }
+
+ private static void logInformation() {
+
+ logInfo(R.string.mobile_info,Build.MODEL, Build.BOARD,Build.BRAND,Build.VERSION.SDK_INT);
}
synchronized static void addLogListener(LogListener ll){
@@ -110,7 +126,6 @@ public class OpenVPN {
}
-
synchronized public static LogItem[] getlogbuffer() {
// The stoned way of java to return an array from a vector