summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java
index f3f6e16f..c6735130 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java
@@ -44,12 +44,7 @@ public class EipStatus extends Observable implements VpnStatus.StateListener {
@Override
public void updateState(final String state, final String logmessage, final int localizedResId, final VpnStatus.ConnectionStatus level) {
- current_status = getInstance();
- current_status.setState(state);
- current_status.setLogMessage(logmessage);
- current_status.setLocalizedResId(localizedResId);
- current_status.setLevel(level);
- current_status.setChanged();
+ updateStatus(state, logmessage, localizedResId, level);
if(isConnected() || isDisconnected()) {
setConnectedOrDisconnected();
if(isDisconnected())
@@ -57,7 +52,15 @@ public class EipStatus extends Observable implements VpnStatus.StateListener {
} else if(isConnecting())
setConnecting();
Log.d(TAG, "update state with level " + level);
- current_status.notifyObservers();
+ }
+
+ private void updateStatus(final String state, final String logmessage, final int localizedResId, final VpnStatus.ConnectionStatus level) {
+ current_status = getInstance();
+ current_status.setState(state);
+ current_status.setLogMessage(logmessage);
+ current_status.setLocalizedResId(localizedResId);
+ current_status.setLevel(level);
+ current_status.setChanged();
}
public boolean wantsToDisconnect() {