diff options
author | Parménides GV <parmegv@sdf.org> | 2014-06-13 11:31:36 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-06-13 11:31:36 +0200 |
commit | 36247e71df88fa13c6c5a887de3b11d9a883615f (patch) | |
tree | 099535ca64dc0b0779d23159b3323dc1f65828b4 /app/src/main/java/se/leap/bitmaskclient/EipStatusReceiver.java | |
parent | 3532eff1b86f6b5ae4268393c4b5c61350c89faf (diff) |
Disconnect works, eip status receiver.
Disconnect uses the ics-openvpn activity, and the dialog prompting the
user to confirm the disconnection is only shown when eip is connected or
is trying to connect.
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/EipStatusReceiver.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/EipStatusReceiver.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipStatusReceiver.java b/app/src/main/java/se/leap/bitmaskclient/EipStatusReceiver.java new file mode 100644 index 00000000..8793cf36 --- /dev/null +++ b/app/src/main/java/se/leap/bitmaskclient/EipStatusReceiver.java @@ -0,0 +1,17 @@ +package se.leap.bitmaskclient; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.util.Log; + + +public class EipStatusReceiver extends BroadcastReceiver { + + @Override + public void onReceive(Context context, Intent intent) { + if (intent.getAction().equals("de.blinkt.openvpn.VPN_STATUS")) { + context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, Context.MODE_PRIVATE).edit().putString(EIP.STATUS, intent.getStringExtra("status")).commit(); + } + } +} |