summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVPN.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-08-28 01:14:05 +0200
committerArne Schwabe <arne@rfc2549.org>2012-08-28 01:14:05 +0200
commite602d23e83f56028ca669b509e417238564192e8 (patch)
tree24412871cd640a95f010aaf4f45201ed3e412b10 /src/de/blinkt/openvpn/OpenVPN.java
parent723d5d5eaafe7600e1959044ef25afa267540f93 (diff)
- Add status message when waiting for network.
- Using a priority higher than PRIORITY_MIN stop the flickering of the notification but make the icon visible again :/
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVPN.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java
index db980200..6b65c22e 100644
--- a/src/de/blinkt/openvpn/OpenVPN.java
+++ b/src/de/blinkt/openvpn/OpenVPN.java
@@ -14,6 +14,10 @@ public class OpenVPN {
private static Vector<LogListener> logListener;
private static Vector<StateListener> stateListener;
private static String[] mBconfig;
+
+ private static String mLaststatemsg;
+
+ private static String mLaststate;
static {
logbuffer = new LinkedList<LogItem>();
@@ -117,8 +121,10 @@ public class OpenVPN {
}
- synchronized static void addSpeedListener(StateListener sl){
+ synchronized static void addStateListener(StateListener sl){
stateListener.add(sl);
+ if(mLaststate!=null)
+ sl.updateState(mLaststate, mLaststatemsg);
}
synchronized static void removeSpeedListener(StateListener sl) {
@@ -148,6 +154,9 @@ public class OpenVPN {
}
public synchronized static void updateStateString(String state, String msg) {
+ mLaststate= state;
+ mLaststatemsg = msg;
+
for (StateListener sl : stateListener) {
sl.updateState(state,msg);
}